diff options
author | cglatot <[email protected]> | 2024-07-17 11:25:20 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2024-07-17 11:25:20 +0100 |
commit | 6688481339c3da6dc7989493a2b9bf26246f08ec (patch) | |
tree | 9e4ab50d6a12ec8089e67f090ab7e8267bea148f | |
parent | 5f765c0c9677fad9229482d9600640bcd636311d (diff) | |
parent | 2ff9e0a05ac65d54f9a341297357f1587b07107d (diff) | |
download | pasta-6688481339c3da6dc7989493a2b9bf26246f08ec.tar.gz pasta-6688481339c3da6dc7989493a2b9bf26246f08ec.zip |
[QOL] Make confirmation episode list alphabetical
-rw-r--r-- | js/main.js | 32 |
1 files changed, 23 insertions, 9 deletions
@@ -1085,12 +1085,10 @@ async function setAudioStream(partsId, streamId, row) { "X-Plex-Token": plexToken, "Accept": "application/json" } - }).then((result) => { - $('#progressModal #modalBodyText').append(data.messageAppend); - $(row).siblings().removeClass("table-active"); - $(row).addClass("table-active"); + }).then((_result) => { handleProgress(); - }).catch((e) => console.log(e)); + return data; + }); } for (let k = 0; k < promiseConstructors.length; k++) { @@ -1107,6 +1105,15 @@ async function setAudioStream(partsId, streamId, row) { try { Promise.allSettled(matchPromises).then(() => { + matchPromises.forEach(async (matchPromise) => { + await matchPromise.then((data) => { + $('#progressModal #modalBodyText').append(data.messageAppend); + $(row).siblings().removeClass("table-active"); + $(row).addClass("table-active"); + }).catch((e) => console.log(e)); + }) + }) + .then(() => { $('#modalBodyText .alert').removeClass("alert-warning").addClass("alert-success"); $("#modalBodyText #modalTitleText").text("Processing Complete! You can now close this popup."); $('#modalBodyText #progressBarContainer').hide(); @@ -1394,11 +1401,9 @@ async function setSubtitleStream(partsId, streamId, row) { "X-Plex-Token": plexToken, "Accept": "application/json" } - }).then((result) => { - $('#progressModal #modalBodyText').append(data.messageAppend); - $(row).siblings().removeClass("table-active"); - $(row).addClass("table-active"); + }).then((_result) => { handleProgress(); + return data; }).catch((e) => console.log(e)); } @@ -1416,6 +1421,15 @@ async function setSubtitleStream(partsId, streamId, row) { try { Promise.allSettled(matchPromises).then(() => { + matchPromises.forEach(async (matchPromise) => { + await matchPromise.then((data) => { + $('#progressModal #modalBodyText').append(data.messageAppend); + $(row).siblings().removeClass("table-active"); + $(row).addClass("table-active"); + }).catch((e) => console.log(e)); + }) + }) + .then(() => { $('#modalBodyText .alert').removeClass("alert-warning").addClass("alert-success"); $("#modalBodyText #modalTitleText").text("Processing Complete! You can now close this popup."); $('#modalBodyText #progressBarContainer').hide(); |