mirror of
https://github.com/C9Glax/tranga.git
synced 2025-06-23 11:34:16 +02:00
Fix FilterJobsWithoutDownloading: Dont check if a job has a connector, that takes forever
This commit is contained in:
@ -241,8 +241,9 @@ public static class Tranga
|
|||||||
|
|
||||||
private static List<Job> FilterJobsWithoutDownloading(this List<Job> jobs)
|
private static List<Job> FilterJobsWithoutDownloading(this List<Job> jobs)
|
||||||
{
|
{
|
||||||
|
JobType[] types = [JobType.MoveFileOrFolderJob, JobType.MoveMangaLibraryJob, JobType.UpdateChaptersDownloadedJob];
|
||||||
DateTime start = DateTime.UtcNow;
|
DateTime start = DateTime.UtcNow;
|
||||||
List<Job> ret = jobs.Where(j => GetJobConnector(j) is null).ToList();
|
List<Job> ret = jobs.Where(j => types.Contains(j.JobType)).ToList();
|
||||||
DateTime end = DateTime.UtcNow;
|
DateTime end = DateTime.UtcNow;
|
||||||
Log.Debug($"Filtering Jobs without Download took {end.Subtract(start).TotalMilliseconds}ms");
|
Log.Debug($"Filtering Jobs without Download took {end.Subtract(start).TotalMilliseconds}ms");
|
||||||
return ret;
|
return ret;
|
||||||
|
Reference in New Issue
Block a user