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.
504 stars 39 forks source link

Bug: Zurg keeps redownloading a downloaded torrent #102

Open 6days9weeks opened 7 months ago

6days9weeks commented 7 months ago

Expected Behavior It's already in rd downloaded and can be streamed but zurg is trying to repair it when it's not needed to

Actual Behavior Keeps repairing and redownloading torrents when not necassry

Detailed Steps Detail out everything that you did leading up to the issue. Include any relevant setup information that we should know about.

Operating System What OS are you running? (e.g., Windows, macOS, Linux) Linux

Environment Setup Are you using Docker, or are you using Zurg's binary? If Docker, please include your docker-compose.yml. If Zurg's binary, specify the version by running ./zurg version v0.9.3-hotfix.11 Logs Upload your logs by going to http://ZURGIP:9999/logs/upload and paste the link here https://0x0.st/Xi7w.log If you are running it in Docker, your container logs will also help.

Rclone Configuration Attach or detail your rclone.conf.

Zurg Configuration Include your config.yaml or any other relevant configuration files.

Screenshots If applicable, add screenshots to help explain your problem.

6days9weeks commented 7 months ago

Zurg keeps adding the torrent in a loop and tries to repair. The loop never ends. Keeps adding and removing when I can stream it fine on rd.

drahmed86 commented 7 months ago

The same here for some files

6days9weeks commented 7 months ago

any updates..?

yowmamasita commented 7 months ago

It seems to be that there are "ghost" torrents added when repairing a torrent

I dont know why this is happening but I am investigating

It doesn't appear in the logs when they are added

sureshfizzy commented 6 months ago

Files repaired by Zurg are unplayable, is anyone else experiencing this?

image

JurajNyiri commented 6 months ago

Yes, I have solved it by restarting Zurg every night.

sureshfizzy commented 6 months ago

Yes, I have solved it by restarting Zurg every night.

ohh I see, I'll try this advice, appreciate it !

beanbaganalytica commented 5 months ago

It seems to be that there are "ghost" torrents added when repairing a torrent

I dont know why this is happening but I am investigating

It doesn't appear in the logs when they are added

Love all the work you have done! Any progress on this? I have still been seeing this issue. Zurg seems to repair most of my links and then makes most of my library unplayable since the "file is unavailable". @yowmamasita

sureshfizzy commented 5 months ago

It seems to be that there are "ghost" torrents added when repairing a torrent I dont know why this is happening but I am investigating It doesn't appear in the logs when they are added

Love all the work you have done! Any progress on this? I have still been seeing this issue. Zurg seems to repair most of my links and then makes most of my library unplayable since the "file is unavailable". @yowmamasita

For unplayable files, restart zurg and try to play the file, it will work. For some reason, repaired torrents needs a remount.

yowmamasita commented 5 months ago

This is all resolved on 0.10 zurg (currently private). Check out the nightly builds

beanbaganalytica commented 5 months ago

Great news! Can't wait for the official release!

beanbaganalytica commented 4 months ago

@sureshfizzy when do you restart zurg and do you have it as a command in your docker-compose? I just realized I was running ghcr.io/debridmediamanager/latest which points to the nightly build and it seems all of my links were being regenerated on a daily basis within Real Debrid which is strange. Yesterday I then pointed it to ghcr.io/debridmediamanager/zurg-testing:v0.9.3-hotfix.11 instead and the same issue is occurring. I even restart zurg and same issue. Hmmmm

Today (6/23) I have not streamed/added anything new but it seems it goes through all the links and updates/redownloads them.

image

sureshfizzy commented 4 months ago

@sureshfizzy when do you restart zurg and do you have it as a command in your docker-compose? I just realized I was running ghcr.io/debridmediamanager/latest which points to the nightly build and it seems all of my links were being regenerated on a daily basis within Real Debrid which is strange. Yesterday I then pointed it to ghcr.io/debridmediamanager/zurg-testing:v0.9.3-hotfix.11 instead and the same issue is occurring. I even restart zurg and same issue. Hmmmm

Today (6/23) I have not streamed/added anything new but it seems it goes through all the links and updates/redownloads them.

image

I believe you have set vfs cache to full. Try using vfs to writes instead. Also check if your rd hosted ip is whitelisted or blocked.

curl https://real-debrid.com/vpn | grep blocked

beanbaganalytica commented 4 months ago

Thanks for your help! Looks like I have it set to "off" as I do not even have it in the command at the moment. I will set it to writes, not sure if that will fix it if it was off.

Also I am not blocked. Thanks for that!

Current docker command: command: "mount zurg: /data --allow-non-empty --allow-other --uid=1000 --gid=1000 --dir-cache-time 10s"

sureshfizzy commented 4 months ago

Thanks for your help! Looks like I have it set to "off" as I do not even have it in the command at the moment. I will set it to writes, not sure if that will fix it if it was off.

Also I am not blocked. Thanks for that!

Current docker command: command: "mount zurg: /data --allow-non-empty --allow-other --uid=1000 --gid=1000 --dir-cache-time 10s"

The current command seems fine and vfs writes should help and change your rd api token once to make sure it is not used or picked anywhere else.

yowmamasita commented 4 months ago

I am working on fixing this on the next nightly build

beanbaganalytica commented 4 months ago

I think i have a similar issue, new torrents i add and even some old ones the files will just be unplayable, i wont be able to play them but randomly they'll be playable again, im unsure if the problem is similar to this though

@isaiahhatesdudes Make sure you are not being Limit Rated. Real Debrid recently unofficially implemented limits of 1TB-2TB a day per account (you can see this in traffic on the website). I was hitting the limit and seeing the same issue. The limit resets daily at 12AM CET so it might start working after that. In the private builds Yow has implemented the ability to use more than one account and made changes to make zurg more efficient.