diff --git a/Jellyfin.Plugin.SRFPlay/Configuration/configPage.html b/Jellyfin.Plugin.SRFPlay/Configuration/configPage.html index fa0bb56..eab79d2 100644 --- a/Jellyfin.Plugin.SRFPlay/Configuration/configPage.html +++ b/Jellyfin.Plugin.SRFPlay/Configuration/configPage.html @@ -288,8 +288,9 @@ fetch(this.apiBase + '/All', { headers: this.getHeaders() }) .then(function(r) { return r.json(); }) .then(function(recordings) { + var activeStates = ['Scheduled', 'WaitingForStream', 'Recording', 0, 1, 2]; var active = recordings.filter(function(r) { - return r.state === 0 || r.state === 1 || r.state === 2; + return activeStates.indexOf(r.state) !== -1; }); if (active.length === 0) { @@ -297,8 +298,8 @@ return; } - var stateLabels = {0: 'Scheduled', 1: 'Waiting', 2: 'Recording', 3: 'Completed', 4: 'Failed', 5: 'Cancelled'}; - var stateColors = {0: '#2196F3', 1: '#FF9800', 2: '#4CAF50', 4: '#f44336', 5: '#9E9E9E'}; + var stateLabels = {'Scheduled': 'Scheduled', 'WaitingForStream': 'Waiting', 'Recording': 'Recording', 'Completed': 'Completed', 'Failed': 'Failed', 'Cancelled': 'Cancelled', 0: 'Scheduled', 1: 'Waiting', 2: 'Recording', 3: 'Completed', 4: 'Failed', 5: 'Cancelled'}; + var stateColors = {'Scheduled': '#2196F3', 'WaitingForStream': '#FF9800', 'Recording': '#4CAF50', 'Failed': '#f44336', 'Cancelled': '#9E9E9E', 0: '#2196F3', 1: '#FF9800', 2: '#4CAF50', 4: '#f44336', 5: '#9E9E9E'}; var html = ''; html += ''; @@ -314,7 +315,7 @@ html += ''; html += ''; html += '
' + (stateLabels[r.state] || r.state) + '' + SRFPlayRecordings.formatDate(r.validFrom) + ''; - if (r.state === 2) { + if (r.state === 2 || r.state === 'Recording') { html += ''; } else {