shemanaev / jellyfin-plugin-media-cleaner

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

[Feature]: Keep For Duration Resetting #31

Closed JamsRepos closed 7 months ago

JamsRepos commented 10 months ago

Describe the feature you'd like added

The ability for the "keep for" to reset when a user watches it. For example;

User A watches a movie and recommends User B to go and watch it. User B can't watch it until next week, the "Keep for" is set to 5 days. User C finds the movie on Jellyfin and watches it 3 days later after User A, thus resetting the 5 day timer. User B comes to finally watch the movie 7 days after User A watches it, and it's still there as User C reset the timer.

Additional context

This essentially allows multiple users to watch something without it deleting on them when they're mid watching, as someone else watched it first. Also, if the content hasn't been watched by anyone, this logic would still apply. So if no one watches anything after the "keep for" it would be deleted.

shemanaev commented 10 months ago

Good catch! Honestly, this is how it should've been done in the first place. Right now I search for any played state, but should use only the latest one.

Also, if the content hasn't been watched by anyone, this logic would still apply. So if no one watches anything after the "keep for" it would be deleted.

For that part you mean media should be deleted after "keep for" days from date added to library?

shemanaev commented 10 months ago

Also, what your thoughts on any in-progress playbacks in this scenario? Like User D watched half of movie. I think it should also reset the timer?

JamsRepos commented 10 months ago

For that part you mean media should be deleted after "keep for" days from date added to library?

Yes, if no one has watched it from the date added into the library. To remove unpopular/unwatched content as otherwise you'd have a build up of content that's never watched.

Also, what your thoughts on any in-progress playbacks in this scenario? Like User D watched half of movie. I think it should also reset the timer?

It should reset each time a playback session has been started on the media in my opinion, as that shows someone has an interest in that specific file. Of course, in a very ideal world, you'd want to only count it if someone's watched for more than 10% in a session, as they could've accidentally played it but I feel that logic might not exist with the API unless using something like the Playback Reporting plugin.

shemanaev commented 10 months ago

if someone's watched for more than 10% in a session

AFAIK, that will handle Jellyfin itself and don't mark as played based on settings.

Yes, if no one has watched it from the date added into the library. To remove unpopular/unwatched content as otherwise you'd have a build up of content that's never watched.

This is rather more work than I thought and I can't do it right now, so will be future feature.

Otherwise, a new version has been released with an option under "Keep while not played by".

JamsRepos commented 10 months ago

Rapid! Thank you for this, this was stopping me from using this plugin.

This is rather more work than I thought and I can't do it right now, so will be future feature.

This is unfortunate but it's not the end of the world. Definetely something people will benefit from in the future.

I may PR some translational changes as i've seen a few issues regarding explanation of what items do, so I think once i've got using this plugin i'll suggest some new wording as when looking to use this plugin, I myself got confused until I asked someone already using the plugin.

shemanaev commented 10 months ago

I may PR some translational changes as i've seen a few issues regarding explanation of what items do, so I think once i've got using this plugin i'll suggest some new wording as when looking to use this plugin, I myself got confused until I asked someone already using the plugin.

Will highly appreciate it. I can't find right ones sometime as non-native speaker 😄

JamsRepos commented 8 months ago

This is rather more work than I thought and I can't do it right now, so will be future feature.

Has there been much of a progress on this at all? As I'd like to utilise this plugin but don't want a massive build up of unrelated content.

bleak183 commented 7 months ago

This is rather more work than I thought and I can't do it right now, so will be future feature.

For what it's worth, I would also appreciate this feature quite a bit.

JamsRepos commented 7 months ago

This is rather more work than I thought and I can't do it right now, so will be future feature.

For what it's worth, I would also appreciate this feature quite a bit.

I have found an alternative solution so far being https://github.com/Schaka/janitorr however i'd like to keep it contained within Jellyfin itself ideally, i'll look into the setup of janitorr for now until this plugin sees progress.

bleak183 commented 7 months ago

This is rather more work than I thought and I can't do it right now, so will be future feature.

For what it's worth, I would also appreciate this feature quite a bit.

I have found an alternative solution so far being https://github.com/Schaka/janitorr however i'd like to keep it contained within Jellyfin itself ideally, i'll look into the setup of janitorr for now until this plugin sees progress.

I saw that but I don't love it tbh. I'd much rather have it integrated into media cleaner if possible.

JamsRepos commented 7 months ago

This is rather more work than I thought and I can't do it right now, so will be future feature.

For what it's worth, I would also appreciate this feature quite a bit.

I have found an alternative solution so far being https://github.com/Schaka/janitorr however i'd like to keep it contained within Jellyfin itself ideally, i'll look into the setup of janitorr for now until this plugin sees progress.

I saw that but I don't love it tbh. I'd much rather have it integrated into media cleaner if possible.

Deffo the best case scenario so fingers crossed for development on this side 🙏

shemanaev commented 7 months ago

https://github.com/shemanaev/jellyfin-plugin-media-cleaner/issues/24#issuecomment-1962867628