Page:
shell
Pages
0x_id
API
Configuration
Customization
DatabaseUpdate
Docker
GoogleMapsAPI
Home
IMDb
MultilingualAnnotations
MultipleAudioTracks
MyFavoriteBugs
Places
QuerySyntax
RenamingFiles
UpgradeTo14.04
UpgradeTo16.04
UpgradeTo18.04
UpgradeTo20.04
UpgradeToPython3
UseCases
WikipediaTemplate
config
database backup
embed
filenames
groups
ids
install
ldap
media
metadata
objects
permissions
posterservice
services
shell
ssl
text
todo
urls
video
volume
No results
1
shell
j edited this page 2023-07-02 12:57:13 +05:30
Table of Contents
collection of ./manage.py shell scripts
get item
import item.models
i = item.models.Item.objects.get(itemId='ABC')
get user
import user.models
u = user.models.User.objects.get(username='j')
find broken or aborted derivatives and encode again
import archive.models
import ox
for s in archive.models.Stream.objects.exclude(source=None):
if s.info.get('duration', -1) < 0:
print s
s.encode()
s.info = ox.avinfo(s.video.path)
s.save()
print s.info.get('duration')
extract timelines again
import item.models
i = item.models.Item.objects.get(itemId='ABC')
for s in i.streams(): s.make_timeline()
i.update_timeline()