From 1d3b5c9408ef343245353a11cb95a284ca0147f0 Mon Sep 17 00:00:00 2001 From: vexorian Date: Thu, 19 Nov 2020 18:51:40 -0400 Subject: [PATCH 1/2] Prepare 1.1.4 development --- README.md | 2 +- src/constants.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index efa3120..d0228bf 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# dizqueTV 1.1.3-prerelease +# dizqueTV 1.1.4-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 ef6da23..e4c0497 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.1.3-prerelease" + VERSION_NAME: "1.1.4-prerelease" } From 88c9c8e17d337a5e4245f4179f34d4ce5d1b180e Mon Sep 17 00:00:00 2001 From: vexorian Date: Thu, 19 Nov 2020 22:16:19 -0400 Subject: [PATCH 2/2] Fix #190 , #191 and also drag and drop issue for Filler List Editor. --- web/directives/filler-config.js | 45 ++++++++++++++++++++++++- web/public/templates/filler-config.html | 18 +++++++--- 2 files changed, 58 insertions(+), 5 deletions(-) diff --git a/web/directives/filler-config.js b/web/directives/filler-config.js index ce95311..5b6bc3a 100644 --- a/web/directives/filler-config.js +++ b/web/directives/filler-config.js @@ -14,6 +14,41 @@ module.exports = function ($timeout) { scope.visible = false; scope.error = undefined; + function refreshContentIndexes() { + for (let i = 0; i < scope.content.length; i++) { + scope.content[i].$index = i; + } + } + + scope.contentSplice = (a,b) => { + scope.content.splice(a,b) + refreshContentIndexes(); + } + + scope.dropFunction = (dropIndex, program) => { + setTimeout( () => { + if (program.$index < dropIndex) { + scope.content.splice(scope.currentStartIndex + dropIndex-2, 0, program); + } else { + scope.content.splice(scope.currentStartIndex + dropIndex-1, 0, program); + } + refreshContentIndexes(); + scope.$apply(); + }, 1); + return true; + } + scope.setUpWatcher = function setupWatchers() { + this.$watch('vsRepeat.startIndex', function(val) { + scope.currentStartIndex = val; + }); + }; + + scope.movedFunction = (index) => { + scope.content.splice(index, 1); + } + + + scope.linker( (filler) => { if ( typeof(filler) === 'undefined') { scope.name = ""; @@ -26,6 +61,7 @@ module.exports = function ($timeout) { scope.id = filler.id; scope.title = "Edit Filler List"; } + refreshContentIndexes(); scope.visible = true; } ); @@ -49,7 +85,10 @@ module.exports = function ($timeout) { scope.visible = false; scope.onDone( { name: scope.name, - content: scope.content, + content: scope.content.map( (c) => { + delete c.$index + return c; + } ), id: scope.id, } ); } @@ -58,9 +97,11 @@ module.exports = function ($timeout) { } scope.sortFillers = () => { scope.content.sort( (a,b) => { return a.duration - b.duration } ); + refreshContentIndexes(); } scope.fillerRemoveAllFiller = () => { scope.content = []; + refreshContentIndexes(); } scope.fillerRemoveDuplicates = () => { function getKey(p) { @@ -77,12 +118,14 @@ module.exports = function ($timeout) { } } scope.content = newFiller; + refreshContentIndexes(); } scope.importPrograms = (selectedPrograms) => { for (let i = 0, l = selectedPrograms.length; i < l; i++) { selectedPrograms[i].commercials = [] } scope.content = scope.content.concat(selectedPrograms); + refreshContentIndexes(); scope.showPlexLibrary = false; } diff --git a/web/public/templates/filler-config.html b/web/public/templates/filler-config.html index d4a65d3..6de54c0 100644 --- a/web/public/templates/filler-config.html +++ b/web/public/templates/filler-config.html @@ -23,7 +23,7 @@
@@ -61,9 +61,19 @@
+