From 4f11a75a4ef53fee2628328b8f660aeb6da81790 Mon Sep 17 00:00:00 2001 From: Thegan Govender Date: Mon, 20 Nov 2023 22:00:41 +0200 Subject: [PATCH] Update sync.js code/comment cleanup --- backend/routes/sync.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/backend/routes/sync.js b/backend/routes/sync.js index 8e90396..4df0859 100644 --- a/backend/routes/sync.js +++ b/backend/routes/sync.js @@ -442,7 +442,7 @@ async function syncLibraryItems(data) syncTask.loggedData.push({ color: "yellow", Message: "Item Sync Complete" }); } -async function syncShowItems(data,library_items) +async function syncShowItems(data) { syncTask.loggedData.push({ color: "lawngreen", Message: "Syncing... 2/4" }); @@ -497,8 +497,6 @@ async function syncShowItems(data,library_items) episodesToInsert=episodesToInsert.filter((episode) => !existingIdsEpisodes.some((id) => id === episode.EpisodeId )); } - // console.log(episodesToInsert); - //Bulkinsert new data not on db if (seasonsToInsert.length !== 0) { @@ -650,7 +648,6 @@ async function syncItemInfo(seasons_and_episodes,library_items) if (EpisodeInfoToInsert.length !== 0) { - console.log("Inserting" + EpisodeInfoToInsert.length); let result = await db.insertBulk("jf_item_info",EpisodeInfoToInsert,jf_item_info_columns); if (result.Result === "SUCCESS") { insertEpisodeInfoCount += EpisodeInfoToInsert.length-existingEpisodeItemInfo.length; @@ -886,7 +883,7 @@ async function fullSync(triggertype) await syncLibraryItems(library_items); //syncShowItems - await syncShowItems(seasons_and_episodes,library_items); + await syncShowItems(seasons_and_episodes); //syncItemInfo await syncItemInfo(seasons_and_episodes,library_items); @@ -1002,7 +999,7 @@ async function partialSync(triggertype) await syncLibraryItems(library_items); //syncShowItems - await syncShowItems(seasons_and_episodes,library_items); + await syncShowItems(seasons_and_episodes); //syncItemInfo await syncItemInfo(seasons_and_episodes,library_items);