aboutsummaryrefslogtreecommitdiffhomepage
path: root/js
diff options
context:
space:
mode:
authorCiaran Gallagher <[email protected]>2019-12-02 21:59:50 +0000
committerCiaran Gallagher <[email protected]>2019-12-02 21:59:50 +0000
commit8647613afc0f738afd4118f5da524b2216d5988e (patch)
tree0a8b3b0dff169d18b8103d8713dacc6bab129626 /js
parent699c5e0dcdceb3028fd67c08eb0ecb1c801de8f6 (diff)
downloadpasta-8647613afc0f738afd4118f5da524b2216d5988e.tar.gz
pasta-8647613afc0f738afd4118f5da524b2216d5988e.zip
Change success fade out and button rounding
Diffstat (limited to 'js')
-rw-r--r--js/main.js62
1 files changed, 44 insertions, 18 deletions
diff --git a/js/main.js b/js/main.js
index ff34e77..534617b 100644
--- a/js/main.js
+++ b/js/main.js
@@ -375,7 +375,7 @@ async function setAudioStream(partsId, streamId, row) {
$(row).addClass("table-active").addClass("success-transition");
setTimeout(() => {
$(row).removeClass('success-transition');
- }, 1500);
+ }, 1750);
},
"error": (data) => {
console.log("ERROR L283");
@@ -441,7 +441,8 @@ async function setAudioStream(partsId, streamId, row) {
let potentialMatches = [];
let selectedTrack = {
"matchId": "",
- "matchLevel": 0
+ "matchLevel": 0,
+ "matchName": ""
};
let bestMatch;
@@ -453,11 +454,13 @@ async function setAudioStream(partsId, streamId, row) {
if (episodeStreams[j].selected == true) {
selectedTrack.matchId = episodeStreams[j].id;
selectedTrack.matchLevel = 6;
+ selectedTrack.matchName = episodeStreams[j].displayTitle;
}
else {
potentialMatches.push({
"matchId": episodeStreams[j].id,
- "matchLevel": 6
+ "matchLevel": 6,
+ "matchName": episodeStreams[j].displayTitle
});
}
}
@@ -466,11 +469,13 @@ async function setAudioStream(partsId, streamId, row) {
if (episodeStreams[j].selected == true) {
selectedTrack.matchId = episodeStreams[j].id;
selectedTrack.matchLevel = 5;
+ selectedTrack.matchName = episodeStreams[j].displayTitle;
}
else {
potentialMatches.push({
"matchId": episodeStreams[j].id,
- "matchLevel": 5
+ "matchLevel": 5,
+ "matchName": episodeStreams[j].displayTitle
});
}
}
@@ -479,11 +484,13 @@ async function setAudioStream(partsId, streamId, row) {
if (episodeStreams[j].selected == true) {
selectedTrack.matchId = episodeStreams[j].id;
selectedTrack.matchLevel = 4;
+ selectedTrack.matchName = episodeStreams[j].displayTitle;
}
else {
potentialMatches.push({
"matchId": episodeStreams[j].id,
- "matchLevel": 4
+ "matchLevel": 4,
+ "matchName": episodeStreams[j].displayTitle
});
}
}
@@ -492,11 +499,13 @@ async function setAudioStream(partsId, streamId, row) {
if (episodeStreams[j].selected == true) {
selectedTrack.matchId = episodeStreams[j].id;
selectedTrack.matchLevel = 3;
+ selectedTrack.matchName = episodeStreams[j].displayTitle;
}
else {
potentialMatches.push({
"matchId": episodeStreams[j].id,
- "matchLevel": 3
+ "matchLevel": 3,
+ "matchName": episodeStreams[j].displayTitle
});
}
}
@@ -505,11 +514,13 @@ async function setAudioStream(partsId, streamId, row) {
if (episodeStreams[j].selected == true) {
selectedTrack.matchId = episodeStreams[j].id;
selectedTrack.matchLevel = 2;
+ selectedTrack.matchName = episodeStreams[j].displayTitle;
}
else {
potentialMatches.push({
"matchId": episodeStreams[j].id,
- "matchLevel": 2
+ "matchLevel": 2,
+ "matchName": episodeStreams[j].displayTitle
});
}
}
@@ -518,11 +529,13 @@ async function setAudioStream(partsId, streamId, row) {
if (episodeStreams[j].selected == true) {
selectedTrack.matchId = episodeStreams[j].id;
selectedTrack.matchLevel = 1;
+ selectedTrack.matchName = episodeStreams[j].displayTitle;
}
else {
potentialMatches.push({
"matchId": episodeStreams[j].id,
- "matchLevel": 1
+ "matchLevel": 1,
+ "matchName": episodeStreams[j].displayTitle
});
}
}
@@ -563,7 +576,7 @@ async function setAudioStream(partsId, streamId, row) {
},
"success": (data) => {
//console.log(`Episode: ${episodeData.MediaContainer.Metadata[0].title} updated with Audio Track: ${newStreamId} because of a match on ${matchType}`);
- $('#progressModal #modalBodyText').append(`<span><strong>${episodeData.MediaContainer.Metadata[0].title}</strong> updated with Audio Track: <strong>${bestMatch.matchId}</strong> because of a match on <strong>${matchType}</strong></span><br />`);
+ $('#progressModal #modalBodyText').append(`<span><strong>${episodeData.MediaContainer.Metadata[0].title}</strong> updated with Audio Track: <strong>${bestMatch.matchName}</strong> because of a match on <strong>${matchType}</strong></span><br />`);
$(row).siblings().removeClass("table-active");
$(row).addClass("table-active");
},
@@ -608,7 +621,7 @@ async function setSubtitleStream(partsId, streamId, row) {
$(row).addClass("table-active").addClass("success-transition");
setTimeout(() => {
$(row).removeClass('success-transition');
- }, 1500);
+ }, 1750);
},
"error": (data) => {
console.log("ERROR L449");
@@ -676,7 +689,8 @@ async function setSubtitleStream(partsId, streamId, row) {
let potentialMatches = [];
let selectedTrack = {
"matchId": "",
- "matchLevel": 0
+ "matchLevel": 0,
+ "matchName": ""
};
let bestMatch;
@@ -688,11 +702,13 @@ async function setSubtitleStream(partsId, streamId, row) {
if (episodeStreams[j].selected == true) {
selectedTrack.matchId = episodeStreams[j].id;
selectedTrack.matchLevel = 6;
+ selectedTrack.matchName = episodeStreams[j].displayTitle;
}
else {
potentialMatches.push({
"matchId": episodeStreams[j].id,
- "matchLevel": 6
+ "matchLevel": 6,
+ "matchName": episodeStreams[j].displayTitle
});
}
}
@@ -701,11 +717,13 @@ async function setSubtitleStream(partsId, streamId, row) {
if (episodeStreams[j].selected == true) {
selectedTrack.matchId = episodeStreams[j].id;
selectedTrack.matchLevel = 5;
+ selectedTrack.matchName = episodeStreams[j].displayTitle;
}
else {
potentialMatches.push({
"matchId": episodeStreams[j].id,
- "matchLevel": 5
+ "matchLevel": 5,
+ "matchName": episodeStreams[j].displayTitle
});
}
}
@@ -714,11 +732,13 @@ async function setSubtitleStream(partsId, streamId, row) {
if (episodeStreams[j].selected == true) {
selectedTrack.matchId = episodeStreams[j].id;
selectedTrack.matchLevel = 4;
+ selectedTrack.matchName = episodeStreams[j].displayTitle;
}
else {
potentialMatches.push({
"matchId": episodeStreams[j].id,
- "matchLevel": 4
+ "matchLevel": 4,
+ "matchName": episodeStreams[j].displayTitle
});
}
}
@@ -727,11 +747,13 @@ async function setSubtitleStream(partsId, streamId, row) {
if (episodeStreams[j].selected == true) {
selectedTrack.matchId = episodeStreams[j].id;
selectedTrack.matchLevel = 3;
+ selectedTrack.matchName = episodeStreams[j].displayTitle;
}
else {
potentialMatches.push({
"matchId": episodeStreams[j].id,
- "matchLevel": 3
+ "matchLevel": 3,
+ "matchName": episodeStreams[j].displayTitle
});
}
}
@@ -740,11 +762,13 @@ async function setSubtitleStream(partsId, streamId, row) {
if (episodeStreams[j].selected == true) {
selectedTrack.matchId = episodeStreams[j].id;
selectedTrack.matchLevel = 2;
+ selectedTrack.matchName = episodeStreams[j].displayTitle;
}
else {
potentialMatches.push({
"matchId": episodeStreams[j].id,
- "matchLevel": 2
+ "matchLevel": 2,
+ "matchName": episodeStreams[j].displayTitle
});
}
}
@@ -753,11 +777,13 @@ async function setSubtitleStream(partsId, streamId, row) {
if (episodeStreams[j].selected == true) {
selectedTrack.matchId = episodeStreams[j].id;
selectedTrack.matchLevel = 1;
+ selectedTrack.matchName = episodeStreams[j].displayTitle;
}
else {
potentialMatches.push({
"matchId": episodeStreams[j].id,
- "matchLevel": 1
+ "matchLevel": 1,
+ "matchName": episodeStreams[j].displayTitle
});
}
}
@@ -798,7 +824,7 @@ async function setSubtitleStream(partsId, streamId, row) {
},
"success": (data) => {
//console.log(`Episode: ${episodeData.MediaContainer.Metadata[0].title} updated with Subtitle Track: ${currentMatch.matchId} because of a match on ${matchType}`);
- $('#progressModal #modalBodyText').append(`<span><strong>${episodeData.MediaContainer.Metadata[0].title}</strong> updated with Subtitle Track: <strong>${bestMatch.matchId}</strong> because of a match on <strong>${matchType}</strong></span><br />`);
+ $('#progressModal #modalBodyText').append(`<span><strong>${episodeData.MediaContainer.Metadata[0].title}</strong> updated with Subtitle Track: <strong>${bestMatch.matchName}</strong> because of a match on <strong>${matchType}</strong></span><br />`);
$(row).siblings().removeClass("table-active");
$(row).addClass("table-active");
},