From cf4a60cd914bb05a71940a9968fb14d320da2ff3 Mon Sep 17 00:00:00 2001 From: vexorian Date: Sun, 28 Feb 2021 23:05:06 -0400 Subject: [PATCH 01/12] Prepare 1.2.5 development --- README.md | 2 +- src/constants.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e5f159e..23c5af8 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# dizqueTV 1.2.4-prerelease +# dizqueTV 1.2.5-prerelease ![Discord](https://img.shields.io/discord/711313431457693727?logo=discord&logoColor=fff&style=flat-square) ![GitHub top language](https://img.shields.io/github/languages/top/vexorian/dizquetv?logo=github&style=flat-square) ![Docker Pulls](https://img.shields.io/docker/pulls/vexorian/dizquetv?logo=docker&logoColor=fff&style=flat-square) Create live TV channel streams from media on your Plex servers. diff --git a/src/constants.js b/src/constants.js index 078a40a..f44d83e 100644 --- a/src/constants.js +++ b/src/constants.js @@ -5,5 +5,5 @@ module.exports = { TVGUIDE_MAXIMUM_FLEX_DURATION : 6 * 60 * 60 * 1000, TOO_FREQUENT: 100, - VERSION_NAME: "1.2.4-prerelease" + VERSION_NAME: "1.2.5-prerelease" } From 275ae23e1e07df8a28127647e882daae26eeb785 Mon Sep 17 00:00:00 2001 From: vexorian Date: Sun, 28 Feb 2021 23:03:11 -0400 Subject: [PATCH 02/12] Fix season/episode numbers not appearing in TiViMate, possibly other clients --- src/xmltv.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/xmltv.js b/src/xmltv.js index 6d738b2..5cd8f9f 100644 --- a/src/xmltv.js +++ b/src/xmltv.js @@ -105,9 +105,15 @@ async function _writeProgramme(channel, program, xw) { xw.endElement() xw.startElement('episode-num') - xw.writeAttribute('system', 'xmltv_ns') - xw.text((program.sub.season - 1) + ' . ' + (program.sub.episode - 1) + ' . 0/1') + xw.writeAttribute('system', 'onscreen') + xw.text( "S" + (program.sub.season) + ' E' + (program.sub.episode) ) xw.endElement() + + xw.startElement('episode-num') + xw.writeAttribute('system', 'xmltv_ns') + xw.text((program.sub.season - 1) + '.' + (program.sub.episode - 1) + '.0/1') + xw.endElement() + } // Icon if (typeof program.icon !== 'undefined') { From 415add6a06f2bf84bdd03bef7dd3b96a20eb175f Mon Sep 17 00:00:00 2001 From: vexorian Date: Sun, 28 Feb 2021 23:09:32 -0400 Subject: [PATCH 03/12] Prepare 1.3.1 development --- README.md | 2 +- src/constants.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 94c2eb9..c561e27 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# dizqueTV 1.3.0-prerelease +# dizqueTV 1.3.1-prerelease ![Discord](https://img.shields.io/discord/711313431457693727?logo=discord&logoColor=fff&style=flat-square) ![GitHub top language](https://img.shields.io/github/languages/top/vexorian/dizquetv?logo=github&style=flat-square) ![Docker Pulls](https://img.shields.io/docker/pulls/vexorian/dizquetv?logo=docker&logoColor=fff&style=flat-square) Create live TV channel streams from media on your Plex servers. diff --git a/src/constants.js b/src/constants.js index bf45467..b223d2b 100644 --- a/src/constants.js +++ b/src/constants.js @@ -5,5 +5,5 @@ module.exports = { TVGUIDE_MAXIMUM_FLEX_DURATION : 6 * 60 * 60 * 1000, TOO_FREQUENT: 100, - VERSION_NAME: "1.3.0-prerelease" + VERSION_NAME: "1.3.1-prerelease" } From b9365115aa7c89b383586765e92c88c0b91b80ce Mon Sep 17 00:00:00 2001 From: vexorian Date: Sun, 28 Feb 2021 23:15:13 -0400 Subject: [PATCH 04/12] Remote attachment content-disposition from xmltv tv. Using URL rather than file is recommended for xmltv setup, and the attachment disposition encourages using the file. --- src/api.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/api.js b/src/api.js index 1e417b8..ea2d723 100644 --- a/src/api.js +++ b/src/api.js @@ -856,7 +856,6 @@ function api(db, channelDB, fillerDB, xmltvInterval, guideService, _m3uService, res.set('Cache-Control', 'no-store') res.type('application/xml'); - res.attachment('xmltv.xml'); let xmltvSettings = db['xmltv-settings'].find()[0]; From 80b1fb8ce77c631d9d28ae10807b7a68efc57ce2 Mon Sep 17 00:00:00 2001 From: timebomb0 Date: Sat, 6 Mar 2021 17:22:16 -0800 Subject: [PATCH 05/12] Improve logging around getting plex status --- src/plexTranscoder.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/plexTranscoder.js b/src/plexTranscoder.js index 21dd1ed..22b0017 100644 --- a/src/plexTranscoder.js +++ b/src/plexTranscoder.js @@ -416,8 +416,15 @@ X-Plex-Token=${this.server.accessToken}`; } updatePlex() { - this.log("Updating plex status") - axios.post(this.getStatusUrl()); + this.log("Updating plex status"); + const statusUrl = this.getStatusUrl(); + try { + axios.post(statusUrl); + } catch (error) { + this.log(`Problem updating Plex status using status URL ${statusUrl}:`); + this.log(error); + return false; + } this.currTimeMs += this.updateInterval; if (this.currTimeMs > this.duration) { this.currTimeMs = this.duration; From a2e698bf090216984f43425c1c60f83a15dc3ce5 Mon Sep 17 00:00:00 2001 From: vexorian Date: Sun, 14 Mar 2021 23:30:56 -0400 Subject: [PATCH 06/12] Make the UI use more horizontal space, this is specially good for tv guide. --- web/public/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/public/index.html b/web/public/index.html index 3b20003..5726c6f 100644 --- a/web/public/index.html +++ b/web/public/index.html @@ -12,7 +12,7 @@ -
+

dizqueTV From b4941a4e447b43372ec861f5269e62358bb524b5 Mon Sep 17 00:00:00 2001 From: vexorian Date: Sun, 14 Mar 2021 23:40:01 -0400 Subject: [PATCH 07/12] #277 TV Guide start with correct zoom settings. --- web/controllers/guide.js | 1 + 1 file changed, 1 insertion(+) diff --git a/web/controllers/guide.js b/web/controllers/guide.js index 1cbbb75..aa65776 100644 --- a/web/controllers/guide.js +++ b/web/controllers/guide.js @@ -340,6 +340,7 @@ module.exports = function ($scope, $timeout, dizquetv) { } } + $scope.adjustZoom(); $scope.refresh(); $scope.checkUpdates = async () => { From 4ee9f5c3e7cdd0608b84d6b42047fd0e59500286 Mon Sep 17 00:00:00 2001 From: vexorian Date: Sun, 14 Mar 2021 23:41:21 -0400 Subject: [PATCH 08/12] Make Discord invite take to the #rules channel so that members are less confused. --- web/public/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/public/index.html b/web/public/index.html index 5726c6f..a57f005 100644 --- a/web/public/index.html +++ b/web/public/index.html @@ -27,7 +27,7 @@ - + From 3a3567bc77216a434a12a16478778ac780136215 Mon Sep 17 00:00:00 2001 From: vexorian Date: Sun, 14 Mar 2021 23:43:27 -0400 Subject: [PATCH 09/12] #264 fix typo --- web/public/templates/channel-config.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/public/templates/channel-config.html b/web/public/templates/channel-config.html index f88c4b6..a4f9531 100644 --- a/web/public/templates/channel-config.html +++ b/web/public/templates/channel-config.html @@ -287,7 +287,7 @@ Add Flex...

-

Programs a Flex time slot. Normally you't use pad times, restrict times or add breaks to add a large quantity of Flex times at once, but this exists for more specific cases.

+

Programs a Flex time slot. Normally you'd use pad times, restrict times or add breaks to add a large quantity of Flex times at once, but this exists for more specific cases.

From 3b422b9bead8dee82e12527d280e9564e0642817 Mon Sep 17 00:00:00 2001 From: vexorian Date: Sun, 14 Mar 2021 23:56:49 -0400 Subject: [PATCH 10/12] #263 remove duplicates in programming before sending to time slots endpoint, so that it doesn't needlessly give 'request entity too large' --- web/directives/channel-config.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/web/directives/channel-config.js b/web/directives/channel-config.js index 92e0b19..467f37f 100644 --- a/web/directives/channel-config.js +++ b/web/directives/channel-config.js @@ -388,9 +388,8 @@ module.exports = function ($timeout, $location, dizquetv, resolutionOptions) { adjustStartTimeToCurrentProgram(); updateChannelDuration(); } - scope.removeDuplicates = () => { + let removeDuplicatesSub = (progs) => { let tmpProgs = {} - let progs = scope.channel.programs for (let i = 0, l = progs.length; i < l; i++) { if ( progs[i].type ==='redirect' ) { tmpProgs['_redirect ' + progs[i].channel + ' _ '+ progs[i].duration ] = progs[i]; @@ -405,7 +404,10 @@ module.exports = function ($timeout, $location, dizquetv, resolutionOptions) { for (let i = 0, l = keys.length; i < l; i++) { newProgs.push(tmpProgs[keys[i]]) } - scope.channel.programs = newProgs + return newProgs; + } + scope.removeDuplicates = () => { + scope.channel.programs = removeDuplicatesSub(scope.channel.programs); updateChannelDuration(); //oops someone forgot to add this } scope.removeOffline = () => { @@ -1854,7 +1856,8 @@ module.exports = function ($timeout, $location, dizquetv, resolutionOptions) { updateChannelDuration(); } scope.onTimeSlotsButtonClick = () => { - scope.timeSlots.startDialog(scope.channel.programs, scope.maxSize, scope.channel.scheduleBackup ); + let progs = removeDuplicatesSub( scope.channel.programs ); + scope.timeSlots.startDialog( progs, scope.maxSize, scope.channel.scheduleBackup ); } }, From 8889d5a456fa67cf3d3b2db2d527848147b4b06f Mon Sep 17 00:00:00 2001 From: vexorian Date: Mon, 15 Mar 2021 00:03:55 -0400 Subject: [PATCH 11/12] #263 Remove duplicates in programming before sending to random slots endpoint --- web/directives/channel-config.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web/directives/channel-config.js b/web/directives/channel-config.js index 9f3118f..2dc63a4 100644 --- a/web/directives/channel-config.js +++ b/web/directives/channel-config.js @@ -1886,7 +1886,8 @@ module.exports = function ($timeout, $location, dizquetv, resolutionOptions) { scope.timeSlots.startDialog( progs, scope.maxSize, scope.channel.scheduleBackup ); } scope.onRandomSlotsButtonClick = () => { - scope.randomSlots.startDialog(scope.channel.programs, scope.maxSize, scope.channel.randomScheduleBackup ); + let progs = removeDuplicatesSub( scope.channel.programs ); + scope.randomSlots.startDialog(progs, scope.maxSize, scope.channel.randomScheduleBackup ); } scope.logoOnChange = (event) => { From de3f859deaa542f1f79ea065e1a2ea55ef3a3ea9 Mon Sep 17 00:00:00 2001 From: vexorian Date: Mon, 15 Mar 2021 00:18:23 -0400 Subject: [PATCH 12/12] Add flex time so that the next program in time slots happens AFTER the current time. This is specially good for weekly slots, because programming won't start at Thursday for no reason anymore. --- src/services/time-slots-service.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/services/time-slots-service.js b/src/services/time-slots-service.js index dfb53a9..849470e 100644 --- a/src/services/time-slots-service.js +++ b/src/services/time-slots-service.js @@ -325,6 +325,9 @@ module.exports = async( programs, schedule ) => { } } + if (ts > t0) { + pushFlex( ts - t0 ); + } while ( (t < hardLimit) && (p.length < LIMIT) ) { await throttle(); //ensure t is padded