some minor cleanup + changed filter on wanted/missing (#845)

pull/2/head
geogolem 8 years ago committed by Devin Buhl
parent 140a220340
commit 9d29776e8e

@ -41,11 +41,11 @@ namespace NzbDrone.Api.Wanted
else if (pagingResource.FilterKey == "moviestatus" && pagingResource.FilterValue == "available") else if (pagingResource.FilterKey == "moviestatus" && pagingResource.FilterValue == "available")
{ {
//TODO: might need to handle PreDB here //TODO: might need to handle PreDB here
pagingSpec.FilterExpression = v => pagingSpec.FilterExpression = v => v.Monitored == true &&
(v.MinimumAvailability == MovieStatusType.Released && v.Status >= MovieStatusType.Released) || ((v.MinimumAvailability == MovieStatusType.Released && v.Status >= MovieStatusType.Released) ||
(v.MinimumAvailability == MovieStatusType.InCinemas && v.Status >= MovieStatusType.InCinemas) || (v.MinimumAvailability == MovieStatusType.InCinemas && v.Status >= MovieStatusType.InCinemas) ||
(v.MinimumAvailability == MovieStatusType.Announced && v.Status >= MovieStatusType.Announced) || (v.MinimumAvailability == MovieStatusType.Announced && v.Status >= MovieStatusType.Announced) ||
(v.MinimumAvailability == MovieStatusType.PreDB && v.Status >= MovieStatusType.Released); (v.MinimumAvailability == MovieStatusType.PreDB && v.Status >= MovieStatusType.Released));
} }
else if (pagingResource.FilterKey == "moviestatus" && pagingResource.FilterValue == "announced") else if (pagingResource.FilterKey == "moviestatus" && pagingResource.FilterValue == "announced")
{ {

@ -54,9 +54,6 @@ Handlebars.registerHelper('tmdbUrl', function() {
Handlebars.registerHelper('youTubeTrailerUrl', function() { Handlebars.registerHelper('youTubeTrailerUrl', function() {
return 'https://www.youtube.com/watch?v=' + this.youTubeTrailerId; return 'https://www.youtube.com/watch?v=' + this.youTubeTrailerId;
}); });
Handlebars.registerHelper('allFlicksUrl', function() {
return this.allFlicksUrl;
});
Handlebars.registerHelper('homepage', function() { Handlebars.registerHelper('homepage', function() {
return this.website; return this.website;

@ -39,10 +39,6 @@
{{#if youTubeTrailerId}} {{#if youTubeTrailerId}}
<a href="{{youTubeTrailerUrl}}" class="label label-info">Trailer</a> <a href="{{youTubeTrailerUrl}}" class="label label-info">Trailer</a>
{{/if}} {{/if}}
{{#if allFlicksUrl}}
<a href="{{allFlicksUrl}}" class="label label-info">AllFlicks</a>
{{/if}}
</span> </span>
</div> </div>
</div> </div>

@ -132,10 +132,17 @@ module.exports = Marionette.Layout.extend({
}; };
var filterOptions = { var filterOptions = {
type : 'radio', type : 'radio',
storeState : true, storeState : false,
menuKey : 'wanted.filterMode', menuKey : 'wanted.filterMode',
defaultAction : 'monitored', defaultAction : 'available',
items : [ items : [
{
key : 'available',
title : '',
tooltip : 'Available & Monitored',
icon : 'icon-sonarr-available',
callback : this._setFilter
},
{ {
key : 'monitored', key : 'monitored',
title : '', title : '',
@ -170,13 +177,6 @@ module.exports = Marionette.Layout.extend({
tooltip : 'Released Only', tooltip : 'Released Only',
icon : 'icon-sonarr-movie-released', icon : 'icon-sonarr-movie-released',
callback : this._setFilter callback : this._setFilter
},
{
key : 'available',
title : '',
tooltip : 'Available Only',
icon : 'icon-sonarr-available',
callback : this._setFilter
} }
] ]
}; };

Loading…
Cancel
Save