rogerfar / rdt-client

Real-Debrid Client Proxy
MIT License
897 stars 113 forks source link

Alldebrid problem with multipart RARs #425

Closed janaxhell closed 2 months ago

janaxhell commented 8 months ago

What version are you using? Version 2.0.62

Wat OS are you running? Open Media Vault 6

Are you using Docker or as a service? Yes

Which debrid provider are you using? Alldebrid

Which downloader are you using? Radarr

Please attach a log file here with the log setting set to debug No error message or anything at all in the logs while this happens. The last line (hours earlier than the event) is 2024-02-24T10:07:44.457454379Z [10:07:44 WRN] 403: /Api/Authentication/IsLoggedIn

When Radarr finds a matching torrent that contains a multipart RAR this is what happens: for example, Radarr matches Death.Duel.1977.RERiP.1080p.BluRay.x264-REGRET and triggers RDTclient. RDTclient triggers Alldebrid to download it. What arrives at Alldebrid is this:

Sample/death.duel.1977.rerip.1080p.bluray.x264-regret.sample.mkv
Subs/death.duel.1977.rerip.1080p.bluray.x264-regret.subs.rar
death.duel.1977.rerip.1080p.bluray.x264-regret.rar
Proof/death.duel.1977.rerip.1080p.bluray.x264-regret.proof.jpg
Subs/death.duel.1977.rerip.1080p.bluray.x264-regret.subs.sfv
death.duel.1977.rerip.1080p.bluray.x264-regret.nfo
death.duel.1977.rerip.1080p.bluray.x264-regret.r00
death.duel.1977.rerip.1080p.bluray.x264-regret.r01
death.duel.1977.rerip.1080p.bluray.x264-regret.r02
death.duel.1977.rerip.1080p.bluray.x264-regret.r03
death.duel.1977.rerip.1080p.bluray.x264-regret.r04
death.duel.1977.rerip.1080p.bluray.x264-regret.r05
death.duel.1977.rerip.1080p.bluray.x264-regret.r06
death.duel.1977.rerip.1080p.bluray.x264-regret.r07
death.duel.1977.rerip.1080p.bluray.x264-regret.r08
death.duel.1977.rerip.1080p.bluray.x264-regret.r09
death.duel.1977.rerip.1080p.bluray.x264-regret.r10
death.duel.1977.rerip.1080p.bluray.x264-regret.r11
death.duel.1977.rerip.1080p.bluray.x264-regret.r12
death.duel.1977.rerip.1080p.bluray.x264-regret.r13
death.duel.1977.rerip.1080p.bluray.x264-regret.r14
death.duel.1977.rerip.1080p.bluray.x264-regret.r15
death.duel.1977.rerip.1080p.bluray.x264-regret.r16
death.duel.1977.rerip.1080p.bluray.x264-regret.r17
death.duel.1977.rerip.1080p.bluray.x264-regret.r18
death.duel.1977.rerip.1080p.bluray.x264-regret.r19
death.duel.1977.rerip.1080p.bluray.x264-regret.r20
death.duel.1977.rerip.1080p.bluray.x264-regret.r21
death.duel.1977.rerip.1080p.bluray.x264-regret.r22
death.duel.1977.rerip.1080p.bluray.x264-regret.r23
death.duel.1977.rerip.1080p.bluray.x264-regret.r24
death.duel.1977.rerip.1080p.bluray.x264-regret.r25
death.duel.1977.rerip.1080p.bluray.x264-regret.r26
death.duel.1977.rerip.1080p.bluray.x264-regret.r27
death.duel.1977.rerip.1080p.bluray.x264-regret.r28
death.duel.1977.rerip.1080p.bluray.x264-regret.r29
death.duel.1977.rerip.1080p.bluray.x264-regret.r30
death.duel.1977.rerip.1080p.bluray.x264-regret.r31
death.duel.1977.rerip.1080p.bluray.x264-regret.r32
death.duel.1977.rerip.1080p.bluray.x264-regret.r33
death.duel.1977.rerip.1080p.bluray.x264-regret.r34
death.duel.1977.rerip.1080p.bluray.x264-regret.r35
death.duel.1977.rerip.1080p.bluray.x264-regret.r36
death.duel.1977.rerip.1080p.bluray.x264-regret.r37
death.duel.1977.rerip.1080p.bluray.x264-regret.r38
death.duel.1977.rerip.1080p.bluray.x264-regret.r39
death.duel.1977.rerip.1080p.bluray.x264-regret.r40
death.duel.1977.rerip.1080p.bluray.x264-regret.r41
death.duel.1977.rerip.1080p.bluray.x264-regret.r42
death.duel.1977.rerip.1080p.bluray.x264-regret.r43
death.duel.1977.rerip.1080p.bluray.x264-regret.r44
death.duel.1977.rerip.1080p.bluray.x264-regret.r45
death.duel.1977.rerip.1080p.bluray.x264-regret.r46
death.duel.1977.rerip.1080p.bluray.x264-regret.r47
death.duel.1977.rerip.1080p.bluray.x264-regret.r48
death.duel.1977.rerip.1080p.bluray.x264-regret.r49
death.duel.1977.rerip.1080p.bluray.x264-regret.r50
death.duel.1977.rerip.1080p.bluray.x264-regret.r51
death.duel.1977.rerip.1080p.bluray.x264-regret.r52
death.duel.1977.rerip.1080p.bluray.x264-regret.r53
death.duel.1977.rerip.1080p.bluray.x264-regret.r54
death.duel.1977.rerip.1080p.bluray.x264-regret.r55
death.duel.1977.rerip.1080p.bluray.x264-regret.r56
death.duel.1977.rerip.1080p.bluray.x264-regret.r57
death.duel.1977.rerip.1080p.bluray.x264-regret.sfv

But in RDTclient it's imported as 3 archives + 1 sample.mkv file 1 archive is the subs 1 archive is the FIRST *.rar file of the batch (-> death.duel.1977.rerip.1080p.bluray.x264-regret.rar) 1 archive is a big ZIP containing all the other .r0X files. (so the .r0X files are not together with FIRST .rar)

At this point RDTclient unpacks .r0X files in the ZIP to a subfolder (something like \d4013af0-fc4d-4890-9b3e-b798282e1075), then again it unpacks the .r0X files themselves to a .mkv file inside the same subfolder, ignoring the FIRST .rar file outside the subfolder. When unpacking is finished, Radarr tries to import the MKV, which is incomplete and fails, RDTclient deletes it, and what remains are the .subs archive, the FIRST .rar archive and the sample.mkv file.

I have tried to add a 15 mins delay in Radarr to let RDTclient do its things, but it's not a problem of timing, it's a problem of folder structure. The FIRST .rar file is excluded from the unpacking and makes it impossible to automate the downloading of multipart RARs from Alldebrid. I don't understand why the .r0X are put inside a ZIP. They are not inside a ZIP on Alldebrid, they appear free at the same level of FIRST .rar. They are put in a ZIP only when they are added to RDTclient.

Also, unrelated side note, I've tried to Exclude sample file with this RegEx ^(?!.*sample).*$ but it keeps downloading it.

GreysonMannix commented 8 months ago

@janaxhell

This is Alldebrid standard behavior unfortunately. Not sure why they do this destructive repacking.

It's exactly the same if you download from the web interface with the download button; you will be asked to download the first RAR and the others in a zip file.

rdtclient should handle this behavior as I don't think it can be disabled.

janaxhell commented 8 months ago

@GreysonMannix

I tried to ask them as well, they said they are looking into it, but I don't think so. This has been happening for months now.

GreysonMannix commented 8 months ago

@janaxhell

I asked them as well today. They are not going to change it or implement a way to disable it.

rogerfar commented 2 months ago

Unfortunately at the moment nothing I can change, but in the next versions I will try and see if we can solve multi-level packs.