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

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")
{
//TODO: might need to handle PreDB here
pagingSpec.FilterExpression = v =>
(v.MinimumAvailability == MovieStatusType.Released && v.Status >= MovieStatusType.Released) ||
pagingSpec.FilterExpression = v => v.Monitored == true &&
((v.MinimumAvailability == MovieStatusType.Released && v.Status >= MovieStatusType.Released) ||
(v.MinimumAvailability == MovieStatusType.InCinemas && v.Status >= MovieStatusType.InCinemas) ||
(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")
{

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

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

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

Loading…
Cancel
Save