prioritize youtube transcripts over html5 ones

This commit is contained in:
Qubad786
2017-03-09 21:30:05 +05:00
parent 173e592203
commit 0ff62e766e
2 changed files with 87 additions and 31 deletions

View File

@@ -338,7 +338,10 @@ def manage_video_subtitles_save(item, user, old_metadata=None, generate_translat
# 1.
html5_ids = get_html5_ids(item.html5_sources)
possible_video_id_list = [item.youtube_id_1_0] + html5_ids
# Youtube transcript source should always have a higher priority than html5 sources. Appending
# `youtube_id_1_0` at the end helps achieve this when we read transcripts list.
possible_video_id_list = html5_ids + [item.youtube_id_1_0]
sub_name = item.sub
for video_id in possible_video_id_list:
if not video_id: