added quality profile label

pull/2/head
kay.one 11 years ago
parent 35af6ecdb6
commit c4badd72bd

@ -11,6 +11,7 @@ module.exports = function (grunt) {
'UI/JsLibraries/backbone.mutators.js' : 'http://raw.github.com/asciidisco/Backbone.Mutators/master/backbone.mutators.js', 'UI/JsLibraries/backbone.mutators.js' : 'http://raw.github.com/asciidisco/Backbone.Mutators/master/backbone.mutators.js',
'UI/JsLibraries/backbone.shortcuts.js' : 'http://raw.github.com/bry4n/backbone-shortcuts/master/backbone.shortcuts.js', 'UI/JsLibraries/backbone.shortcuts.js' : 'http://raw.github.com/bry4n/backbone-shortcuts/master/backbone.shortcuts.js',
'UI/JsLibraries/backbone.relational.js' : 'http://raw.github.com/PaulUithol/Backbone-relational/0.8.5/backbone-relational.js', 'UI/JsLibraries/backbone.relational.js' : 'http://raw.github.com/PaulUithol/Backbone-relational/0.8.5/backbone-relational.js',
'UI/JsLibraries/backbone.associations.js' : 'http://raw.github.com/dhruvaray/backbone-associations/master/backbone-associations.js',
'UI/JsLibraries/backbone.pageable.js' : 'http://raw.github.com/wyuenho/backbone-pageable/master/lib/backbone-pageable.js', 'UI/JsLibraries/backbone.pageable.js' : 'http://raw.github.com/wyuenho/backbone-pageable/master/lib/backbone-pageable.js',
'UI/JsLibraries/backbone.backgrid.js' : 'http://raw.github.com/wyuenho/backgrid/master/lib/backgrid.js', 'UI/JsLibraries/backbone.backgrid.js' : 'http://raw.github.com/wyuenho/backgrid/master/lib/backgrid.js',

@ -160,7 +160,7 @@ namespace NzbDrone.Core.Tv
allEpisodes.AddRange(newList); allEpisodes.AddRange(newList);
allEpisodes.AddRange(updateList); allEpisodes.AddRange(updateList);
var groups = allEpisodes.GroupBy(e => new { e.SeriesId, e.AirDate }).Where(g => g.Count() > 1).ToList(); var groups = allEpisodes.Where(c=>c.AirDate.HasValue).GroupBy(e => new { e.SeriesId, e.AirDate }).Where(g => g.Count() > 1).ToList();
foreach (var group in groups) foreach (var group in groups)
{ {

@ -84,7 +84,7 @@
<script src="/JsLibraries/underscore.js"></script> <script src="/JsLibraries/underscore.js"></script>
<script src="/JsLibraries/handlebars.runtime.js"></script> <script src="/JsLibraries/handlebars.runtime.js"></script>
<script src="/JsLibraries/backbone.js"></script> <script src="/JsLibraries/backbone.js"></script>
<script src="/JsLibraries/backbone.relational.js"></script> <script src="/JsLibraries/backbone.associations.js"></script>
<script src="/JsLibraries/backbone.modelbinder.js"></script> <script src="/JsLibraries/backbone.modelbinder.js"></script>
<script src="/JsLibraries/backbone.deep.model.js"></script> <script src="/JsLibraries/backbone.deep.model.js"></script>
<script src="/JsLibraries/backbone.mutators.js"></script> <script src="/JsLibraries/backbone.mutators.js"></script>

@ -0,0 +1 @@
<span class="label quality-profile-lable">{{name}}</span>

@ -7,6 +7,7 @@
{{overview}} {{overview}}
</div> </div>
<div class="row"> <div class="row">
{{> QualityProfilePartial qualityProfile}}
<span class="label label-info">{{network}}</span> <span class="label label-info">{{network}}</span>
<span class="label label-info">{{runtime}} minutes</span> <span class="label label-info">{{runtime}} minutes</span>
<span class="label label-info">{{path}}</span> <span class="label label-info">{{path}}</span>

@ -1,17 +1,10 @@
'use strict'; 'use strict';
define(['app', 'Quality/QualityProfileCollection', 'Series/Index/List/ItemView', 'Config'], function (app, qualityProfileCollection) { define(['app', 'Series/Index/List/ItemView', 'Config'], function () {
NzbDrone.Series.Index.List.CollectionView = Backbone.Marionette.CompositeView.extend({ NzbDrone.Series.Index.List.CollectionView = Backbone.Marionette.CompositeView.extend({
itemView : NzbDrone.Series.Index.List.ItemView, itemView : NzbDrone.Series.Index.List.ItemView,
itemViewContainer : '#x-series-list', itemViewContainer : '#x-series-list',
template : 'Series/Index/List/CollectionTemplate', template : 'Series/Index/List/CollectionTemplate'
qualityProfileCollection: qualityProfileCollection,
initialize: function () {
this.qualityProfileCollection.fetch();
this.itemViewOptions = { qualityProfiles: this.qualityProfileCollection };
}
}); });
}); });

@ -32,14 +32,14 @@
{{#if isContinuing}} {{#if isContinuing}}
{{#if nextAiring}} {{#if nextAiring}}
<span class="label">{{date nextAiring}}</span> <span class="label">{{date nextAiring}}</span>
{{else}}
<span class="label label-inverse">Continuing</span>
{{/if}} {{/if}}
<span class="label label-info">Season {{seasonCount}}</span> <span class="label label-info">Season {{seasonCount}}</span>
{{else}} {{else}}
<span class="label label-important">Ended</span> <span class="label label-important">Ended</span>
<span class="label label-info">{{seasonCount}} Seasons</span> <span class="label label-info">{{seasonCount}} Seasons</span>
{{/if}} {{/if}}
{{> QualityProfilePartial qualityProfile}}
</div> </div>
<div class="span2"> <div class="span2">
<div class="progress"> <div class="progress">

@ -18,11 +18,7 @@ define([
events: { events: {
'click .x-edit' : 'editSeries', 'click .x-edit' : 'editSeries',
'click .x-remove': 'removeSeries', 'click .x-remove': 'removeSeries'
},
initialize: function (options) {
this.qualityProfileCollection = options.qualityProfiles;
}, },
editSeries: function () { editSeries: function () {

@ -1,17 +1,10 @@
'use strict'; 'use strict';
define(['app', 'Quality/QualityProfileCollection', 'Series/Index/Posters/ItemView', 'Config'], function (app, qualityProfileCollection) { define(['app', 'Series/Index/Posters/ItemView', 'Config'], function () {
NzbDrone.Series.Index.Posters.CollectionView = Backbone.Marionette.CompositeView.extend({ NzbDrone.Series.Index.Posters.CollectionView = Backbone.Marionette.CompositeView.extend({
itemView : NzbDrone.Series.Index.Posters.ItemView, itemView : NzbDrone.Series.Index.Posters.ItemView,
itemViewContainer : '#x-series-posters', itemViewContainer : '#x-series-posters',
template : 'Series/Index/Posters/CollectionTemplate', template : 'Series/Index/Posters/CollectionTemplate'
qualityProfileCollection: qualityProfileCollection,
initialize: function () {
this.qualityProfileCollection.fetch();
this.itemViewOptions = { qualityProfiles: this.qualityProfileCollection };
}
}); });
}); });

@ -23,8 +23,6 @@
{{#if isContinuing}} {{#if isContinuing}}
{{#if nextAiring}} {{#if nextAiring}}
<span class="label label-inverse">{{date nextAiring}}</span> <span class="label label-inverse">{{date nextAiring}}</span>
{{else}}
<span class="label label-inverse">Continuing</span>
{{/if}} {{/if}}
<span class="label label-info">Season {{seasonCount}}</span> <span class="label label-info">Season {{seasonCount}}</span>
{{else}} {{else}}

@ -2,7 +2,6 @@
define([ define([
'app', 'app',
'Quality/QualityProfileCollection',
'Series/SeriesCollection', 'Series/SeriesCollection',
'Series/Edit/EditSeriesView', 'Series/Edit/EditSeriesView',
'Series/Delete/DeleteSeriesView' 'Series/Delete/DeleteSeriesView'
@ -26,9 +25,6 @@ define([
'mouseleave .x-series-poster': 'posterHoverAction' 'mouseleave .x-series-poster': 'posterHoverAction'
}, },
initialize: function (options) {
this.qualityProfileCollection = options.qualityProfiles;
},
editSeries: function () { editSeries: function () {
var view = new NzbDrone.Series.Edit.EditSeriesView({ model: this.model}); var view = new NzbDrone.Series.Edit.EditSeriesView({ model: this.model});

@ -1,5 +1,5 @@
"use strict"; "use strict";
define(['app', 'Quality/QualityProfileCollection', 'AddSeries/RootFolders/RootFolderCollection'], function (app, qualityProfileCollection, rootFolders) { define(['app', 'Quality/QualityProfileCollection'], function (app, qualityProfiles) {
NzbDrone.Series.SeriesModel = Backbone.Model.extend({ NzbDrone.Series.SeriesModel = Backbone.Model.extend({
urlRoot: NzbDrone.Constants.ApiRoot + '/series', urlRoot: NzbDrone.Constants.ApiRoot + '/series',
@ -29,7 +29,7 @@ define(['app', 'Quality/QualityProfileCollection', 'AddSeries/RootFolders/RootFo
traktUrl : function () { traktUrl : function () {
return "http://trakt.tv/show/" + this.get('titleSlug'); return "http://trakt.tv/show/" + this.get('titleSlug');
}, },
imdbUrl : function () { imdbUrl : function () {
return "http://imdb.com/title/" + this.get('imdbId'); return "http://imdb.com/title/" + this.get('imdbId');
}, },
isContinuing : function () { isContinuing : function () {
@ -44,16 +44,19 @@ define(['app', 'Quality/QualityProfileCollection', 'AddSeries/RootFolders/RootFo
return Date.create(date).short(); return Date.create(date).short();
}, },
route : function(){ route : function () {
return '/series/details/' + this.get('titleSlug'); return '/series/details/' + this.get('titleSlug');
//return '/series/details/' + this.get('id');
},
qualityProfile: function () {
return qualityProfiles.get(this.get('qualityProfileId')).toJSON();
} }
}, },
defaults: { defaults: {
episodeFileCount: 0, episodeFileCount: 0,
episodeCount : 0, episodeCount : 0,
qualityProfiles : qualityProfileCollection,
rootFolders : rootFolders,
isExisting : false, isExisting : false,
status : 0 status : 0
} }

Loading…
Cancel
Save