mirror of
https://github.com/tubearchivist/tubearchivist-frontend.git
synced 2024-11-16 17:10:12 +00:00
raise ValueError if vid metatdata extraction failes for new videos
This commit is contained in:
parent
193e6f91ac
commit
82a91308f5
@ -375,6 +375,9 @@ class YoutubeVideo:
|
|||||||
def index_new_video(youtube_id, missing_vid=False):
|
def index_new_video(youtube_id, missing_vid=False):
|
||||||
""" combine video and channel classes for new video index """
|
""" combine video and channel classes for new video index """
|
||||||
vid_handler = YoutubeVideo(youtube_id)
|
vid_handler = YoutubeVideo(youtube_id)
|
||||||
|
if not vid_handler.vid_dict:
|
||||||
|
raise ValueError('failed to get metadata for ' + youtube_id)
|
||||||
|
|
||||||
channel_handler = YoutubeChannel(vid_handler.channel_id)
|
channel_handler = YoutubeChannel(vid_handler.channel_id)
|
||||||
# add filepath to vid_dict
|
# add filepath to vid_dict
|
||||||
channel_name = channel_handler.channel_dict['channel_name']
|
channel_name = channel_handler.channel_dict['channel_name']
|
||||||
|
Loading…
Reference in New Issue
Block a user