mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-21 05:53:33 -07:00
Episode count on posters and coloured bars
This commit is contained in:
parent
5bfcc511e8
commit
9ba0623987
7 changed files with 78 additions and 17 deletions
|
@ -35,7 +35,6 @@ define(
|
|||
return '/series/' + this.titleSlug;
|
||||
});
|
||||
|
||||
|
||||
Handlebars.registerHelper('percentOfEpisodes', function () {
|
||||
var episodeCount = this.episodeCount;
|
||||
var episodeFileCount = this.episodeFileCount;
|
||||
|
@ -49,4 +48,18 @@ define(
|
|||
return percent;
|
||||
});
|
||||
|
||||
Handlebars.registerHelper('seasonCountHelper', function () {
|
||||
var seasonCount = this.seasonCount;
|
||||
var continuing = this.status === 'continuing';
|
||||
|
||||
if (continuing) {
|
||||
return new Handlebars.SafeString('<span class="label label-info">Season {0}</span>'.format(seasonCount));
|
||||
}
|
||||
|
||||
if (seasonCount === 1) {
|
||||
return new Handlebars.SafeString('<span class="label label-info">{0} Season</span>'.format(seasonCount))
|
||||
}
|
||||
|
||||
return new Handlebars.SafeString('<span class="label label-info">{0} Seasons</span>'.format(seasonCount))
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue