LivingWithHippos/unchained-android

[FEATURE REQUEST] Keep local history of downloads instead of torrents only

Invictaz opened this issue · 7 comments

My Real Debrid had just a few hours left on the clock so I renewed my subscription. However all downloads seem to be wiped. Also from the website. This is quite a problem. I was hoping they still would be in Unchained but they are gone as well. I'm hoping Unchained can keep (on request) a local cache of all the entered links so the user can choose to submit them again to Unchained. Or mark the ones that get deleted from Unchained as "Archived" so users know that they are not on the Real Debrid account anymore but can be resubmitted. After all, the torrents are still saved but the downloads do not?

Screenshot_20240402_201500_Unchained

I'll try copying some downloads and then deleting them, to check if they still work and for how long. A cache would be useful for other things too

I simply fail to understand why the torrents are still listed in my app from ages ago but the downloads are not. Can you explain? Maybe you want to combine this with the merger of the two tabs @LivingWithHippos ?

Downloads are temporary links linked to your account, while torrents are linked to the files themselves so unless somebody request real debrid to remove them they'll stay up

Downloads are temporary links linked to your account, while torrents are linked to the files themselves so unless somebody request real debrid to remove them they'll stay up

I partly understand that, because the torrent can be removed from the site as well, but can be continued outsite the app if you have the magnet link and DHT. The magnet now simply is stored in Unchained's app cache?

Second: what information is stored on torrents and downloads?

The original site url so 1fichier.com/download.mp4 or (only) the real-debrid.com/account/download.mp4?

And with torrents

torrentsite.com/download.magnet or the real-debrid.com/magnet ?

If the information from the original site is stored in Unchained (1fichier.com/download.mp4) then it would be easy to resubmit it to realdebrid so it can be linked to the account again. With torrents the same. If the original url from the magnet can be resubmitted to Real Debrid to pick up the download again. This is already partially possible when there is a "magnet error" for which a retry option was possible in previous Unchained versions.

Downloads are temporary links linked to your account, while torrents are linked to the files themselves so unless somebody request real debrid to remove them they'll stay up

I also think that in order to avoid duplicates Real-Debrid uses some sort of de-duplication based on hash. Dropbox does that already for years because server costs are very high. So if a user adds episode.mp4 to Real-Debrid from website A and another user adds the same episode.mp4 from website B the same file is served without the user knowing. That also explains the extremely fast serving of files. Real-Debrid has a premium subscription on various sites but them being available almost instantly explains that they cache a lot already. I'm thinking like Netflix, which hosts their files on multiple CDN's close to your ISP or internet exchanges.

You can check on https://api.real-debrid.com/
What can be retrieved from the torrents and downloads.
For downloads it's

[
    {
        "id": "string",
        "filename": "string",
        "mimeType": "string", // Mime Type of the file, guessed by the file extension
        "filesize": int, // bytes, 0 if unknown
        "link": "string", // Original link
        "host": "string", // Host main domain
        "chunks": int, // Max Chunks allowed
        "download": "string", // Generated link
        "generated": "string" // jsonDate
    },
    {
        "id": "string",
        "filename": "string",
        "mimeType": "string",
        "filesize": int,
        "link": "string",
        "host": "string",
        "chunks": int,
        "download": "string",
        "generated": "string",
        "type": "string" // Type of the file (in general, its quality)
    }
]

So the original link should be available

@LivingWithHippos If the original link is available and the main window of unchained shows 0 days available it should be necessary that the download can be resubmitted. However, the API shows that the original link is available, but I don't see it in my real-debrid.com website. There isn't a date or timelimit seen so it must have been wiped for unknown reasons, as I continued my subscription before the counter reached 0 hours. The only reason I can think of is that they wipe accounts with 0 days (but a few hours) left?

Or, they wipe all data on account continuaton?

Whatever happened, the original link and generated link should be preserved in Unchained. It would be a fun experiment to see if the generated link lives on after the account reaches 0 days.