mirror of https://github.com/Radarr/Radarr
Fixes for movie statuses
This commit is contained in:
parent
be95311471
commit
5e7b379a45
|
@ -74,20 +74,22 @@ Handlebars.registerHelper('GetStatus', function() {
|
||||||
var timeSince = new Date().getTime() - date.getTime();
|
var timeSince = new Date().getTime() - date.getTime();
|
||||||
var numOfMonths = timeSince / 1000 / 60 / 60 / 24 / 30;
|
var numOfMonths = timeSince / 1000 / 60 / 60 / 24 / 30;
|
||||||
|
|
||||||
if (status === 'released') {
|
|
||||||
return new Handlebars.SafeString('<i class="icon-sonarr-movie-released grid-icon" title=""></i> Released');
|
if (status === "announced") {
|
||||||
|
return new Handlebars.SafeString('<i class="icon-sonarr-movie-announced grid-icon" title=""></i> Announced');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (numOfMonths < 3) {
|
||||||
|
|
||||||
|
return new Handlebars.SafeString('<i class="icon-sonarr-movie-cinemas grid-icon" title=""></i> In Cinemas');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (numOfMonths > 3) {
|
if (numOfMonths > 3) {
|
||||||
return new Handlebars.SafeString('<i class="icon-sonarr-movie-released grid-icon" title=""></i> Released');//TODO: Update for PreDB.me
|
return new Handlebars.SafeString('<i class="icon-sonarr-movie-released grid-icon" title=""></i> Released');//TODO: Update for PreDB.me
|
||||||
}
|
}
|
||||||
|
|
||||||
if (numOfMonths < 3) {
|
if (status === 'released') {
|
||||||
return new Handlebars.SafeString('<i class="icon-sonarr-movie-cinemas grid-icon" title=""></i> In Cinemas');
|
return new Handlebars.SafeString('<i class="icon-sonarr-movie-released grid-icon" title=""></i> Released');
|
||||||
}
|
|
||||||
|
|
||||||
if (status === "announced") {
|
|
||||||
return new Handlebars.SafeString('<i class="icon-sonarr-movie-announced grid-icon" title=""></i> Announced');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (!monitored) {
|
else if (!monitored) {
|
||||||
|
@ -103,6 +105,14 @@ Handlebars.registerHelper('GetBannerStatus', function() {
|
||||||
var timeSince = new Date().getTime() - date.getTime();
|
var timeSince = new Date().getTime() - date.getTime();
|
||||||
var numOfMonths = timeSince / 1000 / 60 / 60 / 24 / 30;
|
var numOfMonths = timeSince / 1000 / 60 / 60 / 24 / 30;
|
||||||
|
|
||||||
|
if (status === "announced") {
|
||||||
|
return new Handlebars.SafeString('<div class="announced-banner"><i class="icon-sonarr-movie-announced grid-icon" title=""></i> Announced</div>');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (numOfMonths < 3) {
|
||||||
|
return new Handlebars.SafeString('<div class="cinemas-banner"><i class="icon-sonarr-movie-cinemas grid-icon" title=""></i> In Cinemas</div>');
|
||||||
|
}
|
||||||
|
|
||||||
if (status === 'released') {
|
if (status === 'released') {
|
||||||
return new Handlebars.SafeString('<div class="released-banner"><i class="icon-sonarr-movie-released grid-icon" title=""></i> Released</div>');
|
return new Handlebars.SafeString('<div class="released-banner"><i class="icon-sonarr-movie-released grid-icon" title=""></i> Released</div>');
|
||||||
}
|
}
|
||||||
|
@ -111,13 +121,8 @@ Handlebars.registerHelper('GetBannerStatus', function() {
|
||||||
return new Handlebars.SafeString('<div class="released-banner"><i class="icon-sonarr-movie-released grid-icon" title=""></i> Released</div>');//TODO: Update for PreDB.me
|
return new Handlebars.SafeString('<div class="released-banner"><i class="icon-sonarr-movie-released grid-icon" title=""></i> Released</div>');//TODO: Update for PreDB.me
|
||||||
}
|
}
|
||||||
|
|
||||||
if (numOfMonths < 3) {
|
|
||||||
return new Handlebars.SafeString('<div class="cinemas-banner"><i class="icon-sonarr-movie-cinemas grid-icon" title=""></i> In Cinemas</div>');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (status === "announced") {
|
|
||||||
return new Handlebars.SafeString('<div class="announced-banner"><i class="icon-sonarr-movie-announced grid-icon" title=""></i> Announced</div>');
|
|
||||||
}
|
|
||||||
|
|
||||||
else if (!monitored) {
|
else if (!monitored) {
|
||||||
return new Handlebars.SafeString('<div class="announced-banner"><i class="icon-sonarr-series-unmonitored grid-icon" title=""></i> Not Monitored</div>');
|
return new Handlebars.SafeString('<div class="announced-banner"><i class="icon-sonarr-series-unmonitored grid-icon" title=""></i> Not Monitored</div>');
|
||||||
|
|
Loading…
Reference in New Issue