debridmediamanager / zurg-testing

A self-hosted Real-Debrid webdav server you can use with Infuse. Together with rclone it can mount your Real-Debrid torrent library into your filesystem and load it to Plex or Jellyfin.
480 stars 36 forks source link

Bug: Repair doesn't seem to work #35

Closed Varming73 closed 9 months ago

Varming73 commented 9 months ago

After upgrading to 0.93 I see this in my log (just one example out of many):

2024-01-16T19:33:55.281Z WARN router Received a 503 Service Unavailable status code for file /Modern.Times.1936.1080p.BluRay.REMUX.AVC.FLAC.2.0-BLURANiUM.mkv 2024-01-16T19:33:55.281Z INFO manager Repairing torrent Modern.Times.1936.1080p.BluRay.REMUX.AVC.FLAC.2.0-BLURANiUM.mkv 2024-01-16T19:33:55.281Z INFO manager Torrent Modern.Times.1936.1080p.BluRay.REMUX.AVC.FLAC.2.0-BLURANiUM.mkv is in progress, skipping repair until download is done 2024-01-16T19:33:55.281Z INFO manager Finished repairing torrent Modern.Times.1936.1080p.BluRay.REMUX.AVC.FLAC.2.0-BLURANiUM.mkv 2024-01-16T19:33:55.282Z WARN router File Modern.Times.1936.1080p.BluRay.REMUX.AVC.FLAC.2.0-BLURANiUM.mkv is not available 2024-01-16T19:33:55.292Z WARN router File Modern.Times.1936.1080p.BluRay.REMUX.AVC.FLAC.2.0-BLURANiUM.mkv is not available 2024-01-16T19:33:55.302Z WARN router File Modern.Times.1936.1080p.BluRay.REMUX.AVC.FLAC.2.0-BLURANiUM.mkv is not available 2024-01-16T19:33:55.322Z WARN router File Modern.Times.1936.1080p.BluRay.REMUX.AVC.FLAC.2.0-BLURANiUM.mkv is not available 2024-01-16T19:33:55.343Z WARN router File Modern.Times.1936.1080p.BluRay.REMUX.AVC.FLAC.2.0-BLURANiUM.mkv is not available 2024-01-16T19:33:55.425Z WARN router File Modern.Times.1936.1080p.BluRay.REMUX.AVC.FLAC.2.0-BLURANiUM.mkv is not available 2024-01-16T19:33:55.436Z WARN router File Modern.Times.1936.1080p.BluRay.REMUX.AVC.FLAC.2.0-BLURANiUM.mkv is not available 2024-01-16T19:33:55.447Z WARN router File Modern.Times.1936.1080p.BluRay.REMUX.AVC.FLAC.2.0-BLURANiUM.mkv is not available 2024-01-16T19:33:55.458Z WARN router File Modern.Times.1936.1080p.BluRay.REMUX.AVC.FLAC.2.0-BLURANiUM.mkv is not available 2024-01-16T19:33:55.468Z WARN router File Modern.Times.1936.1080p.BluRay.REMUX.AVC.FLAC.2.0-BLURANiUM.mkv is not available 2024-01-16T19:33:55.479Z WARN router File Modern.Times.1936.1080p.BluRay.REMUX.AVC.FLAC.2.0-BLURANiUM.mkv is not available 2024-01-16T19:33:55.499Z WARN router File Modern.Times.1936.1080p.BluRay.REMUX.AVC.FLAC.2.0-BLURANiUM.mkv is not available 2024-01-16T19:33:55.510Z WARN router File Modern.Times.1936.1080p.BluRay.REMUX.AVC.FLAC.2.0-BLURANiUM.mkv is not available 2024-01-16T19:33:55.531Z WARN router File Modern.Times.1936.1080p.BluRay.REMUX.AVC.FLAC.2.0-BLURANiUM.mkv is not available

PS. I have no clue why my code block seem so messed up. In a text editor on my computer it looks as it should...

Varming73 commented 9 months ago

I just reverted to the previous version and that seems to repair some of the files the new version didn't. I'm not sure why it has started repairing those files now and not before I upgraded and downgraded. So far I've lost 200+ movies from this experiment so I would caution ppl from upgrading.

yowmamasita commented 9 months ago

What's the git commit of the version you're using?

Fyi zurg won't delete files unless it was replaced by working versions

Varming73 commented 9 months ago

Not completely sure what you are asking regarding the commit - I was running :latest when upgrading to v0.9.3

I have gone from 19xx movies to 169x movies after the up/downgrade so something has happend somehow. One thought though: That might be due to things happening in Zurg while Plex is scanning the library so I have to run several Plex scans to be sure what is correct regarding this.

Update: Plex has now scanned the missing movies. I guess that with 0.9.3 something changed that made it seem to Plex like movies where gone. It also seems like 0.9.2hotfix4 fixed the files that 0.9.3 did something to. They are now listed as recently added in Plex.

yowmamasita commented 9 months ago

This is how the new repair logic works:

Given a torrent, one of the files expire and can no longer be streamed If you are the only one who has that torrent, reinserting the whole torrent won't fix that one file If many other users have that torrent, and one of them redownloaded that 1 file that is already broken, reinsertion will now work

So as you can see from above, reinserting torrents work by chance

Now on 0.9.3 we want to do a surefire way of repairing torrents In order to do this, we just download 1 file at a time, all the time. After it finishes downloading, delete it immediately and then reinsert the original torrent

Varming73 commented 9 months ago

I'm not sure I understand the implication: Does that explain what I saw in the log for 0.9.3 (my first posting in this thread)?

I just upgraded again as I read between the lines that you still seem to think everything is as should be (crossing my fingers).

fatbob01 commented 9 months ago

i am also plagued with errors. These are just some examples showing up in the logs.

2024-01-17T19:17:24.425-0500 ERROR dlclient Client request error: Get "https://chi3.download.real-debrid.com/d/KTW5VSXPNDB4Q69/Border.Security.Americas.Front.Line.S02E01.Episode.1.1080p.NF.WEB-DL.DDP2.0.x264-PAAI.mkv": EOF

Missing opening '(' after keyword 'for'. At line:2 char:3

2024-01-17T19:18:33.875-0500 WARN router File Border.Security.Americas.Front.Line.S02E14.Episode.14.1080p.NF.WEB-DL.DDP2.0.x264-PAAI.mkv cannot be unrestricted (link=https://real-debrid.com/d/IGIR5TCKNMYDUJ5KCGOYQDFUDM)

2024-01-17T19:18:45.274-0500 ERROR dlclient Client request error: Get "https://chi8.download.real-debrid.com/d/XCWU32PCRPNQI20/Border.Security.Americas.Front.Line.S01E02.1080p.NF.WEB-DL.DDP2.0.x264-QOQ.mkv": read tcp 192.168.2.2:2075->212.102.58.119:443: wsarecv: An existing connection was forcibly closed by the remote host. 2024-01-17T19:18:33.876-0500 INFO manager Repairing torrent Border.Security.Americas.Front.Line.S02.1080p.NF.WEBRip.DDP2.0.x264-PAAI[rartv] 2024-01-17T19:18:33.876-0500 WARN router File Border.Security.Americas.Front.Line.S02E14.Episode.14.1080p.NF.WEB-DL.DDP2.0.x264-PAAI.mkv is not available

kudddyyy commented 9 months ago

I also get this "cannot be unrestricted" but the file system keeps trying to open it, leads to unstabilities

yowmamasita commented 9 months ago

Please test v0.9.3-hotfix.1 I've fixed this