mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-12-16 11:37:58 +02:00
Renamed DownloadClientStatus to DownloadClientInfo to avoid conflict.
This commit is contained in:
parent
14144bd4d9
commit
766520b851
@ -119,9 +119,9 @@ public override void RemoveItem(string downloadId, bool deleteData)
|
||||
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) }
|
||||
|
@ -86,9 +86,9 @@ public override void RemoveItem(string downloadId, bool deleteData)
|
||||
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) }
|
||||
|
@ -151,7 +151,7 @@ public override void RemoveItem(string downloadId, bool deleteData)
|
||||
_proxy.RemoveTorrent(downloadId.ToLower(), deleteData, Settings);
|
||||
}
|
||||
|
||||
public override DownloadClientStatus GetStatus()
|
||||
public override DownloadClientInfo GetStatus()
|
||||
{
|
||||
var config = _proxy.GetConfig(Settings);
|
||||
|
||||
@ -162,7 +162,7 @@ public override DownloadClientStatus GetStatus()
|
||||
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"
|
||||
};
|
||||
|
@ -105,13 +105,13 @@ public override IEnumerable<DownloadClientItem> GetItems()
|
||||
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)) }
|
||||
|
@ -130,13 +130,13 @@ protected OsPath GetOutputPath(OsPath outputPath, DownloadStationTask task, stri
|
||||
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)) }
|
||||
|
@ -117,12 +117,12 @@ public override void RemoveItem(string downloadId, bool deleteData)
|
||||
}
|
||||
}
|
||||
|
||||
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"
|
||||
};
|
||||
|
@ -142,9 +142,9 @@ protected List<NzbVortexGroup> GetGroups()
|
||||
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"
|
||||
};
|
||||
|
@ -214,13 +214,13 @@ public override void RemoveItem(string downloadId, bool deleteData)
|
||||
_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"
|
||||
};
|
||||
|
@ -103,9 +103,9 @@ public override void RemoveItem(string downloadId, bool deleteData)
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
|
||||
public override DownloadClientStatus GetStatus()
|
||||
public override DownloadClientInfo GetStatus()
|
||||
{
|
||||
var status = new DownloadClientStatus
|
||||
var status = new DownloadClientInfo
|
||||
{
|
||||
IsLocalhost = true
|
||||
};
|
||||
|
@ -174,13 +174,13 @@ public override void RemoveItem(string hash, bool deleteData)
|
||||
_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) }
|
||||
|
@ -250,7 +250,7 @@ protected IEnumerable<SabnzbdCategory> GetCategories(SabnzbdConfig config)
|
||||
}
|
||||
}
|
||||
|
||||
public override DownloadClientStatus GetStatus()
|
||||
public override DownloadClientInfo GetStatus()
|
||||
{
|
||||
var config = _proxy.GetConfig(Settings);
|
||||
var categories = GetCategories(config).ToArray();
|
||||
@ -262,7 +262,7 @@ public override DownloadClientStatus GetStatus()
|
||||
category = categories.FirstOrDefault(v => v.Name == "*");
|
||||
}
|
||||
|
||||
var status = new DownloadClientStatus
|
||||
var status = new DownloadClientInfo
|
||||
{
|
||||
IsLocalhost = Settings.Host == "127.0.0.1" || Settings.Host == "localhost"
|
||||
};
|
||||
|
@ -119,7 +119,7 @@ public override void RemoveItem(string downloadId, bool deleteData)
|
||||
_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 @@ public override DownloadClientStatus GetStatus()
|
||||
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)) }
|
||||
|
@ -156,11 +156,11 @@ public override void RemoveItem(string downloadId, bool deleteData)
|
||||
_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"
|
||||
};
|
||||
|
@ -178,7 +178,7 @@ public override void RemoveItem(string downloadId, bool deleteData)
|
||||
_proxy.RemoveTorrent(downloadId, deleteData, Settings);
|
||||
}
|
||||
|
||||
public override DownloadClientStatus GetStatus()
|
||||
public override DownloadClientInfo GetStatus()
|
||||
{
|
||||
var config = _proxy.GetConfig(Settings);
|
||||
|
||||
@ -199,7 +199,7 @@ public override DownloadClientStatus GetStatus()
|
||||
}
|
||||
}
|
||||
|
||||
var status = new DownloadClientStatus
|
||||
var status = new DownloadClientInfo
|
||||
{
|
||||
IsLocalhost = Settings.Host == "127.0.0.1" || Settings.Host == "localhost"
|
||||
};
|
||||
|
@ -60,7 +60,7 @@ public abstract DownloadProtocol Protocol
|
||||
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)
|
||||
{
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
namespace NzbDrone.Core.Download
|
||||
{
|
||||
public class DownloadClientStatus
|
||||
public class DownloadClientInfo
|
||||
{
|
||||
public bool IsLocalhost { get; set; }
|
||||
public List<OsPath> OutputRootFolders { get; set; }
|
@ -12,6 +12,6 @@ public interface IDownloadClient : IProvider
|
||||
string Download(RemoteEpisode remoteEpisode);
|
||||
IEnumerable<DownloadClientItem> GetItems();
|
||||
void RemoveItem(string downloadId, bool deleteData);
|
||||
DownloadClientStatus GetStatus();
|
||||
DownloadClientInfo GetStatus();
|
||||
}
|
||||
}
|
||||
|
@ -91,6 +91,6 @@ public override HealthCheck Check()
|
||||
public class ImportMechanismCheckStatus
|
||||
{
|
||||
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\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" />
|
||||
|
Loading…
Reference in New Issue
Block a user