Compare commits

..

No commits in common. "e14683d21ae406db2bee25ef725da810095c55df" and "a2e9a3f34a8d27ee3ec21aa2c2e26ddf63eb6edf" have entirely different histories.

View File

@ -207,7 +207,7 @@ public class TaskManager
/// </summary> /// </summary>
/// <param name="task">TrangaTask.Task type</param> /// <param name="task">TrangaTask.Task type</param>
/// <param name="connectorName">Name of Connector that was used</param> /// <param name="connectorName">Name of Connector that was used</param>
/// <param name="publicationId">Publication that was used</param> /// <param name="publication">Publication that was used</param>
public void DeleteTask(TrangaTask.Task task, string? connectorName, string? publicationId) public void DeleteTask(TrangaTask.Task task, string? connectorName, string? publicationId)
{ {
logger?.WriteLine(this.GetType().ToString(), $"Removing Task {task} {publicationId}"); logger?.WriteLine(this.GetType().ToString(), $"Removing Task {task} {publicationId}");
@ -220,13 +220,13 @@ public class TaskManager
_allTasks.RemoveWhere(trangaTask => trangaTask.task is TrangaTask.Task.UpdateLibraries); _allTasks.RemoveWhere(trangaTask => trangaTask.task is TrangaTask.Task.UpdateLibraries);
break; break;
case TrangaTask.Task.DownloadNewChapters: case TrangaTask.Task.DownloadNewChapters:
if (connectorName is null || publicationId is null) if(connectorName is null || publicationId is null)
logger?.WriteLine(this.GetType().ToString(), "connectorName and publication can not be null"); logger?.WriteLine(this.GetType().ToString(), "connectorName and publication can not be null");
else else
_allTasks.RemoveWhere(mTask => _allTasks.RemoveWhere(mTask =>
mTask.GetType() == typeof(DownloadNewChaptersTask) && mTask.GetType() == typeof(DownloadNewChaptersTask) &&
((DownloadNewChaptersTask)mTask).publication.internalId == publicationId && ((DownloadNewChaptersTask)mTask).publication.internalId != publicationId &&
((DownloadNewChaptersTask)mTask).connectorName == connectorName!); ((DownloadNewChaptersTask)mTask).connectorName != connectorName!);
break; break;
} }
ExportDataAndSettings(); ExportDataAndSettings();