diff --git a/src/UI/Wanted/Cutoff/CutoffUnmetCollection.js b/src/UI/Wanted/Cutoff/CutoffUnmetCollection.js index e12a4084c..d44254d17 100644 --- a/src/UI/Wanted/Cutoff/CutoffUnmetCollection.js +++ b/src/UI/Wanted/Cutoff/CutoffUnmetCollection.js @@ -11,7 +11,7 @@ var Collection = PagableCollection.extend({ tableName : 'wanted.cutoff', state : { - pageSize : 15, + pageSize : 50, sortKey : 'title', order : -1 }, @@ -28,7 +28,7 @@ var Collection = PagableCollection.extend({ } }, - // Filter Modes + filterModes : { 'monitored' : [ 'monitored', @@ -38,11 +38,28 @@ var Collection = PagableCollection.extend({ 'monitored', 'false' ], + 'announced' : [ + 'moviestatus', + 'announced' + ], + 'incinemas' : [ + 'moviestatus', + 'incinemas' + ], + 'released' : [ + 'moviestatus', + 'released' + ], + 'available' : [ + 'moviestatus', + 'available' + ], + 'all' : [ + 'all', + 'all' + ] }, - // sortMappings : { - // 'this' : { sortKey : 'this.sortTitle' } - // }, parseState : function(resp) { return { totalRecords : resp.totalRecords }; diff --git a/src/UI/Wanted/Cutoff/CutoffUnmetLayout.js b/src/UI/Wanted/Cutoff/CutoffUnmetLayout.js index a1a82b891..036cb335c 100644 --- a/src/UI/Wanted/Cutoff/CutoffUnmetLayout.js +++ b/src/UI/Wanted/Cutoff/CutoffUnmetLayout.js @@ -97,7 +97,14 @@ module.exports = Marionette.Layout.extend({ callback : this._searchSelected, ownerContext : this, className : 'x-search-selected' - } + }, + { + title : 'Search All', + icon : 'icon-sonarr-search', + callback : this._searchMissing, + ownerContext : this, + className : 'x-search-missing' + }, ] }; @@ -107,6 +114,20 @@ module.exports = Marionette.Layout.extend({ menuKey : 'wanted.filterMode', defaultAction : 'monitored', items : [ + { + key : 'all', + title : '', + tooltip : 'All', + icon : 'icon-sonarr-all', + callback : this._setFilter + }, + { + key : 'available', + title : '', + tooltip : 'Available & Monitored', + icon : 'icon-sonarr-available', + callback : this._setFilter + }, { key : 'monitored', title : '', @@ -120,8 +141,29 @@ module.exports = Marionette.Layout.extend({ tooltip : 'Unmonitored Only', icon : 'icon-sonarr-unmonitored', callback : this._setFilter + }, + { + key : 'announced', + title : '', + tooltip : 'Announced Only', + icon : 'icon-sonarr-movie-announced', + callback : this._setFilter + }, + { + key : 'incinemas', + title : '', + tooltip : 'In Cinemas Only', + icon : 'icon-sonarr-movie-cinemas', + callback : this._setFilter + }, + { + key : 'released', + title : '', + tooltip : 'Released Only', + icon : 'icon-sonarr-movie-released', + callback : this._setFilter } - ] + ] }; this.toolbar.show(new ToolbarLayout({ @@ -171,5 +213,14 @@ module.exports = Marionette.Layout.extend({ name : 'moviesSearch', movieIds : ids }); - } + }, + + _searchMissing : function() { + if (window.confirm('Are you sure you want to search for {0} filtered missing movies?'.format(this.collection.state.totalRecords) + + 'One API request to each indexer will be used for each movie. ' + 'This cannot be stopped once started.')) { + CommandController.Execute('missingMoviesSearch', { name : 'missingMoviesSearch', + filterKey : this.collection.state.filterKey, + filterValue : this.collection.state.filterValue }); + } + }, }); \ No newline at end of file diff --git a/src/UI/Wanted/Missing/MissingCollection.js b/src/UI/Wanted/Missing/MissingCollection.js index 836f03a44..43ce5741c 100644 --- a/src/UI/Wanted/Missing/MissingCollection.js +++ b/src/UI/Wanted/Missing/MissingCollection.js @@ -11,7 +11,7 @@ var Collection = PagableCollection.extend({ tableName : 'wanted.missing', state : { - pageSize : 15, + pageSize : 50, sortKey : 'title', order : -1 }, @@ -37,26 +37,26 @@ var Collection = PagableCollection.extend({ 'monitored', 'false' ], - 'announced' : [ - 'moviestatus', - 'announced' - ], - 'incinemas' : [ - 'moviestatus', - 'incinemas' - ], - 'released' : [ - 'moviestatus', - 'released' - ], - 'available' : [ - 'moviestatus', - 'available' - ], - 'all' : [ - 'all', - 'all' - ] + 'announced' : [ + 'moviestatus', + 'announced' + ], + 'incinemas' : [ + 'moviestatus', + 'incinemas' + ], + 'released' : [ + 'moviestatus', + 'released' + ], + 'available' : [ + 'moviestatus', + 'available' + ], + 'all' : [ + 'all', + 'all' + ] }, parseState : function(resp) { diff --git a/src/UI/Wanted/Missing/MissingLayout.js b/src/UI/Wanted/Missing/MissingLayout.js index 507041431..abaa64026 100644 --- a/src/UI/Wanted/Missing/MissingLayout.js +++ b/src/UI/Wanted/Missing/MissingLayout.js @@ -57,6 +57,7 @@ module.exports = Marionette.Layout.extend({ name : 'status', label : 'Status', cell : MovieStatusWithTextCell, + sortable : false }, ], @@ -130,26 +131,27 @@ module.exports = Marionette.Layout.extend({ } ] }; + var filterOptions = { type : 'radio', storeState : false, menuKey : 'wanted.filterMode', - defaultAction : 'available', + defaultAction : 'monitored', items : [ - { - key : 'all', - title : '', - tooltip : 'All', - icon : 'icon-sonarr-all', - callback : this._setFilter - }, - { - key : 'available', - title : '', - tooltip : 'Available & Monitored', - icon : 'icon-sonarr-available', - callback : this._setFilter - }, + { + key : 'all', + title : '', + tooltip : 'All', + icon : 'icon-sonarr-all', + callback : this._setFilter + }, + { + key : 'available', + title : '', + tooltip : 'Available & Monitored', + icon : 'icon-sonarr-available', + callback : this._setFilter + }, { key : 'monitored', title : '', @@ -164,29 +166,29 @@ module.exports = Marionette.Layout.extend({ icon : 'icon-sonarr-unmonitored', callback : this._setFilter }, - { - key : 'announced', - title : '', - tooltip : 'Announced Only', - icon : 'icon-sonarr-movie-announced', - callback : this._setFilter - }, - { - key : 'incinemas', - title : '', - tooltip : 'In Cinemas Only', - icon : 'icon-sonarr-movie-cinemas', - callback : this._setFilter - }, - { - key : 'released', - title : '', - tooltip : 'Released Only', - icon : 'icon-sonarr-movie-released', - callback : this._setFilter - } - ] - }; + { + key : 'announced', + title : '', + tooltip : 'Announced Only', + icon : 'icon-sonarr-movie-announced', + callback : this._setFilter + }, + { + key : 'incinemas', + title : '', + tooltip : 'In Cinemas Only', + icon : 'icon-sonarr-movie-cinemas', + callback : this._setFilter + }, + { + key : 'released', + title : '', + tooltip : 'Released Only', + icon : 'icon-sonarr-movie-released', + callback : this._setFilter + } + ] + }; this.toolbar.show(new ToolbarLayout({ left : [leftSideButtons], right : [filterOptions],