shemanaev / jellyfin-plugin-media-cleaner

Automatically delete played media files after specified amount of time.
MIT License
71 stars 1 forks source link

[Feature]: Remove video along with associated files of my choice #12

Open Yankees4life opened 1 year ago

Yankees4life commented 1 year ago

Describe the feature you'd like added

When a video gets deleted with this plugin, I would like for the associated files to be deleted as well (srt, edl, json, jpg) since I have no need for it as I already watched the video and the video is already off of my hard drive. Cheers

Additional context

No response

shemanaev commented 1 year ago

The plugin delegates all delete tasks to Jellyfin itself, and it should delete all associated files as long as they recognized by Jellyfin (named properly). And in my observation at least subtitles and external audio are properly deleted. Here is the list of extensions handled by Jellyfin:

https://github.com/jellyfin/jellyfin/blob/cc3d08759e7daf77a946a827dcc1b0482c647f03/MediaBrowser.Controller/Entities/BaseItem.cs#L49-L66

If you manually delete video from Jellyfin (like in web interface) but associated files still present, it might be a bug in Jellyfin.

Deleting unrecognized files on the other hand could be tricky as there can be mixed libraries of all kinds. And for this case, I don't have an opinion on a right behavior yet.