mirror of
https://github.com/meeb/tubesync.git
synced 2025-06-24 22:16:37 +00:00
Merge pull request #700 from tcely/patch-4
Some checks are pending
Run Django tests for TubeSync / test (3.10) (push) Waiting to run
Run Django tests for TubeSync / test (3.11) (push) Waiting to run
Run Django tests for TubeSync / test (3.12) (push) Waiting to run
Run Django tests for TubeSync / test (3.7) (push) Waiting to run
Run Django tests for TubeSync / test (3.8) (push) Waiting to run
Run Django tests for TubeSync / test (3.9) (push) Waiting to run
Run Django tests for TubeSync / containerise (push) Waiting to run
Some checks are pending
Run Django tests for TubeSync / test (3.10) (push) Waiting to run
Run Django tests for TubeSync / test (3.11) (push) Waiting to run
Run Django tests for TubeSync / test (3.12) (push) Waiting to run
Run Django tests for TubeSync / test (3.7) (push) Waiting to run
Run Django tests for TubeSync / test (3.8) (push) Waiting to run
Run Django tests for TubeSync / test (3.9) (push) Waiting to run
Run Django tests for TubeSync / containerise (push) Waiting to run
Remove subtitles also
This commit is contained in:
commit
dd079638d6
@ -226,6 +226,11 @@ def media_post_delete(sender, instance, **kwargs):
|
||||
other_path = video_path.with_suffix(f'.{suffix}').resolve()
|
||||
log.info(f'Deleting file for: {instance} path: {other_path!s}')
|
||||
delete_file(other_path)
|
||||
# subtitles include language code
|
||||
subtitle_files = video_path.parent.glob(f'{glob_quote(video_path.with_suffix("").name)}*.vtt')
|
||||
for file in subtitle_files:
|
||||
log.info(f'Deleting file for: {instance} path: {file}')
|
||||
delete_file(file)
|
||||
# Jellyfin creates .trickplay directories and posters
|
||||
for suffix in frozenset(('.trickplay', '-poster.jpg', '-poster.webp',)):
|
||||
# with_suffix insists on suffix beginning with '.' for no good reason
|
||||
|
Loading…
Reference in New Issue
Block a user