Fixed Bug on AddTask where no new UpdateLibraryTask would be added
This commit is contained in:
parent
36c145da26
commit
303fc293ba
@ -144,8 +144,9 @@ public class TaskManager
|
||||
{
|
||||
case TrangaTask.Task.UpdateLibraries:
|
||||
//Only one UpdateKomgaLibrary Task
|
||||
logger?.WriteLine(this.GetType().ToString(), $"Removing old {newTask.task}-Task.");
|
||||
logger?.WriteLine(this.GetType().ToString(), $"Replacing old {newTask.task}-Task.");
|
||||
_allTasks.RemoveWhere(trangaTask => trangaTask.task is TrangaTask.Task.UpdateLibraries);
|
||||
_allTasks.Add(newTask);
|
||||
break;
|
||||
case TrangaTask.Task.DownloadNewChapters:
|
||||
IEnumerable<TrangaTask> matchingdnc =
|
||||
|
@ -333,14 +333,16 @@ function GetSettingsClick(){
|
||||
}
|
||||
|
||||
function UpdateLibrarySettings(){
|
||||
if(settingKomgaUrl.value != "" && settingKomgaUser.value != "" && settingKomgaPass != ""){
|
||||
if(settingKomgaUrl.value != "" && settingKomgaUser.value != "" && settingKomgaPass.value != ""){
|
||||
var auth = utf8_to_b64(`${settingKomgaUser.value}:${settingKomgaPass.value}`);
|
||||
console.log(auth);
|
||||
UpdateKomga(settingKomgaUrl.value, auth);
|
||||
CreateUpdateLibraryTask(libraryUpdateTime.value);
|
||||
}
|
||||
|
||||
if(settingKavitaUrl.value != "" && settingKavitaUser.value != "" && settingKavitaPass.value != ""){
|
||||
UpdateKavita(settingKavitaUrl.value, settingKavitaUser.value, settingKavitaPass.value);
|
||||
CreateUpdateLibraryTask(libraryUpdateTime.value);
|
||||
}
|
||||
|
||||
if(settingGotifyUrl.value != "" && settingGotifyAppToken.value != ""){
|
||||
@ -351,7 +353,6 @@ function UpdateLibrarySettings(){
|
||||
UpdateLunaSea(settingLunaseaWebhook.value);
|
||||
}
|
||||
|
||||
CreateUpdateLibraryTask(libraryUpdateTime.value);
|
||||
setTimeout(() => GetSettingsClick(), 200);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user