Correct RealDebrid renaming sometimes

This commit is contained in:
YvesPa 2024-09-25 18:07:34 +02:00
parent fcbd9d8096
commit c6beedf675
3 changed files with 8 additions and 2 deletions

View file

@ -191,6 +191,7 @@
<option [ngValue]="1">Bezzad</option>
<option [ngValue]="2">Aria2c</option>
<option [ngValue]="3">Symlink Downloader</option>
<option [ngValue]="4">Synology DownloadStation</option>
</select>
</div>
<p class="help">

View file

@ -58,6 +58,7 @@
<ng-container *ngSwitchCase="1">Bezadd</ng-container>
<ng-container *ngSwitchCase="2">Aria2c</ng-container>
<ng-container *ngSwitchCase="3">Symlink Downloader</ng-container>
<ng-component *ngSwitchCase="4">Synology DownloadStation</ng-component>
</ng-container>
</div>
<div class="field">
@ -498,6 +499,7 @@
<option [ngValue]="1">Bezzad</option>
<option [ngValue]="2">Aria2c</option>
<option [ngValue]="3">Symlink Downloader</option>
<option [ngValue]="4">Synology DownloadStation</option>
</select>
</div>
<p class="help">

View file

@ -1,5 +1,5 @@
using System.Web;
using RdtClient.Data.Models.Data;
using RdtClient.Data.Models.Data;
using System.Web;
namespace RdtClient.Service.Helpers;
@ -16,6 +16,9 @@ public static class DownloadHelper
var directory = RemoveInvalidPathChars(torrent.RdName);
// RealDebrid sometimes change TorrentName when it's a single file torrent adding the extension of the single file
directory = Path.ChangeExtension(directory, null);
var uri = new Uri(fileUrl);
var torrentPath = Path.Combine(downloadPath, directory);