mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-15 01:23:53 -07:00
removed backbone from VS solution,
renamed NzbDrone.Backbone to UI
This commit is contained in:
parent
c7776f74e1
commit
663160c06a
230 changed files with 57 additions and 386 deletions
25
UI/AddSeries/SearchResultModel.js
Normal file
25
UI/AddSeries/SearchResultModel.js
Normal file
|
@ -0,0 +1,25 @@
|
|||
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
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue