Save uploader id in local playlists

Signed-off-by: Jesús <heckyel@hyperbola.info>
This commit is contained in:
James Taylor 2021-04-14 19:38:26 -07:00 committed by Jesús
parent 0ee1aabc74
commit 53b274e35f
No known key found for this signature in database
GPG Key ID: F6EE7BC59A315766

View File

@ -517,11 +517,11 @@ def add_extra_html_info(item):
item['url'] = (URL_ORIGIN + '/watch?v=' + item['id']) if item.get('id') else None item['url'] = (URL_ORIGIN + '/watch?v=' + item['id']) if item.get('id') else None
video_info = {} video_info = {}
for key in ('id', 'title', 'author', 'duration'): for key in ('id', 'title', 'author', 'duration', 'author_id'):
try: try:
video_info[key] = item[key] video_info[key] = item[key]
except KeyError: except KeyError:
video_info[key] = '' video_info[key] = None
item['video_info'] = json.dumps(video_info) item['video_info'] = json.dumps(video_info)
@ -536,6 +536,9 @@ def add_extra_html_info(item):
elif item['type'] == 'channel': elif item['type'] == 'channel':
item['url'] = concat_or_none(URL_ORIGIN, "/channel/", item['id']) item['url'] = concat_or_none(URL_ORIGIN, "/channel/", item['id'])
if item.get('author_id') and 'author_url' not in item:
item['author_url'] = URL_ORIGIN + '/channel/' + item['author_id']
def check_gevent_exceptions(*tasks): def check_gevent_exceptions(*tasks):
for task in tasks: for task in tasks: