rogerfar / rdt-client

Real-Debrid Client Proxy
MIT License
835 stars 108 forks source link

Files being downloaded twice #39

Closed Oorweeg closed 3 years ago

Oorweeg commented 3 years ago

Been offline for a few weeks and back online today and pull docker image 1.6.3. Added two downloads through Sonarr and with both torrents RDT-Client generated two copies of each of the download links for each file in the torrent and downloaded each file twice. Not sure if this is the same issue that was fixed in 1.6.3, but if it is it doesn't Seem to be fixed?

rogerfar commented 3 years ago

I unfortunately experienced this too once the other day... It's a very specific condition, hard to debug.

rogerfar commented 3 years ago

I added more checks so this shouldn't happen anymore in 1.7.1

Oorweeg commented 3 years ago

I'm seeing stuff stuck on 'Torrent waiting for file selection' with 0 files selected for download, and 'Queued for unpacking' with only some of the files selected but even those don't seem to get unpacked? See lots of the below in the logs?

[13:54:13 ERR] Unexpected error occurred in TorrentDownloadManager.Tick
System.Exception: {
    "error": "parameter_missing",
    "error_details": "{link} is missing",
    "error_code": 1
}
   at RDNET.RdNetClient.Post[T](String url, KeyValuePair`2[] data, Boolean repeatRequest)
   at RDNET.RdNetClient.UnrestrictLinkAsync(String link, String password, Boolean remote)
   at RdtClient.Service.Services.Torrents.UnrestrictLink(Guid downloadId) in /appserver/RdtClient.Service/Services/Torrents.cs:line 257
   at RdtClient.Service.Services.TorrentRunner.Tick() in /appserver/RdtClient.Service/Services/TorrentRunner.cs:line 238
   at RdtClient.Service.Services.TaskRunner.ExecuteAsync(CancellationToken stoppingToken) in /appserver/RdtClient.Service/Services/TaskRunner.cs:line 36
rogerfar commented 3 years ago

Are those perhaps older torrents that were added before you upgraded? That seems to cause some issues, if you hit retry on those it should solve it.

Oorweeg commented 3 years ago

Are those perhaps older torrents that were added before you upgraded? That seems to cause some issues, if you hit retry on those it should solve it.

These were added over the weekend and the last day or two so since 1.7.1. I've hit the retry on a couple but seems to stay in the same state?

rogerfar commented 3 years ago

That is odd, {link} is missing in the UnrestrictLinkAsync function indicates that it's trying pass in an empty link, but the links come from the torrent itself, before unrestricting. Can you send me the torrent in a pastebin?

Oorweeg commented 3 years ago

Is there an easy way to get the. original magnet link as these were added by sonarr/radarr or would the name and hash from RelDebrid be enough?

That is odd, {link} is missing in the UnrestrictLinkAsync function indicates that it's trying pass in an empty link, but the links come from the torrent itself, before unrestricting. Can you send me the torrent in a pastebin?

rogerfar commented 3 years ago

If you know which torrent it is in sonarr or radarr, you can go to the original page if you click on the name in the search dialog in radarr or sonarr.

Or if you open the Console (F12), go to the network tab, refresh RDT client, you will see a request called "Torrents", click on it, check the "Preview" tab, there is a property called fileOrMagnet: image

Oorweeg commented 3 years ago

Slid into your DMs

rogerfar commented 3 years ago

Sorry, I'm not that familiar with GH, does GH have a DM feature?

Oorweeg commented 3 years ago

Sorry, I'm not that familiar with GH, does GH have a DM feature?

Twitter :)

Oorweeg commented 3 years ago

I couldn't even start these from RealDebrid itself, so ended up just wiping them all out and starting again, all seems fine now so seems like something got stuck on the RDB end tbh. Probably not worth putting much more time into at this point so I will close this down. ¯_(ツ)_/¯

rogerfar commented 3 years ago

I had a look at it last night but couldn't figure it out, it downloaded fine for me immediatly.

I suspect there is something goofy going on sometimes when RD transfers the files from their torrent machines to like a download server.