Skip to content
Snippets Groups Projects
Commit d0b1994f authored by svornost's avatar svornost
Browse files

Fix FCTV BC

parent b26ca00f
No related branches found
No related tags found
1 merge request!7294Fix slave description dialog ignoring $seeImages again
...@@ -17,7 +17,6 @@ weekEnabled - The week FCTV was installed. ...@@ -17,7 +17,6 @@ weekEnabled - The week FCTV was installed.
globalThis.FCTV = (function() { globalThis.FCTV = (function() {
return { return {
channels: channels, channels: channels,
initChannels: initChannels,
showChannel: showChannel, showChannel: showChannel,
incrementChannel: incrementChannel, incrementChannel: incrementChannel,
incrementShow: incrementShow, incrementShow: incrementShow,
...@@ -30,15 +29,6 @@ globalThis.FCTV = (function() { ...@@ -30,15 +29,6 @@ globalThis.FCTV = (function() {
return [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]; 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) { function showChannel(i) {
let x = { let x = {
canSelect: 1, canSelect: 1,
......
...@@ -4,6 +4,16 @@ App.Update.FCTV = function() { ...@@ -4,6 +4,16 @@ App.Update.FCTV = function() {
function convert(a, b) { function convert(a, b) {
return V.FCTVreceiver ? 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 = V.FCTV || {};
V.FCTV.receiver = V.FCTV.receiver > -1 ? V.FCTV.receiver : -1; V.FCTV.receiver = V.FCTV.receiver > -1 ? V.FCTV.receiver : -1;
if (convert && V.receiverAvailable) { if (convert && V.receiverAvailable) {
...@@ -11,7 +21,7 @@ App.Update.FCTV = function() { ...@@ -11,7 +21,7 @@ App.Update.FCTV = function() {
} }
V.FCTV.pcViewership = V.FCTV.pcViewership || {}; V.FCTV.pcViewership = V.FCTV.pcViewership || {};
V.FCTV.channel = V.FCTV.channel || {}; V.FCTV.channel = V.FCTV.channel || {};
FCTV.initChannels(); initChannels();
V.FCTV.channel.last = convert(V.lastShow, V.FCTV.channel.last) || -1; V.FCTV.channel.last = convert(V.lastShow, V.FCTV.channel.last) || -1;
V.FCTV.pcViewership.count = convert(V.FCTVcount, V.FCTV.pcViewership.count) || 0; V.FCTV.pcViewership.count = convert(V.FCTVcount, V.FCTV.pcViewership.count) || 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment