mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 02:37:08 -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
31
UI/Series/SeriesModel.js
Normal file
31
UI/Series/SeriesModel.js
Normal file
|
@ -0,0 +1,31 @@
|
|||
define(['app', 'Quality/QualityProfileCollection'], function (app, qualityProfileCollection) {
|
||||
NzbDrone.Series.SeriesModel = Backbone.Model.extend({
|
||||
|
||||
urlRoot: NzbDrone.Constants.ApiRoot + '/series',
|
||||
|
||||
mutators: {
|
||||
bestDateString: function () {
|
||||
return bestDateString(this.get('nextAiring'));
|
||||
},
|
||||
|
||||
percentOfEpisodes: function () {
|
||||
var episodeCount = this.get('episodeCount');
|
||||
var episodeFileCount = this.get('episodeFileCount');
|
||||
|
||||
var percent = 100;
|
||||
|
||||
if (episodeCount > 0)
|
||||
percent = episodeFileCount / episodeCount * 100;
|
||||
|
||||
return percent;
|
||||
}
|
||||
},
|
||||
|
||||
defaults: {
|
||||
episodeFileCount: 0,
|
||||
episodeCount: 0,
|
||||
qualityProfiles: qualityProfileCollection
|
||||
}
|
||||
});
|
||||
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue