diff --git a/src/pregmod/FCTV/FCTV.js b/src/pregmod/FCTV/FCTV.js index 03ad5e619ffdb391b806ba2fbbbff862122e5d66..dddd2dd60bca9a4b1a6c5752bbd1aaf4f13ca7c2 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 2329ce3b3c92336cd8525015f493c4d3d76ecadf..820799a07febba8717bc81f9a6f65bd95edfe932 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;