Skip to content

Commit

Permalink
Prevent creation of download folders when using the symlink downloader.
Browse files Browse the repository at this point in the history
  • Loading branch information
rogerfar committed Sep 3, 2024
1 parent cc52f5f commit 078bbe4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions server/RdtClient.Service/Helpers/DownloadHelper.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Web;
using RdtClient.Data.Enums;
using RdtClient.Data.Models.Data;

namespace RdtClient.Service.Helpers;
Expand Down Expand Up @@ -41,7 +42,7 @@ public static class DownloadHelper
}
}

if (!Directory.Exists(torrentPath))
if (torrent.DownloadClient != DownloadClient.Symlink && !Directory.Exists(torrentPath))
{
Directory.CreateDirectory(torrentPath);
}
Expand Down Expand Up @@ -85,7 +86,7 @@ public static class DownloadHelper
}
}

if (!Directory.Exists(torrentPath))
if (torrent.DownloadClient != DownloadClient.Symlink && !Directory.Exists(torrentPath))
{
Directory.CreateDirectory(torrentPath);
}
Expand Down

1 comment on commit 078bbe4

@xeroxmalf
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has currently broken downloads for me as for example:

[01:25:40 DBG] Starting download for download Serenity.2005.BluRay.1080p.DTS-HD.MA.5.1.VC-1.REMUX-FraMeSToR.mkv. Completed: 0%, avg speed: 0bytes/s (4861f92a-bcb7-4215-92fb-cd3775e0e2d0) remoteID:  for torrent Serenity 2005 BluRay 1080p (BNER4EQDIOTIQ - downloaded 100%) (d4c3c761-badb-4998-a3f7-8ddeb310970d)
[01:25:40 DBG] Starting symlink resolving of https://chi8-4.download.real-debrid.com/<snipped>/Serenity.2005.BluRay.1080p.DTS-HD.MA.5.1.VC-1.REMUX-FraMeSToR.mkv, writing to path: Serenity 2005 BluRay 1080p/Serenity.2005.BluRay.1080p.DTS-HD.MA.5.1.VC-1.REMUX-FraMeSToR.mkv
[01:25:40 DBG] Searching /eight-teebee/server/mounts/remote/zurg/torrents for Serenity.2005.BluRay.1080p.DTS-HD.MA.5.1.VC-1.REMUX-FraMeSToR.mkv (attempt #0)...
[01:25:40 DBG] Searching /eight-teebee/server/mounts/remote/zurg/torrents/Serenity 2005 BluRay 1080p/Serenity.2005.BluRay.1080p.DTS-HD.MA.5.1.VC-1.REMUX-FraMeSToR.mkv...
[01:25:40 DBG] Searching /eight-teebee/server/mounts/remote/zurg/torrents/Serenity.2005.BluRay.1080p.DTS-HD.MA.5.1.VC-1.REMUX-FraMeSToR.mkv/Serenity.2005.BluRay.1080p.DTS-HD.MA.5.1.VC-1.REMUX-FraMeSToR.mkv...
[01:25:40 DBG] Creating symbolic link from /eight-teebee/server/mounts/remote/zurg/torrents/Serenity.2005.BluRay.1080p.DTS-HD.MA.5.1.VC-1.REMUX-FraMeSToR.mkv/Serenity.2005.BluRay.1080p.DTS-HD.MA.5.1.VC-1.REMUX-FraMeSToR.mkv to /eight-teebee/server/mounts/symlinks/radarr/Serenity 2005 BluRay 1080p/Serenity.2005.BluRay.1080p.DTS-HD.MA.5.1.VC-1.REMUX-FraMeSToR.mkv
[01:25:40 ERR] Error creating symbolic link from /eight-teebee/server/mounts/remote/zurg/torrents/Serenity.2005.BluRay.1080p.DTS-HD.MA.5.1.VC-1.REMUX-FraMeSToR.mkv/Serenity.2005.BluRay.1080p.DTS-HD.MA.5.1.VC-1.REMUX-FraMeSToR.mkv to /eight-teebee/server/mounts/symlinks/radarr/Serenity 2005 BluRay 1080p/Serenity.2005.BluRay.1080p.DTS-HD.MA.5.1.VC-1.REMUX-FraMeSToR.mkv: Could not find a part of the path '/eight-teebee/server/mounts/symlinks/radarr/Serenity 2005 BluRay 1080p/Serenity.2005.BluRay.1080p.DTS-HD.MA.5.1.VC-1.REMUX-FraMeSToR.mkv'.
[01:25:40 ERR] Unable to start download: An unexpected error occurred preparing download https://chi8-4.download.real-debrid.com/<snipped>/Serenity.2005.BluRay.1080p.DTS-HD.MA.5.1.VC-1.REMUX-FraMeSToR.mkv for torrent Serenity 2005 BluRay 1080p: Could not find file from rclone mount! for download Serenity.2005.BluRay.1080p.DTS-HD.MA.5.1.VC-1.REMUX-FraMeSToR.mkv. Completed: 0%, avg speed: 0bytes/s (4861f92a-bcb7-4215-92fb-cd3775e0e2d0) remoteID:  for torrent Serenity 2005 BluRay 1080p (BNER4EQDIOTIQ - downloaded 100%) (d4c3c761-badb-4998-a3f7-8ddeb310970d)

Please sign in to comment.