Remove subtitles also

Fixes #416
This commit is contained in:
tcely authored and GitHub committed 2025-02-09 02:21:16 -05:00
1 parent 8d89cc01f9
commit 4dbb0c5196
1 file changed
+1 -1
+1 -1
View File
@@ -221,7 +221,7 @@ def media_post_delete(sender, instance, **kwargs):
video_path = Path(str(instance.media_file.path)).resolve()
instance.media_file.delete(save=False)
# the other files we created have these known suffixes
for suffix in frozenset(('nfo', 'jpg', 'webp', 'info.json',)):
for suffix in frozenset(('nfo', 'jpg', 'webp', 'vtt', 'info.json',)):
other_path = video_path.with_suffix(f'.{suffix}').resolve()
log.info(f'Deleting file for: {instance} path: {other_path!s}')
delete_file(other_path)