public override DownloadClientStatus GetStatus() { var config = _proxy.GetConfig(Settings); var categories = GetCategories(config).ToArray(); var category = categories.FirstOrDefault(v => v.Name == Settings.TvCategory); if (category == null) { category = categories.FirstOrDefault(v => v.Name == "*"); } var status = new DownloadClientStatus { IsLocalhost = Settings.Host == "127.0.0.1" || Settings.Host == "localhost" }; if (category != null) { status.OutputRootFolders = new List <String> { _remotePathMappingService.RemapRemoteToLocal(Settings.Host, category.FullPath) }; } return(status); }
public override DownloadClientStatus GetStatus() { var config = _proxy.GetConfig(Settings); var destDir = new OsPath(config.GetValueOrDefault("download_location") as string); if (config.GetValueOrDefault("move_completed", false).ToString() == "True") { destDir = new OsPath(config.GetValueOrDefault("move_completed_path") as string); } var status = new DownloadClientStatus { IsLocalhost = Settings.Host == "127.0.0.1" || Settings.Host == "localhost" }; if (!destDir.IsEmpty) { status.OutputRootFolders = new List <OsPath> { _remotePathMappingService.RemapRemoteToLocal(Settings.Host, destDir) }; } return(status); }
public override DownloadClientStatus GetStatus() { var config = _proxy.GetConfig(Settings); OsPath destDir = new OsPath(null); if (config.GetValueOrDefault("dir_active_download_flag") == "true") { destDir = new OsPath(config.GetValueOrDefault("dir_active_download")); } if (config.GetValueOrDefault("dir_completed_download_flag") == "true") { destDir = new OsPath(config.GetValueOrDefault("dir_completed_download")); if (config.GetValueOrDefault("dir_add_label") == "true") { destDir = destDir + Settings.TvCategory; } } var status = new DownloadClientStatus { IsLocalhost = Settings.Host == "127.0.0.1" || Settings.Host == "localhost" }; if (!destDir.IsEmpty) { status.OutputRootFolders = new List <OsPath> { _remotePathMappingService.RemapRemoteToLocal(Settings.Host, destDir) }; } return(status); }
public override DownloadClientStatus GetStatus() { var status = new DownloadClientStatus { IsLocalhost = true }; return(status); }
public override DownloadClientStatus GetStatus() { var status = new DownloadClientStatus { IsLocalhost = Settings.Host == "127.0.0.1" || Settings.Host == "localhost" }; return(status); }
public override DownloadClientStatus GetStatus() { // XXX: This function's correctness has not been considered var status = new DownloadClientStatus { IsLocalhost = Settings.Host == "127.0.0.1" || Settings.Host == "localhost" }; return(status); }
private DownloadClientStatus WithStatus(DownloadClientStatus status) { Mocker.GetMock <IDownloadClientStatusRepository>() .Setup(v => v.FindByProviderId(1)) .Returns(status); Mocker.GetMock <IDownloadClientStatusRepository>() .Setup(v => v.All()) .Returns(new[] { status }); return(status); }
public override DownloadClientStatus GetStatus() { var config = _proxy.GetConfig(Settings); var destDir = new OsPath(config.GetValueOrDefault("bittorrent.defaultSavePath") as string); var status = new DownloadClientStatus { IsLocalhost = Settings.Host == "127.0.0.1" || Settings.Host == "localhost" }; if (!destDir.IsEmpty) { status.OutputRootFolders = new List <OsPath> { _remotePathMappingService.RemapRemoteToLocal(Settings.Host, destDir) }; } return(status); }
public override DownloadClientStatus GetStatus() { var config = _proxy.GetConfig(Settings); var category = GetCategories(config).FirstOrDefault(v => v.Name == Settings.TvCategory); var status = new DownloadClientStatus { IsLocalhost = Settings.Host == "127.0.0.1" || Settings.Host == "localhost" }; if (category != null) { status.OutputRootFolders = new List <OsPath> { _remotePathMappingService.RemapRemoteToLocal(Settings.Host, new OsPath(category.DestDir)) }; } return(status); }