2013-02-14 20:18:29 +03:00
|
|
|
define(['app', 'AddSeries/RootFolders/RootFolderCollection', 'Quality/QualityProfileCollection'], function (RootFolderCollection) {
|
2013-01-27 00:20:17 +03:00
|
|
|
|
2013-02-14 05:28:56 +03: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;
|
|
|
|
}
|
2013-01-27 00:20:17 +03:00
|
|
|
}
|
2013-02-14 05:28:56 +03:00
|
|
|
},
|
|
|
|
|
|
|
|
defaults: {
|
|
|
|
qualityProfiles: new NzbDrone.Quality.QualityProfileCollection(),
|
2013-02-14 20:18:29 +03:00
|
|
|
rootFolders: RootFolderCollection
|
2013-01-25 22:04:37 +03:00
|
|
|
}
|
2013-01-27 06:04:15 +03:00
|
|
|
|
2013-02-14 05:28:56 +03:00
|
|
|
});
|
2013-01-27 06:04:15 +03:00
|
|
|
|
2013-01-23 04:23:27 +03:00
|
|
|
});
|