everettsouthwick / Eraserr

Python script for deleting unwatched or stale media from Plex servers using Radarr, Sonarr, and Overseerr.
GNU General Public License v3.0
24 stars 1 forks source link

Sonarr Dynamic Load #38

Closed abnersnell closed 1 year ago

abnersnell commented 1 year ago

Thank you for the latest updates! I have a handle on most of the changes but need additional info regarding "Sonarr Dynamic Load".

Can you elaborate on this feature? What do you mean by number of episodes to load?

Thanks again!

everettsouthwick commented 1 year ago

It fetches media ahead of where a current user is watching in a TV series and deletes media that has already been watched by the user. It takes into account multiple users watching the same show within the specified timeframe in watched_deletion_threshold, so if User A and User B are both watching Breaking Bad, it won't delete any episodes; just load future ones ahead of where the users are currently at in the series. This allows you to keep "thin" series on your Plex server that populate dynamically as someone watches a show and you don't have to have 100s of GBs sitting idle on your server not being watched.

It follows the exempt tags so if there is a show you watch specific episodes of often, you can add them to the exempt list and it won't use dynamic loading so your media can always be there to watch when you want.

For example, let's say episodes_to_keep = 2 and episodes_to_load = 3. You're watching the first season of a show:

image

The first episodes_to_keep of a show will never be deleted, so in this example deletion only starts when you start watching E6. This is to allow someone else to start watching the show and repeating the process all over with fetching the media dynamically and deleting as they watched. It will keep the last episodes_to_keep based on where the user is in watching the show as well.

abnersnell commented 1 year ago

Thank you for the details. This is a game changer regarding storage. I noticed when continuing shows are up for deletion, the first three episodes of the first season are kept and monitored in sonarr. This got me thinking about how new requests from Overseerr will work with dynamic loading. Do you see the first season all coming down originally and then pruned based on dynamic load? Again, this is awesome! Thanks for your hard work.

everettsouthwick commented 1 year ago

Thank you for the details. This is a game changer regarding storage. I noticed when continuing shows are up for deletion, the first three episodes of the first season are kept and monitored in sonarr. This got me thinking about how new requests from Overseerr will work with dynamic loading. Do you see the first season all coming down originally and then pruned based on dynamic load? Again, this is awesome! Thanks for your hard work.

Yeah, I foresee the request being fulfilled per the users request on Overseerr initially, and then it will delete it as they watch it. Then, when someone else wants to start watching it will have the first episode there (at least), and they'll start from S1E1 and it will grab it as they progress through the series.