1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-15 23:42:45 +01:00
Radarr/UI/History/Model.js

26 lines
738 B
JavaScript
Raw Normal View History

2013-06-25 07:12:42 +02:00
'use strict';
define(
[
'backbone',
'Series/SeriesModel',
'Series/EpisodeModel'
], function (Backbone, SeriesModel, EpisodeModel) {
return Backbone.Model.extend({
mutators: {
seasonNumber: function () {
return this.get('episode').seasonNumber;
},
paddedEpisodeNumber: function () {
return this.get('episode').episodeNumber.pad(2);
}
2013-05-11 00:33:04 +02:00
},
2013-05-03 08:53:32 +02:00
parse: function (model) {
model.series = new SeriesModel(model.series);
model.episode = new EpisodeModel(model.episode);
return model;
2013-05-11 00:33:04 +02:00
}
});
2013-05-03 08:53:32 +02:00
});