mirror of
https://github.com/tubearchivist/tubearchivist-frontend.git
synced 2024-11-25 05:00:16 +00:00
fix filenotfounderror for missing subtitles when deleting video
This commit is contained in:
parent
efa240440b
commit
fe3e3cfacc
@ -498,7 +498,10 @@ class YoutubeVideo(YouTubeItem, YoutubeSubtitle):
|
|||||||
|
|
||||||
for media_url in to_del:
|
for media_url in to_del:
|
||||||
file_path = os.path.join(video_base, media_url)
|
file_path = os.path.join(video_base, media_url)
|
||||||
os.remove(file_path)
|
try:
|
||||||
|
os.remove(file_path)
|
||||||
|
except FileNotFoundError:
|
||||||
|
print(f"{self.youtube_id}: failed {media_url}, continue.")
|
||||||
|
|
||||||
self.del_in_es()
|
self.del_in_es()
|
||||||
self.delete_subtitles()
|
self.delete_subtitles()
|
||||||
|
Loading…
Reference in New Issue
Block a user