mirror of https://github.com/Sonarr/Sonarr
added quality profile label
This commit is contained in:
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.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.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.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(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)
|
||||
{
|
||||
|
|
|
@ -84,7 +84,7 @@
|
|||
<script src="/JsLibraries/underscore.js"></script>
|
||||
<script src="/JsLibraries/handlebars.runtime.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.deep.model.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}}
|
||||
</div>
|
||||
<div class="row">
|
||||
{{> QualityProfilePartial qualityProfile}}
|
||||
<span class="label label-info">{{network}}</span>
|
||||
<span class="label label-info">{{runtime}} minutes</span>
|
||||
<span class="label label-info">{{path}}</span>
|
||||
|
|
|
@ -1,17 +1,10 @@
|
|||
'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({
|
||||
itemView : NzbDrone.Series.Index.List.ItemView,
|
||||
itemViewContainer : '#x-series-list',
|
||||
template : 'Series/Index/List/CollectionTemplate',
|
||||
qualityProfileCollection: qualityProfileCollection,
|
||||
|
||||
initialize: function () {
|
||||
this.qualityProfileCollection.fetch();
|
||||
|
||||
this.itemViewOptions = { qualityProfiles: this.qualityProfileCollection };
|
||||
}
|
||||
template : 'Series/Index/List/CollectionTemplate'
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -32,14 +32,14 @@
|
|||
{{#if isContinuing}}
|
||||
{{#if nextAiring}}
|
||||
<span class="label">{{date nextAiring}}</span>
|
||||
{{else}}
|
||||
<span class="label label-inverse">Continuing</span>
|
||||
{{/if}}
|
||||
<span class="label label-info">Season {{seasonCount}}</span>
|
||||
{{else}}
|
||||
<span class="label label-important">Ended</span>
|
||||
<span class="label label-info">{{seasonCount}} Seasons</span>
|
||||
{{/if}}
|
||||
|
||||
{{> QualityProfilePartial qualityProfile}}
|
||||
</div>
|
||||
<div class="span2">
|
||||
<div class="progress">
|
||||
|
|
|
@ -18,11 +18,7 @@ define([
|
|||
|
||||
events: {
|
||||
'click .x-edit' : 'editSeries',
|
||||
'click .x-remove': 'removeSeries',
|
||||
},
|
||||
|
||||
initialize: function (options) {
|
||||
this.qualityProfileCollection = options.qualityProfiles;
|
||||
'click .x-remove': 'removeSeries'
|
||||
},
|
||||
|
||||
editSeries: function () {
|
||||
|
|
|
@ -1,17 +1,10 @@
|
|||
'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({
|
||||
itemView : NzbDrone.Series.Index.Posters.ItemView,
|
||||
itemViewContainer : '#x-series-posters',
|
||||
template : 'Series/Index/Posters/CollectionTemplate',
|
||||
qualityProfileCollection: qualityProfileCollection,
|
||||
|
||||
initialize: function () {
|
||||
this.qualityProfileCollection.fetch();
|
||||
|
||||
this.itemViewOptions = { qualityProfiles: this.qualityProfileCollection };
|
||||
}
|
||||
template : 'Series/Index/Posters/CollectionTemplate'
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -23,8 +23,6 @@
|
|||
{{#if isContinuing}}
|
||||
{{#if nextAiring}}
|
||||
<span class="label label-inverse">{{date nextAiring}}</span>
|
||||
{{else}}
|
||||
<span class="label label-inverse">Continuing</span>
|
||||
{{/if}}
|
||||
<span class="label label-info">Season {{seasonCount}}</span>
|
||||
{{else}}
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
define([
|
||||
'app',
|
||||
'Quality/QualityProfileCollection',
|
||||
'Series/SeriesCollection',
|
||||
'Series/Edit/EditSeriesView',
|
||||
'Series/Delete/DeleteSeriesView'
|
||||
|
@ -26,9 +25,6 @@ define([
|
|||
'mouseleave .x-series-poster': 'posterHoverAction'
|
||||
},
|
||||
|
||||
initialize: function (options) {
|
||||
this.qualityProfileCollection = options.qualityProfiles;
|
||||
},
|
||||
|
||||
editSeries: function () {
|
||||
var view = new NzbDrone.Series.Edit.EditSeriesView({ model: this.model});
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
"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({
|
||||
|
||||
urlRoot: NzbDrone.Constants.ApiRoot + '/series',
|
||||
|
@ -29,7 +29,7 @@ define(['app', 'Quality/QualityProfileCollection', 'AddSeries/RootFolders/RootFo
|
|||
traktUrl : function () {
|
||||
return "http://trakt.tv/show/" + this.get('titleSlug');
|
||||
},
|
||||
imdbUrl : function () {
|
||||
imdbUrl : function () {
|
||||
return "http://imdb.com/title/" + this.get('imdbId');
|
||||
},
|
||||
isContinuing : function () {
|
||||
|
@ -44,16 +44,19 @@ define(['app', 'Quality/QualityProfileCollection', 'AddSeries/RootFolders/RootFo
|
|||
|
||||
return Date.create(date).short();
|
||||
},
|
||||
route : function(){
|
||||
route : function () {
|
||||
return '/series/details/' + this.get('titleSlug');
|
||||
//return '/series/details/' + this.get('id');
|
||||
},
|
||||
|
||||
qualityProfile: function () {
|
||||
return qualityProfiles.get(this.get('qualityProfileId')).toJSON();
|
||||
}
|
||||
},
|
||||
|
||||
defaults: {
|
||||
episodeFileCount: 0,
|
||||
episodeCount : 0,
|
||||
qualityProfiles : qualityProfileCollection,
|
||||
rootFolders : rootFolders,
|
||||
isExisting : false,
|
||||
status : 0
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue