diff --git a/web/directives/filler-config.js b/web/directives/filler-config.js index aea88bc..56cf2e3 100644 --- a/web/directives/filler-config.js +++ b/web/directives/filler-config.js @@ -1,4 +1,4 @@ -module.exports = function ($timeout) { +module.exports = function ($timeout, commonProgramTools, getShowData) { return { restrict: 'E', templateUrl: 'templates/filler-config.html', @@ -92,13 +92,26 @@ module.exports = function ($timeout) { id: scope.id, } ); } + scope.getText = (clip) => { + let show = getShowData(clip); + if (show.hasShow && show.showId !== "movie." ) { + return show.showDisplayName + " - " + clip.title; + } else { + return clip.title; + } + } scope.showList = () => { return ! scope.showPlexLibrary; } - scope.sortFillers = () => { + scope.sortFillersByLength = () => { scope.content.sort( (a,b) => { return a.duration - b.duration } ); refreshContentIndexes(); } + scope.sortFillersCorrectly = () => { + scope.content = commonProgramTools.sortShows(scope.content); + refreshContentIndexes(); + } + scope.fillerRemoveAllFiller = () => { scope.content = []; refreshContentIndexes(); diff --git a/web/public/templates/filler-config.html b/web/public/templates/filler-config.html index 148506a..8724e10 100644 --- a/web/public/templates/filler-config.html +++ b/web/public/templates/filler-config.html @@ -37,16 +37,23 @@