mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-10-30 07:22:35 +01:00
Fixed: Get full path for download station instead of shared folder
Closes #4751
This commit is contained in:
parent
86fa6036d0
commit
b184e62fa7
@ -115,12 +115,18 @@ namespace NzbDrone.Core.Download.Clients.DownloadStation
|
||||
{
|
||||
try
|
||||
{
|
||||
var path = GetDownloadDirectory();
|
||||
var serialNumber = _serialNumberProvider.GetSerialNumber(Settings);
|
||||
|
||||
// Download station returns the path without the leading `/`, but the leading
|
||||
// slash is required to get the full path back from download station.
|
||||
var path = new OsPath($"/{GetDownloadDirectory()}");
|
||||
|
||||
var fullPath = _sharedFolderResolver.RemapToFullPath(path, Settings, serialNumber);
|
||||
|
||||
return new DownloadClientInfo
|
||||
{
|
||||
IsLocalhost = Settings.Host == "127.0.0.1" || Settings.Host == "localhost",
|
||||
OutputRootFolders = new List<OsPath> { _remotePathMappingService.RemapRemoteToLocal(Settings.Host, new OsPath(path)) }
|
||||
OutputRootFolders = new List<OsPath> { _remotePathMappingService.RemapRemoteToLocal(Settings.Host, fullPath) }
|
||||
};
|
||||
}
|
||||
catch (DownloadClientException e)
|
||||
|
@ -140,12 +140,18 @@ namespace NzbDrone.Core.Download.Clients.DownloadStation
|
||||
{
|
||||
try
|
||||
{
|
||||
var path = GetDownloadDirectory();
|
||||
var serialNumber = _serialNumberProvider.GetSerialNumber(Settings);
|
||||
|
||||
// Download station returns the path without the leading `/`, but the leading
|
||||
// slash is required to get the full path back from download station.
|
||||
var path = new OsPath($"/{GetDownloadDirectory()}");
|
||||
|
||||
var fullPath = _sharedFolderResolver.RemapToFullPath(path, Settings, serialNumber);
|
||||
|
||||
return new DownloadClientInfo
|
||||
{
|
||||
IsLocalhost = Settings.Host == "127.0.0.1" || Settings.Host == "localhost",
|
||||
OutputRootFolders = new List<OsPath> { _remotePathMappingService.RemapRemoteToLocal(Settings.Host, new OsPath(path)) }
|
||||
OutputRootFolders = new List<OsPath> { _remotePathMappingService.RemapRemoteToLocal(Settings.Host, fullPath) }
|
||||
};
|
||||
}
|
||||
catch (DownloadClientException e)
|
||||
|
Loading…
Reference in New Issue
Block a user