…lines 1–214 unchanged (214 lines)
215 public override DownloadClientInfo GetStatus()
216 {
217 var config = _proxy.GetConfig(Settings);
218 var label = _proxy.GetLabelOptions(Settings);
219
220 OsPath destDir;
221
222 if (Settings.CompletedDirectory.IsNotNullOrWhiteSpace())
223 {
224 destDir = new OsPath(Settings.CompletedDirectory);
225 }
226 else if (Settings.DownloadDirectory.IsNotNullOrWhiteSpace())
227 {
228 destDir = new OsPath(Settings.DownloadDirectory);
229 }
230 else if (label is { ApplyMoveCompleted: true, MoveCompleted: true })
231 {
232 // if label exists and a label completed path exists and is enabled use it instead of global
233 destDir = new OsPath(label.MoveCompletedPath);
234 }
235 else if (config.GetValueOrDefault("move_completed", false).ToString() == "True")
236 {
237 destDir = new OsPath(config.GetValueOrDefault("move_completed_path") as string);
238 }
239 else
240 {
241 destDir = new OsPath(config.GetValueOrDefault("download_location") as string);
242 }
243
244 var status = new DownloadClientInfo
245 {
246 IsLocalhost = Settings.Host is "127.0.0.1" or "localhost"
247 };
248
249 if (!destDir.IsEmpty)
250 {
251 status.OutputRootFolders = new List<OsPath> { _remotePathMappingService.RemapRemoteToLocal(Settings.Host, destDir) };
252 }
…lines 253–384 unchanged (132 lines)