itsToggle / plex_debrid

Plex torrent streaming through Debrid Services
1.5k stars 128 forks source link

[Suggestion] Limit downloads on Real-Debrid #90

Closed ghost closed 2 years ago

ghost commented 2 years ago

Hey There,

You are amazing as always and your script is helping me and saving ton of times. Thanks for developing this script and helping us avoiding streaming hassle and those expensive streaming packs. I was recently using CinemaHD app which does have an option to limit only fetching the clicked link of the torrent we wished to watch and hence eliminating the numerous downloads in my downloads list. Do we have something like this here? I mean one series one episode will have only one exact entry depending on the settings (like some people may have two versions of the same file HDR and SDR) but those who don't specify any such, can get more clean and lesser downloads in my download list? If we have this feature then great and apologies for creating this thread. Because I was just cleaning my downloads and found more than 700 tabs to clear the downloads from. Took me a while to clear it as it exposes my server IP.

itsToggle commented 2 years ago

Hey! Thanks so much for the donation, I'll put it to good use! You are very generous :)

These 700 links are most likely from the time you used the official realdebrid WebDAV. Using plex_debrid and my rclone fork will drastically reduce that amount:

Realdebrid is not a normal cloud service, accessing their files is a bit more complex. On realdebrid, you have a "downloads" and a "torrents" section. The "torrents" section contains your downloaded torrents. Each torrent contains a list of restricted links to the torrents files. To open one of those files, you need to unrestrict its link. All your unrestricted links can be found in the "downloads" section. Unrestricted links are deleted and deactivated after 7 days. Torrents and their restricted links stay in your "torrents" section forever. Note however, that you need to have unrestricted links in your downloads section to open any of your files.

Mounting realdebrid with my rclone fork will do the following: Whenever you want to open a file, my rclone fork will check if you already have an unrestricted link to that file somewhere in your entire downloads section. If there is no corresponding unrestricted link, my rclone fork will generate a new unrestricted link. You will never have more links in your downloads section than you have files in your torrents sections.

Mounting realdebrid through their WebDAV will do the following: Whenever you want to open a file, the webdav will only check your latest 1000 unrestricted links from downloads section. If there is no corresponding unrestricted link, which is most likely the case if you have more than 1000 files, the webdav server will create new unrestricted links for those files. But since now some files will not have a corresponding link any more, the webdav will create new unrestricted links for these files. This goes on forever, and you end up with an unreasonable amount of pages in your downloads section, like you did.

When you download a new movie/season/episode with plex_debrid, only one torrent is added to your torrents section. For each file of that torrent, 1 unrestricted link will be added to your downloads section.

I hope this clears things up a bit :)

ghost commented 2 years ago

Very well explained and more than happy for you to close this issue. Thanks for well explained answer to my query.