1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-11-01 08:22:35 +01:00
Sonarr/UI/Handlebars/Helpers/Episode.js
2013-07-16 16:55:20 -07:00

19 lines
471 B
JavaScript

'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);
}
});
});