Renamed DownloadClientStatus to DownloadClientInfo to avoid conflict.

This commit is contained in:
Taloth Saldono 2017-05-10 23:04:19 +02:00
parent 14144bd4d9
commit 766520b851
19 changed files with 34 additions and 36 deletions

View File

@ -119,9 +119,9 @@ namespace NzbDrone.Core.Download.Clients.Blackhole
DeleteItemData(downloadId);
}
public override DownloadClientStatus GetStatus()
public override DownloadClientInfo GetStatus()
{
return new DownloadClientStatus
return new DownloadClientInfo
{
IsLocalhost = true,
OutputRootFolders = new List<OsPath> { new OsPath(Settings.WatchFolder) }

View File

@ -86,9 +86,9 @@ namespace NzbDrone.Core.Download.Clients.Blackhole
DeleteItemData(downloadId);
}
public override DownloadClientStatus GetStatus()
public override DownloadClientInfo GetStatus()
{
return new DownloadClientStatus
return new DownloadClientInfo
{
IsLocalhost = true,
OutputRootFolders = new List<OsPath> { new OsPath(Settings.WatchFolder) }

View File

@ -151,7 +151,7 @@ namespace NzbDrone.Core.Download.Clients.Deluge
_proxy.RemoveTorrent(downloadId.ToLower(), deleteData, Settings);
}
public override DownloadClientStatus GetStatus()
public override DownloadClientInfo GetStatus()
{
var config = _proxy.GetConfig(Settings);
@ -162,7 +162,7 @@ namespace NzbDrone.Core.Download.Clients.Deluge
destDir = new OsPath(config.GetValueOrDefault("move_completed_path") as string);
}
var status = new DownloadClientStatus
var status = new DownloadClientInfo
{
IsLocalhost = Settings.Host == "127.0.0.1" || Settings.Host == "localhost"
};

View File

@ -105,13 +105,13 @@ namespace NzbDrone.Core.Download.Clients.DownloadStation
return items;
}
public override DownloadClientStatus GetStatus()
public override DownloadClientInfo GetStatus()
{
try
{
var path = GetDownloadDirectory();
return new DownloadClientStatus
return new DownloadClientInfo
{
IsLocalhost = Settings.Host == "127.0.0.1" || Settings.Host == "localhost",
OutputRootFolders = new List<OsPath> { _remotePathMappingService.RemapRemoteToLocal(Settings.Host, new OsPath(path)) }

View File

@ -130,13 +130,13 @@ namespace NzbDrone.Core.Download.Clients.DownloadStation
return finalPath;
}
public override DownloadClientStatus GetStatus()
public override DownloadClientInfo GetStatus()
{
try
{
var path = GetDownloadDirectory();
return new DownloadClientStatus
return new DownloadClientInfo
{
IsLocalhost = Settings.Host == "127.0.0.1" || Settings.Host == "localhost",
OutputRootFolders = new List<OsPath> { _remotePathMappingService.RemapRemoteToLocal(Settings.Host, new OsPath(path)) }

View File

@ -117,12 +117,12 @@ namespace NzbDrone.Core.Download.Clients.Hadouken
}
}
public override DownloadClientStatus GetStatus()
public override DownloadClientInfo GetStatus()
{
var config = _proxy.GetConfig(Settings);
var destDir = new OsPath(config.GetValueOrDefault("bittorrent.defaultSavePath") as string);
var status = new DownloadClientStatus
var status = new DownloadClientInfo
{
IsLocalhost = Settings.Host == "127.0.0.1" || Settings.Host == "localhost"
};

View File

@ -142,9 +142,9 @@ namespace NzbDrone.Core.Download.Clients.NzbVortex
return _proxy.GetGroups(Settings);
}
public override DownloadClientStatus GetStatus()
public override DownloadClientInfo GetStatus()
{
var status = new DownloadClientStatus
var status = new DownloadClientInfo
{
IsLocalhost = Settings.Host == "127.0.0.1" || Settings.Host == "localhost"
};

View File

@ -214,13 +214,13 @@ namespace NzbDrone.Core.Download.Clients.Nzbget
_proxy.RemoveItem(downloadId, Settings);
}
public override DownloadClientStatus GetStatus()
public override DownloadClientInfo GetStatus()
{
var config = _proxy.GetConfig(Settings);
var category = GetCategories(config).FirstOrDefault(v => v.Name == Settings.TvCategory);
var status = new DownloadClientStatus
var status = new DownloadClientInfo
{
IsLocalhost = Settings.Host == "127.0.0.1" || Settings.Host == "localhost"
};

View File

@ -103,9 +103,9 @@ namespace NzbDrone.Core.Download.Clients.Pneumatic
throw new NotSupportedException();
}
public override DownloadClientStatus GetStatus()
public override DownloadClientInfo GetStatus()
{
var status = new DownloadClientStatus
var status = new DownloadClientInfo
{
IsLocalhost = true
};

View File

@ -174,13 +174,13 @@ namespace NzbDrone.Core.Download.Clients.QBittorrent
_proxy.RemoveTorrent(hash.ToLower(), deleteData, Settings);
}
public override DownloadClientStatus GetStatus()
public override DownloadClientInfo GetStatus()
{
var config = _proxy.GetConfig(Settings);
var destDir = new OsPath(config.SavePath);
return new DownloadClientStatus
return new DownloadClientInfo
{
IsLocalhost = Settings.Host == "127.0.0.1" || Settings.Host == "localhost",
OutputRootFolders = new List<OsPath> { _remotePathMappingService.RemapRemoteToLocal(Settings.Host, destDir) }

View File

@ -250,7 +250,7 @@ namespace NzbDrone.Core.Download.Clients.Sabnzbd
}
}
public override DownloadClientStatus GetStatus()
public override DownloadClientInfo GetStatus()
{
var config = _proxy.GetConfig(Settings);
var categories = GetCategories(config).ToArray();
@ -262,7 +262,7 @@ namespace NzbDrone.Core.Download.Clients.Sabnzbd
category = categories.FirstOrDefault(v => v.Name == "*");
}
var status = new DownloadClientStatus
var status = new DownloadClientInfo
{
IsLocalhost = Settings.Host == "127.0.0.1" || Settings.Host == "localhost"
};

View File

@ -119,7 +119,7 @@ namespace NzbDrone.Core.Download.Clients.Transmission
_proxy.RemoveTorrent(downloadId.ToLower(), deleteData, Settings);
}
public override DownloadClientStatus GetStatus()
public override DownloadClientInfo GetStatus()
{
var config = _proxy.GetConfig(Settings);
var destDir = config.GetValueOrDefault("download-dir") as string;
@ -129,7 +129,7 @@ namespace NzbDrone.Core.Download.Clients.Transmission
destDir = string.Format("{0}/.{1}", destDir, Settings.TvCategory);
}
return new DownloadClientStatus
return new DownloadClientInfo
{
IsLocalhost = Settings.Host == "127.0.0.1" || Settings.Host == "localhost",
OutputRootFolders = new List<OsPath> { _remotePathMappingService.RemapRemoteToLocal(Settings.Host, new OsPath(destDir)) }

View File

@ -156,11 +156,11 @@ namespace NzbDrone.Core.Download.Clients.RTorrent
_proxy.RemoveTorrent(downloadId, Settings);
}
public override DownloadClientStatus GetStatus()
public override DownloadClientInfo GetStatus()
{
// XXX: This function's correctness has not been considered
var status = new DownloadClientStatus
var status = new DownloadClientInfo
{
IsLocalhost = Settings.Host == "127.0.0.1" || Settings.Host == "localhost"
};

View File

@ -178,7 +178,7 @@ namespace NzbDrone.Core.Download.Clients.UTorrent
_proxy.RemoveTorrent(downloadId, deleteData, Settings);
}
public override DownloadClientStatus GetStatus()
public override DownloadClientInfo GetStatus()
{
var config = _proxy.GetConfig(Settings);
@ -199,7 +199,7 @@ namespace NzbDrone.Core.Download.Clients.UTorrent
}
}
var status = new DownloadClientStatus
var status = new DownloadClientInfo
{
IsLocalhost = Settings.Host == "127.0.0.1" || Settings.Host == "localhost"
};

View File

@ -60,7 +60,7 @@ namespace NzbDrone.Core.Download
public abstract string Download(RemoteEpisode remoteEpisode);
public abstract IEnumerable<DownloadClientItem> GetItems();
public abstract void RemoveItem(string downloadId, bool deleteData);
public abstract DownloadClientStatus GetStatus();
public abstract DownloadClientInfo GetStatus();
protected virtual void DeleteItemData(string downloadId)
{

View File

@ -3,7 +3,7 @@ using NzbDrone.Common.Disk;
namespace NzbDrone.Core.Download
{
public class DownloadClientStatus
public class DownloadClientInfo
{
public bool IsLocalhost { get; set; }
public List<OsPath> OutputRootFolders { get; set; }

View File

@ -12,6 +12,6 @@ namespace NzbDrone.Core.Download
string Download(RemoteEpisode remoteEpisode);
IEnumerable<DownloadClientItem> GetItems();
void RemoveItem(string downloadId, bool deleteData);
DownloadClientStatus GetStatus();
DownloadClientInfo GetStatus();
}
}

View File

@ -91,6 +91,6 @@ namespace NzbDrone.Core.HealthCheck.Checks
public class ImportMechanismCheckStatus
{
public IDownloadClient DownloadClient { get; set; }
public DownloadClientStatus Status { get; set; }
public DownloadClientInfo Status { get; set; }
}
}

View File

@ -412,9 +412,7 @@
<Compile Include="Download\Clients\Nzbget\NzbgetSettings.cs" />
<Compile Include="Download\Clients\NzbVortex\JsonConverters\NzbVortexLoginResultTypeConverter.cs" />
<Compile Include="Download\Clients\NzbVortex\JsonConverters\NzbVortexResultTypeConverter.cs" />
<Compile Include="Download\Clients\NzbVortex\NzbVortex.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Download\Clients\NzbVortex\NzbVortex.cs" />
<Compile Include="Download\Clients\NzbVortex\NzbVortexGroup.cs" />
<Compile Include="Download\Clients\NzbVortex\NzbVortexNotLoggedInException.cs" />
<Compile Include="Download\Clients\NzbVortex\NzbVortexAuthenticationException.cs" />
@ -510,7 +508,7 @@
<Compile Include="Download\DownloadClientItem.cs" />
<Compile Include="Download\DownloadClientProvider.cs" />
<Compile Include="Download\DownloadClientRepository.cs" />
<Compile Include="Download\DownloadClientStatus.cs" />
<Compile Include="Download\DownloadClientInfo.cs" />
<Compile Include="Download\DownloadClientType.cs" />
<Compile Include="Download\DownloadFailedEvent.cs" />
<Compile Include="Download\DownloadItemStatus.cs" />