From d0b1994f6cdb45c169959742ea44b38b09d093be Mon Sep 17 00:00:00 2001 From: Svornost <11434-svornost@users.noreply.gitgud.io> Date: Wed, 29 Jul 2020 19:03:25 -0700 Subject: [PATCH] Fix FCTV BC --- src/pregmod/FCTV/FCTV.js | 10 ---------- src/pregmod/FCTV/FCTVBC.js | 12 +++++++++++- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/pregmod/FCTV/FCTV.js b/src/pregmod/FCTV/FCTV.js index 03ad5e619ff..dddd2dd60bc 100644 --- a/src/pregmod/FCTV/FCTV.js +++ b/src/pregmod/FCTV/FCTV.js @@ -17,7 +17,6 @@ weekEnabled - The week FCTV was installed. globalThis.FCTV = (function() { return { channels: channels, - initChannels: initChannels, showChannel: showChannel, incrementChannel: incrementChannel, incrementShow: incrementShow, @@ -30,15 +29,6 @@ globalThis.FCTV = (function() { return [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]; } - function initChannels() { - const channelList = FCTV.channels(); - for (let i = 0; i < channelList.length; i++) { - const channel = num(channelList[i], true); - const currentChannel = 'show' + capFirstChar(channel); - V.FCTV.channel[channel] = convert(V[currentChannel], V.FCTV.channel[channel]) || 0; - } - } - function showChannel(i) { let x = { canSelect: 1, diff --git a/src/pregmod/FCTV/FCTVBC.js b/src/pregmod/FCTV/FCTVBC.js index 2329ce3b3c9..820799a07fe 100644 --- a/src/pregmod/FCTV/FCTVBC.js +++ b/src/pregmod/FCTV/FCTVBC.js @@ -4,6 +4,16 @@ App.Update.FCTV = function() { function convert(a, b) { return V.FCTVreceiver ? a : b; } + + function initChannels() { + const channelList = FCTV.channels(); + for (let i = 0; i < channelList.length; i++) { + const channel = num(channelList[i], true); + const currentChannel = 'show' + capFirstChar(channel); + V.FCTV.channel[channel] = convert(V[currentChannel], V.FCTV.channel[channel]) || 0; + } + } + V.FCTV = V.FCTV || {}; V.FCTV.receiver = V.FCTV.receiver > -1 ? V.FCTV.receiver : -1; if (convert && V.receiverAvailable) { @@ -11,7 +21,7 @@ App.Update.FCTV = function() { } V.FCTV.pcViewership = V.FCTV.pcViewership || {}; V.FCTV.channel = V.FCTV.channel || {}; - FCTV.initChannels(); + initChannels(); V.FCTV.channel.last = convert(V.lastShow, V.FCTV.channel.last) || -1; V.FCTV.pcViewership.count = convert(V.FCTVcount, V.FCTV.pcViewership.count) || 0; -- GitLab