mirror of
https://github.com/tubearchivist/tubearchivist-frontend.git
synced 2024-11-22 20:00:15 +00:00
better error raising for add player info
This commit is contained in:
parent
0414df0de0
commit
b071612038
@ -350,7 +350,7 @@ class YoutubeVideo(YouTubeItem, YoutubeSubtitle):
|
|||||||
try:
|
try:
|
||||||
# when indexing from download task
|
# when indexing from download task
|
||||||
vid_path = self.build_dl_cache_path()
|
vid_path = self.build_dl_cache_path()
|
||||||
except FileNotFoundError:
|
except FileNotFoundError as err:
|
||||||
# when reindexing needs to handle title rename
|
# when reindexing needs to handle title rename
|
||||||
channel = os.path.split(self.json_data["media_url"])[0]
|
channel = os.path.split(self.json_data["media_url"])[0]
|
||||||
channel_dir = os.path.join(self.app_conf["videos"], channel)
|
channel_dir = os.path.join(self.app_conf["videos"], channel)
|
||||||
@ -360,7 +360,7 @@ class YoutubeVideo(YouTubeItem, YoutubeSubtitle):
|
|||||||
vid_path = os.path.join(channel_dir, file)
|
vid_path = os.path.join(channel_dir, file)
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
raise FileNotFoundError
|
raise FileNotFoundError("could not find video file") from err
|
||||||
|
|
||||||
duration_handler = DurationConverter()
|
duration_handler = DurationConverter()
|
||||||
duration = duration_handler.get_sec(vid_path)
|
duration = duration_handler.get_sec(vid_path)
|
||||||
|
Loading…
Reference in New Issue
Block a user