1
0
Fork 0
mirror of https://github.com/Sonarr/Sonarr synced 2024-12-29 11:16:19 +00:00
Sonarr/NzbDrone.Web/_backboneApp/AddSeries/SearchResultModel.js

24 lines
767 B
JavaScript
Raw Normal View History

2013-01-23 01:23:27 +00:00
/// <reference path="../app.js" />
/// <reference path="RootDir/RootDirCollection.js" />
/// <reference path="../Quality/qualityProfileCollection.js" />
2013-01-23 01:23:27 +00:00
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: new NzbDrone.Quality.QualityProfileCollection(),
rootFolders: new NzbDrone.AddSeries.RootDirCollection()
}
2013-01-23 01:23:27 +00:00
});