developer #7
69
TODO
Normal file
69
TODO
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
'''
|
||||||
|
Rework packaging flow:
|
||||||
|
|
||||||
|
1. queue pickup
|
||||||
|
|
||||||
|
2. origin-specific handling
|
||||||
|
Create initial package
|
||||||
|
|
||||||
|
3. create id dir in processing
|
||||||
|
Add workbase to package
|
||||||
|
|
||||||
|
3. transcoding and thumb generation
|
||||||
|
Put new files in processing
|
||||||
|
Update package with new relative names
|
||||||
|
|
||||||
|
4. stash originals
|
||||||
|
Move original files to processing subdir
|
||||||
|
|
||||||
|
5. platform notification
|
||||||
|
Temporarily remove base, workbase, update_id
|
||||||
|
|
||||||
|
6. finalize processing
|
||||||
|
Remove base, workbase, update_id, notification_id
|
||||||
|
Save package to disk
|
||||||
|
Move processing dir to processed
|
||||||
|
Delete queue file
|
||||||
|
Delete base files
|
||||||
|
'''
|
||||||
|
|
||||||
|
|
||||||
|
# package.json:
|
||||||
|
|
||||||
|
{
|
||||||
|
'id': assigned_id, # Unique job id
|
||||||
|
'update_id': id_to_replace, # id of original if updating
|
||||||
|
# only exists for update
|
||||||
|
# remove before publishing
|
||||||
|
'notification_id': some_id, # only exists for manual
|
||||||
|
# remove before publishing
|
||||||
|
'base': uploaded_path, # remove before publishing
|
||||||
|
'workbase': work_path, # remove before publishing
|
||||||
|
'origin': cattura_etc,
|
||||||
|
'creation': 0,
|
||||||
|
'title': "",
|
||||||
|
'presenters': [],
|
||||||
|
'courses': [],
|
||||||
|
'duration': 0,
|
||||||
|
'thumb': '',
|
||||||
|
'tags': [],
|
||||||
|
'sources': [
|
||||||
|
{
|
||||||
|
'name': 'main',
|
||||||
|
'video': {
|
||||||
|
resolution: source['video'], # resolution should be the vertical
|
||||||
|
... # resolution as a string, eg '720' etc
|
||||||
|
},
|
||||||
|
'poster': source.get('poster', ''),
|
||||||
|
'playAudio': source['playAudio']
|
||||||
|
},
|
||||||
|
...
|
||||||
|
],
|
||||||
|
'slides': [
|
||||||
|
{
|
||||||
|
'url': '', # a valid http(s) URL
|
||||||
|
'duration': 0 # an integer number of milliseconds
|
||||||
|
},
|
||||||
|
...
|
||||||
|
]
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user