mirror of
https://github.com/BreizhHardware/Jellystat.git
synced 2026-01-18 16:27:20 +01:00
Update sync.js
code/comment cleanup
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user