Renamed DownloadClientStatus to DownloadClientInfo to avoid conflict.
This commit is contained in:
parent
14144bd4d9
commit
766520b851
|
@ -119,9 +119,9 @@ namespace NzbDrone.Core.Download.Clients.Blackhole
|
||||||
DeleteItemData(downloadId);
|
DeleteItemData(downloadId);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override DownloadClientStatus GetStatus()
|
public override DownloadClientInfo GetStatus()
|
||||||
{
|
{
|
||||||
return new DownloadClientStatus
|
return new DownloadClientInfo
|
||||||
{
|
{
|
||||||
IsLocalhost = true,
|
IsLocalhost = true,
|
||||||
OutputRootFolders = new List<OsPath> { new OsPath(Settings.WatchFolder) }
|
OutputRootFolders = new List<OsPath> { new OsPath(Settings.WatchFolder) }
|
||||||
|
|
|
@ -86,9 +86,9 @@ namespace NzbDrone.Core.Download.Clients.Blackhole
|
||||||
DeleteItemData(downloadId);
|
DeleteItemData(downloadId);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override DownloadClientStatus GetStatus()
|
public override DownloadClientInfo GetStatus()
|
||||||
{
|
{
|
||||||
return new DownloadClientStatus
|
return new DownloadClientInfo
|
||||||
{
|
{
|
||||||
IsLocalhost = true,
|
IsLocalhost = true,
|
||||||
OutputRootFolders = new List<OsPath> { new OsPath(Settings.WatchFolder) }
|
OutputRootFolders = new List<OsPath> { new OsPath(Settings.WatchFolder) }
|
||||||
|
|
|
@ -151,7 +151,7 @@ namespace NzbDrone.Core.Download.Clients.Deluge
|
||||||
_proxy.RemoveTorrent(downloadId.ToLower(), deleteData, Settings);
|
_proxy.RemoveTorrent(downloadId.ToLower(), deleteData, Settings);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override DownloadClientStatus GetStatus()
|
public override DownloadClientInfo GetStatus()
|
||||||
{
|
{
|
||||||
var config = _proxy.GetConfig(Settings);
|
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);
|
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"
|
IsLocalhost = Settings.Host == "127.0.0.1" || Settings.Host == "localhost"
|
||||||
};
|
};
|
||||||
|
|
|
@ -105,13 +105,13 @@ namespace NzbDrone.Core.Download.Clients.DownloadStation
|
||||||
return items;
|
return items;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override DownloadClientStatus GetStatus()
|
public override DownloadClientInfo GetStatus()
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var path = GetDownloadDirectory();
|
var path = GetDownloadDirectory();
|
||||||
|
|
||||||
return new DownloadClientStatus
|
return new DownloadClientInfo
|
||||||
{
|
{
|
||||||
IsLocalhost = Settings.Host == "127.0.0.1" || Settings.Host == "localhost",
|
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, new OsPath(path)) }
|
||||||
|
|
|
@ -130,13 +130,13 @@ namespace NzbDrone.Core.Download.Clients.DownloadStation
|
||||||
return finalPath;
|
return finalPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override DownloadClientStatus GetStatus()
|
public override DownloadClientInfo GetStatus()
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var path = GetDownloadDirectory();
|
var path = GetDownloadDirectory();
|
||||||
|
|
||||||
return new DownloadClientStatus
|
return new DownloadClientInfo
|
||||||
{
|
{
|
||||||
IsLocalhost = Settings.Host == "127.0.0.1" || Settings.Host == "localhost",
|
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, new OsPath(path)) }
|
||||||
|
|
|
@ -117,12 +117,12 @@ namespace NzbDrone.Core.Download.Clients.Hadouken
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override DownloadClientStatus GetStatus()
|
public override DownloadClientInfo GetStatus()
|
||||||
{
|
{
|
||||||
var config = _proxy.GetConfig(Settings);
|
var config = _proxy.GetConfig(Settings);
|
||||||
var destDir = new OsPath(config.GetValueOrDefault("bittorrent.defaultSavePath") as string);
|
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"
|
IsLocalhost = Settings.Host == "127.0.0.1" || Settings.Host == "localhost"
|
||||||
};
|
};
|
||||||
|
|
|
@ -142,9 +142,9 @@ namespace NzbDrone.Core.Download.Clients.NzbVortex
|
||||||
return _proxy.GetGroups(Settings);
|
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"
|
IsLocalhost = Settings.Host == "127.0.0.1" || Settings.Host == "localhost"
|
||||||
};
|
};
|
||||||
|
|
|
@ -214,13 +214,13 @@ namespace NzbDrone.Core.Download.Clients.Nzbget
|
||||||
_proxy.RemoveItem(downloadId, Settings);
|
_proxy.RemoveItem(downloadId, Settings);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override DownloadClientStatus GetStatus()
|
public override DownloadClientInfo GetStatus()
|
||||||
{
|
{
|
||||||
var config = _proxy.GetConfig(Settings);
|
var config = _proxy.GetConfig(Settings);
|
||||||
|
|
||||||
var category = GetCategories(config).FirstOrDefault(v => v.Name == Settings.TvCategory);
|
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"
|
IsLocalhost = Settings.Host == "127.0.0.1" || Settings.Host == "localhost"
|
||||||
};
|
};
|
||||||
|
|
|
@ -103,9 +103,9 @@ namespace NzbDrone.Core.Download.Clients.Pneumatic
|
||||||
throw new NotSupportedException();
|
throw new NotSupportedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override DownloadClientStatus GetStatus()
|
public override DownloadClientInfo GetStatus()
|
||||||
{
|
{
|
||||||
var status = new DownloadClientStatus
|
var status = new DownloadClientInfo
|
||||||
{
|
{
|
||||||
IsLocalhost = true
|
IsLocalhost = true
|
||||||
};
|
};
|
||||||
|
|
|
@ -174,13 +174,13 @@ namespace NzbDrone.Core.Download.Clients.QBittorrent
|
||||||
_proxy.RemoveTorrent(hash.ToLower(), deleteData, Settings);
|
_proxy.RemoveTorrent(hash.ToLower(), deleteData, Settings);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override DownloadClientStatus GetStatus()
|
public override DownloadClientInfo GetStatus()
|
||||||
{
|
{
|
||||||
var config = _proxy.GetConfig(Settings);
|
var config = _proxy.GetConfig(Settings);
|
||||||
|
|
||||||
var destDir = new OsPath(config.SavePath);
|
var destDir = new OsPath(config.SavePath);
|
||||||
|
|
||||||
return new DownloadClientStatus
|
return new DownloadClientInfo
|
||||||
{
|
{
|
||||||
IsLocalhost = Settings.Host == "127.0.0.1" || Settings.Host == "localhost",
|
IsLocalhost = Settings.Host == "127.0.0.1" || Settings.Host == "localhost",
|
||||||
OutputRootFolders = new List<OsPath> { _remotePathMappingService.RemapRemoteToLocal(Settings.Host, destDir) }
|
OutputRootFolders = new List<OsPath> { _remotePathMappingService.RemapRemoteToLocal(Settings.Host, destDir) }
|
||||||
|
|
|
@ -250,7 +250,7 @@ namespace NzbDrone.Core.Download.Clients.Sabnzbd
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override DownloadClientStatus GetStatus()
|
public override DownloadClientInfo GetStatus()
|
||||||
{
|
{
|
||||||
var config = _proxy.GetConfig(Settings);
|
var config = _proxy.GetConfig(Settings);
|
||||||
var categories = GetCategories(config).ToArray();
|
var categories = GetCategories(config).ToArray();
|
||||||
|
@ -262,7 +262,7 @@ namespace NzbDrone.Core.Download.Clients.Sabnzbd
|
||||||
category = categories.FirstOrDefault(v => v.Name == "*");
|
category = categories.FirstOrDefault(v => v.Name == "*");
|
||||||
}
|
}
|
||||||
|
|
||||||
var status = new DownloadClientStatus
|
var status = new DownloadClientInfo
|
||||||
{
|
{
|
||||||
IsLocalhost = Settings.Host == "127.0.0.1" || Settings.Host == "localhost"
|
IsLocalhost = Settings.Host == "127.0.0.1" || Settings.Host == "localhost"
|
||||||
};
|
};
|
||||||
|
|
|
@ -119,7 +119,7 @@ namespace NzbDrone.Core.Download.Clients.Transmission
|
||||||
_proxy.RemoveTorrent(downloadId.ToLower(), deleteData, Settings);
|
_proxy.RemoveTorrent(downloadId.ToLower(), deleteData, Settings);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override DownloadClientStatus GetStatus()
|
public override DownloadClientInfo GetStatus()
|
||||||
{
|
{
|
||||||
var config = _proxy.GetConfig(Settings);
|
var config = _proxy.GetConfig(Settings);
|
||||||
var destDir = config.GetValueOrDefault("download-dir") as string;
|
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);
|
destDir = string.Format("{0}/.{1}", destDir, Settings.TvCategory);
|
||||||
}
|
}
|
||||||
|
|
||||||
return new DownloadClientStatus
|
return new DownloadClientInfo
|
||||||
{
|
{
|
||||||
IsLocalhost = Settings.Host == "127.0.0.1" || Settings.Host == "localhost",
|
IsLocalhost = Settings.Host == "127.0.0.1" || Settings.Host == "localhost",
|
||||||
OutputRootFolders = new List<OsPath> { _remotePathMappingService.RemapRemoteToLocal(Settings.Host, new OsPath(destDir)) }
|
OutputRootFolders = new List<OsPath> { _remotePathMappingService.RemapRemoteToLocal(Settings.Host, new OsPath(destDir)) }
|
||||||
|
|
|
@ -156,11 +156,11 @@ namespace NzbDrone.Core.Download.Clients.RTorrent
|
||||||
_proxy.RemoveTorrent(downloadId, Settings);
|
_proxy.RemoveTorrent(downloadId, Settings);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override DownloadClientStatus GetStatus()
|
public override DownloadClientInfo GetStatus()
|
||||||
{
|
{
|
||||||
// XXX: This function's correctness has not been considered
|
// 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"
|
IsLocalhost = Settings.Host == "127.0.0.1" || Settings.Host == "localhost"
|
||||||
};
|
};
|
||||||
|
|
|
@ -178,7 +178,7 @@ namespace NzbDrone.Core.Download.Clients.UTorrent
|
||||||
_proxy.RemoveTorrent(downloadId, deleteData, Settings);
|
_proxy.RemoveTorrent(downloadId, deleteData, Settings);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override DownloadClientStatus GetStatus()
|
public override DownloadClientInfo GetStatus()
|
||||||
{
|
{
|
||||||
var config = _proxy.GetConfig(Settings);
|
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"
|
IsLocalhost = Settings.Host == "127.0.0.1" || Settings.Host == "localhost"
|
||||||
};
|
};
|
||||||
|
|
|
@ -60,7 +60,7 @@ namespace NzbDrone.Core.Download
|
||||||
public abstract string Download(RemoteEpisode remoteEpisode);
|
public abstract string Download(RemoteEpisode remoteEpisode);
|
||||||
public abstract IEnumerable<DownloadClientItem> GetItems();
|
public abstract IEnumerable<DownloadClientItem> GetItems();
|
||||||
public abstract void RemoveItem(string downloadId, bool deleteData);
|
public abstract void RemoveItem(string downloadId, bool deleteData);
|
||||||
public abstract DownloadClientStatus GetStatus();
|
public abstract DownloadClientInfo GetStatus();
|
||||||
|
|
||||||
protected virtual void DeleteItemData(string downloadId)
|
protected virtual void DeleteItemData(string downloadId)
|
||||||
{
|
{
|
||||||
|
|
|
@ -3,7 +3,7 @@ using NzbDrone.Common.Disk;
|
||||||
|
|
||||||
namespace NzbDrone.Core.Download
|
namespace NzbDrone.Core.Download
|
||||||
{
|
{
|
||||||
public class DownloadClientStatus
|
public class DownloadClientInfo
|
||||||
{
|
{
|
||||||
public bool IsLocalhost { get; set; }
|
public bool IsLocalhost { get; set; }
|
||||||
public List<OsPath> OutputRootFolders { get; set; }
|
public List<OsPath> OutputRootFolders { get; set; }
|
|
@ -12,6 +12,6 @@ namespace NzbDrone.Core.Download
|
||||||
string Download(RemoteEpisode remoteEpisode);
|
string Download(RemoteEpisode remoteEpisode);
|
||||||
IEnumerable<DownloadClientItem> GetItems();
|
IEnumerable<DownloadClientItem> GetItems();
|
||||||
void RemoveItem(string downloadId, bool deleteData);
|
void RemoveItem(string downloadId, bool deleteData);
|
||||||
DownloadClientStatus GetStatus();
|
DownloadClientInfo GetStatus();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -91,6 +91,6 @@ namespace NzbDrone.Core.HealthCheck.Checks
|
||||||
public class ImportMechanismCheckStatus
|
public class ImportMechanismCheckStatus
|
||||||
{
|
{
|
||||||
public IDownloadClient DownloadClient { get; set; }
|
public IDownloadClient DownloadClient { get; set; }
|
||||||
public DownloadClientStatus Status { get; set; }
|
public DownloadClientInfo Status { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -412,9 +412,7 @@
|
||||||
<Compile Include="Download\Clients\Nzbget\NzbgetSettings.cs" />
|
<Compile Include="Download\Clients\Nzbget\NzbgetSettings.cs" />
|
||||||
<Compile Include="Download\Clients\NzbVortex\JsonConverters\NzbVortexLoginResultTypeConverter.cs" />
|
<Compile Include="Download\Clients\NzbVortex\JsonConverters\NzbVortexLoginResultTypeConverter.cs" />
|
||||||
<Compile Include="Download\Clients\NzbVortex\JsonConverters\NzbVortexResultTypeConverter.cs" />
|
<Compile Include="Download\Clients\NzbVortex\JsonConverters\NzbVortexResultTypeConverter.cs" />
|
||||||
<Compile Include="Download\Clients\NzbVortex\NzbVortex.cs">
|
<Compile Include="Download\Clients\NzbVortex\NzbVortex.cs" />
|
||||||
<SubType>Code</SubType>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="Download\Clients\NzbVortex\NzbVortexGroup.cs" />
|
<Compile Include="Download\Clients\NzbVortex\NzbVortexGroup.cs" />
|
||||||
<Compile Include="Download\Clients\NzbVortex\NzbVortexNotLoggedInException.cs" />
|
<Compile Include="Download\Clients\NzbVortex\NzbVortexNotLoggedInException.cs" />
|
||||||
<Compile Include="Download\Clients\NzbVortex\NzbVortexAuthenticationException.cs" />
|
<Compile Include="Download\Clients\NzbVortex\NzbVortexAuthenticationException.cs" />
|
||||||
|
@ -510,7 +508,7 @@
|
||||||
<Compile Include="Download\DownloadClientItem.cs" />
|
<Compile Include="Download\DownloadClientItem.cs" />
|
||||||
<Compile Include="Download\DownloadClientProvider.cs" />
|
<Compile Include="Download\DownloadClientProvider.cs" />
|
||||||
<Compile Include="Download\DownloadClientRepository.cs" />
|
<Compile Include="Download\DownloadClientRepository.cs" />
|
||||||
<Compile Include="Download\DownloadClientStatus.cs" />
|
<Compile Include="Download\DownloadClientInfo.cs" />
|
||||||
<Compile Include="Download\DownloadClientType.cs" />
|
<Compile Include="Download\DownloadClientType.cs" />
|
||||||
<Compile Include="Download\DownloadFailedEvent.cs" />
|
<Compile Include="Download\DownloadFailedEvent.cs" />
|
||||||
<Compile Include="Download\DownloadItemStatus.cs" />
|
<Compile Include="Download\DownloadItemStatus.cs" />
|
||||||
|
|
Loading…
Reference in New Issue