Fixed Bug on AddTask where no new UpdateLibraryTask would be added

This commit is contained in:
glax 2023-06-15 22:32:55 +02:00
parent 36c145da26
commit 303fc293ba
2 changed files with 5 additions and 3 deletions

View File

@ -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 =

View File

@ -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);
}