1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-10-06 08:07:20 +02:00
Radarr/NzbDrone.Web/_backboneApp/AddSeries/SearchResultModel.js
kay.one c01f982698 removed series layout.
datatables doesn't load properly.
2013-02-15 16:53:00 -08:00

26 lines
810 B
JavaScript

define(['app', 'AddSeries/RootFolders/RootFolderCollection', 'Quality/QualityProfileCollection'],
function (app, rootFolderCollection, qualityProfileCollection) {
NzbDrone.AddSeries.SearchResultModel = Backbone.Model.extend({
mutators: {
seriesYear: function () {
var date = Date.utc.create(this.get('firstAired')).format('({yyyy})');
//don't append year, if the series name already has the name appended.
if (this.get('seriesName').endsWith(date)) {
return "";
} else {
return date;
}
}
},
defaults: {
qualityProfiles: qualityProfileCollection,
rootFolders: rootFolderCollection
}
});
});