mirror of
https://github.com/Cleanuparr/Cleanuparr.git
synced 2026-02-04 12:25:44 -06:00
[FEATURE] Prevent/strike download before aired/released date #54
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ztevo on GitHub.
What would you like to see implemented next?
Hi. I'm not sure how achievable this would be and if it fits in with Cleanuparr's M.O., but...
Idea
A setting to prevent (or strike) downloads, where they are downloading/importing BEFORE the official release/air date of the content (according to TVDB/TMDB).
i.e. something to ensure you only get episodes/movies after their scheduled release/air date.
This would be especially useful for Sonarr, where the Devs have been clear they don't intend to offer such functionality (NB it is a Radarr function and works well).
Ideally, the TV and movie settings could be controlled independent of each other.
Rationale
There are an increasing number of "fake" torrents posted for popular series, typically being uploaded a couple of days before the air date of a new episode.
Cleanuparr is doing a great job of removing any malicious files from torrents in this scenario - but bandwidth and storage is wasted where (unwanted/fake media) files are downloaded anyway.
This feature would compliment Cleanuparrs feature set, and provide a strong control not offered anywhere else for Sonarr.
Further background
Requested MANY times on Sonarr GitHub, Sonarr Community, Reddit etc. Here are just a few:
https://github.com/Sonarr/Sonarr/issues/7690 (active/open)
https://github.com/Sonarr/Sonarr/issues/7731
https://github.com/Sonarr/Sonarr/issues/7578
https://github.com/Sonarr/Sonarr/issues/5312
https://github.com/Sonarr/Sonarr/issues/5113
https://github.com/Sonarr/Sonarr/issues/4108
https://github.com/Sonarr/Sonarr/issues/969
@Flaminel commented on GitHub:
Hi!
Isn't this already happening with the latest version of Sonarr? At least for me, items have been stuck at the importing phase because the release date was before or very close to when it was downloaded. Also if this was implemented in Cleanuparr, this seems like it could potentially remove valid downloads, but I am not sure. However I am open to discussion and suggestions on how it would actually work.
The content blocker can run every 5 seconds (or as close as possible to that, depending on how much time it takes to complete a run) to specifically prevent stuff from being downloaded. Have you tried lowering the schedule time?
@DemirInce commented here and deleted his comment. I wonder what his deal is. 😃
@Flaminel commented on GitHub:
@TheMangrove Thanks for engaging on this topic, but I feel like what you're proposing is not something that can be done by Cleanuparr or any external app, but rather in Sonarr/Radarr itself, but if you know of a way to implement this, I'm open to debate.
To expand on what your suggestion, Sonarr/Radarr already have a
delay profileor something like that, which I think does not work the way people intend to use it. There is no way to tell the arrs not to search for something and wait for an X amount of time before doing so. At the very most, what could be done is to unmonitor the item and monitor it after that X amount of time has passed. However, I don't think this approach would work at all if you're using Overseerr/Jellyseer and you're triggering a search right after a movie has been added - if malware downloads are available, they will be grabbed, right?@Flaminel commented on GitHub:
I'm going to need help to build this out when I get to it. It's going to require bouncing ideas back and forth until we get to an optimal solution.
If anyone else is interesting in this, please add your suggestions bellow.
@ztevo commented on GitHub:
Hah I saw that - perhaps hadn't noticed was the Cleanuparr github and not the Sonarr one! I think some Sonarr users are frustrated, as the feature has been requested many times (the links shared above should outline why people want it, and why the devs are not keen).
Not unless something has changed very recently. In fact just yesterday I've had the same issue happen again, where Sonarr imported a new episode of something that hasn't yet aired. When I opened the file, it was just a random video clip (nothing to do with the series) - so it slipped through the Cleanuparr net!
This is what triggered the enhancement idea, as I had just installed v2.
I think this is one of the key arguments of the Sonarr devs. If an episode is leaked early (or an episode release/air date is incorrect in TMDB), then "real" episodes could be accidentally blocked.
The argument back would be - this should be an optional setting (and not enabled by default).
My idea of using the "strike" system was to fit in with the Cleanuparr concept. Personally - I would prefer that files aren't blacklisted (in case they are valid files), but rather that any download is prevented until the air date. But not being a developer, I am not sure what is within the realms of possibility!
@TheMangrove commented on GitHub:
Thank you for looking into this. I've seen a rash of people uploading fake/malware to public trackers as TV shows early, specifically knowing that it will trigger Sonarr/Radarr grabs since there are few competing torrents. It's not a perfect solution, but it will filter out a common method currently being used.
My only suggestion would be some level of granularity. As pointed out, some TV shows do release early, but in my experience it's usually only early by a day, and is often just a time zone difference. It would be nice to have the ability to tell Sonarr, ignore grabs if the official release is more than "X hours" or "X days" in the future. This would let the user decide if they want to add in a buffer to account for early release. Alternatively it could be implemented as "Ignore until official release time + or - x hours", so you could even set it to wait a few hours before downloading to give time for the better releases to weed out the bad ones since often the releases all meet the quality profile criteria, and the reason the bad ones are ignored is because they're simply not as popular.
@h3kt0rx commented on GitHub:
Would it be possible to scan every 5 seconds with the content blocker for active downloads and then scrape the video air date and check against the current time/date? Then add to blocklist in Radar/Sonarr+Remove torrent. A single checkbox in the content blocker section?
Edit: Obviously not scraping that often, but caching the air date or something like that.
Or check for grabs in the logs of Sonarr/Radarr?
@mdrayner commented on GitHub:
Saw that this will be targeted for v5 of Sonarr: https://github.com/Sonarr/Sonarr/issues/969#issuecomment-3089613065 so probably not worth putting the work in to do it here any more
@Flaminel commented on GitHub:
@h3kt0rx That's a great idea and it just might work, but with a caveat: the user would have to use another app to search for a replacement, as Cleanuparr can trigger a search only after removing an item.
@Flaminel commented on GitHub:
@mdrayner thanks for the heads-up! It's nice to see they're going to address this huge issue.
@TheMangrove commented on GitHub:
@Flaminel To be completely honest, I found this thread while browsing this issue on the Sonarr github and didn't realize I had linked out to a different repository until after I submitted the comment. At that point I figured it was worth leaving up in case there was a way for Cleanuparr to implement it, but I agree it's probably something that would need to be implemented internally.
It's somewhat frustrating that the Sonarr devs keep refusing to consider implementing it using the reason that it's not a perfect solution bad uploads since it seems like this issue is getting worse. It's pretty obvious that a lot of these fake torrents are being added specifically in a manner that exploits and trigger Sonarr to grab it - as they consistently upload the fake episodes 3-4 days early, when there are no competing torrents,. So regardless if it's not going to solve all possible methods of attack, it's certainly a vector that's being actively exploited and the delay would effectively cut it out at the knees. I'm also getting these bad torrents from what most people consider are reputable trackers (though I've since disabled those trackers), so it's not simply a case of using dodgy trackers.
Looking at delay profile, I think you're right. It triggers as soon as the first upload is detected, so it's not going to work well when these torrents are being added three to four days in advance (unless you perpetually want to be a week behind on your TV shows).
Most of the time this is being done for TV shows that are monitored, so far I haven't seen it for movies - though I'm sure it's being exploited in the same fashion. While I could un-monitor all my TV shows, that somewhat defeats the purpose of using the arr's to begin with if now need to track the episode release dates and trigger all the searches manually.
Anyways, that's my rant, and apologies for the confusion.
@ztevo commented on GitHub:
Great news! Thanks for the update. Maybe our ideas helped play a little part in that!
@Flaminel Thanks again for having considered this for Cleanuparr (I'm sure it would not have been a quick or easy build).
@Flaminel commented on GitHub:
@ztevo no problem! I'm going to keep this open just in case we ever need to look into it, but we'll wait to see how Sonarr fixes it.