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

26 lines
805 B
JavaScript
Raw Normal View History

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('title').endsWith(date)) {
return "";
} else {
return date;
}
}
},
defaults: {
qualityProfiles: qualityProfileCollection,
rootFolders: rootFolderCollection
}
});
2013-01-23 02:23:27 +01:00
});