From 8168f7631fb22edd6157ef51bf6cfe814c014ae9 Mon Sep 17 00:00:00 2001 From: lowercasedonkey <lowercasedonkey@gmail.com> Date: Sat, 1 Aug 2020 23:29:07 -0400 Subject: [PATCH] start --- src/pregmod/FCTV/FCTV.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/pregmod/FCTV/FCTV.js b/src/pregmod/FCTV/FCTV.js index b283e07d401..3f2bda70a46 100644 --- a/src/pregmod/FCTV/FCTV.js +++ b/src/pregmod/FCTV/FCTV.js @@ -165,7 +165,7 @@ globalThis.FCTV = (function() { } */ const epLength = App.Data.FCTV.shows[i].episode.length; - + let low = 0; let max = epLength; if (V.usedRemote) { @@ -186,7 +186,7 @@ globalThis.FCTV = (function() { globalThis.FCTVdisplay = function({ usedRemote = 0, seeAll = 0 } = {}) { - return watch({ usedRemote:usedRemote, seeAll:seeAll }); + return watch({ usedRemote: usedRemote, seeAll: seeAll }); function watch({ usedRemote = 0, seeAll = 0 } = {}) { let p; @@ -262,6 +262,11 @@ globalThis.FCTVdisplay = function({ usedRemote = 0, seeAll = 0 } = {}) { div.append(`It looks like the random function chose `); } App.UI.DOM.appendNewElement("span", div, `channel number: ${V.FCTV.channel.selected}`, "bold"); + if () { + + } else { + + } } div.append(displayShow()); p.append(div); @@ -373,8 +378,8 @@ globalThis.FCTVdisplay = function({ usedRemote = 0, seeAll = 0 } = {}) { epToShow = viewedCount; } else if (channel.loop === true) { // How many times have we been through this series. Lets say we watched 10 episodes, but there are only 3 uniques [0,1,2]. - const watchedEntireSeason = Math.trunc(viewedCount/availableEp); // we went through 3 times fully - epToShow = viewedCount-(watchedEntireSeason*availableEp); // 10 - 3 seasons (9) is 1. So our last epiode was the first, 0 in the array. And 1 is the next ep! + const watchedEntireSeason = Math.trunc(viewedCount / availableEp); // we went through 3 times fully + epToShow = viewedCount - (watchedEntireSeason * availableEp); // 10 - 3 seasons (9) is 1. So our last epiode was the first, 0 in the array. And 1 is the next ep! } else { // We have seen all the episodes, return a random one epToShow = jsRandom(0, availableEp); } -- GitLab