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.
416 stars 30 forks source link

Request: Option to make Zurg use filenames from Real Debrid download link #84

Open chrisngobanh opened 6 months ago

chrisngobanh commented 6 months ago

Feature Description To improve compatibility with RDT Client, please add a new option to config.yml to make Zurg use filenames from Real Debrid instead of renaming the files.

Problem and Motivation Real Debrid sometimes randomly decides to rename the files in a torrent when it generates the download link.

i.e.

Original file name in torrent: tv.show.S01E01-release-group.mkv

Real Debrid link: https://lax5.download.real-debrid.com/d/ABC123/tv.show.S01E01.mkv

In this situation, it appears that Zurg renames the downloaded file from Real Debrid to the torrent filename: /mnt/remote/realdebrid/torrents/tv.show.S01E01-release-group.mkv

(I'm not really sure what Zurg is doing behind the scenes since the source code isn't public, this is just my guess)


When this happens, RDT Client errors out because it tries to search for the file name from the Real Debrid link instead of the torrent file name.

What RDT Client tries to find in the rclone mount: tv.show.S01E01-release-group.mkv What's actually in the rclone mount: tv.show.S01E01.mkv

Possible Solution Add an option to make Zurg keep filename from Real Debrid to make it more compatible with RDT Client.

Alternatives Considered If the source code for Zurg was available, I'd probably try to see how Zurg decides on filenames and then implement that behavior in RDT Client instead so it knows what filename to find in the rclone mount.

Additional Context N/A

Your Environment Ubuntu Docker

Potential Impact This would be optional so little impact

Preferred Timeline N/A

chrisngobanh commented 6 months ago

Additional note:

Many people have suggested setting these config fields to true

retain_rd_torrent_name: true
retain_folder_name_extension: true

This doesn't seem to affect the filenames of the video files unfortunately.