mirror of
https://github.com/tubearchivist/tubearchivist.git
synced 2024-10-14 01:37:15 +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:
|
||||
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.delete_subtitles()
|
||||
|
Loading…
Reference in New Issue
Block a user