mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-22 14:33:30 -07:00
Episode Details episode number is templated
This commit is contained in:
parent
e62274bc54
commit
1905b66a66
4 changed files with 21 additions and 3 deletions
18
UI/Handlebars/Helpers/EpisodeNumber.js
Normal file
18
UI/Handlebars/Helpers/EpisodeNumber.js
Normal file
|
@ -0,0 +1,18 @@
|
|||
'use strict';
|
||||
define(
|
||||
[
|
||||
'handlebars',
|
||||
'Shared/FormatHelpers'
|
||||
], function (Handlebars, FormatHelpers) {
|
||||
Handlebars.registerHelper('episodeNumberHelper', function () {
|
||||
|
||||
if (this.series.seriesType === 'daily') {
|
||||
return FormatHelpers.DateHelper(this.airDate);
|
||||
}
|
||||
|
||||
else {
|
||||
return '{0}x{1}'.format(this.seasonNumber, this.paddedEpisodeNumber);
|
||||
}
|
||||
|
||||
});
|
||||
});
|
|
@ -6,6 +6,7 @@ define(
|
|||
'Handlebars/Helpers/DateTime',
|
||||
'Handlebars/Helpers/Html',
|
||||
'Handlebars/Helpers/Numbers',
|
||||
'Handlebars/Helpers/EpisodeNumber',
|
||||
'Handlebars/Debug'
|
||||
], function (Templates) {
|
||||
return function () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue