mirror of https://github.com/lidarr/Lidarr
Reload series info on model sync (details)
This commit is contained in:
parent
066bf4e8aa
commit
7d35adebf3
|
@ -0,0 +1,10 @@
|
||||||
|
'use strict';
|
||||||
|
define(
|
||||||
|
[
|
||||||
|
'marionette'
|
||||||
|
], function (Marionette) {
|
||||||
|
|
||||||
|
return Marionette.ItemView.extend({
|
||||||
|
template: 'Series/Details/InfoViewTemplate'
|
||||||
|
});
|
||||||
|
});
|
|
@ -0,0 +1,19 @@
|
||||||
|
{{qualityProfile qualityProfileId}}
|
||||||
|
<span class="label label-info">{{network}}</span>
|
||||||
|
<span class="label label-info">{{runtime}} minutes</span>
|
||||||
|
<span class="label label-info">{{path}}</span>
|
||||||
|
<span class="pull-right">
|
||||||
|
<a href="{{traktUrl}}" class="label label-info">Trakt</a>
|
||||||
|
|
||||||
|
{{#if imdbId}}
|
||||||
|
<a href="{{imdbUrl}}" class="label label-info">IMDB</a>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
|
{{#if tvdbId}}
|
||||||
|
<a href="{{tvdbUrl}}" class="label label-info">TVDB</a>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
|
{{#if tvRageId}}
|
||||||
|
<a href="{{tvRageUrl}}" class="label label-info">TVRage</a>
|
||||||
|
{{/if}}
|
||||||
|
</span>
|
|
@ -7,11 +7,12 @@ define(
|
||||||
'Series/SeasonCollection',
|
'Series/SeasonCollection',
|
||||||
'Series/Details/SeasonCollectionView',
|
'Series/Details/SeasonCollectionView',
|
||||||
'Series/Details/SeasonMenu/CollectionView',
|
'Series/Details/SeasonMenu/CollectionView',
|
||||||
|
'Series/Details/InfoView',
|
||||||
'Shared/LoadingView',
|
'Shared/LoadingView',
|
||||||
'Shared/Actioneer',
|
'Shared/Actioneer',
|
||||||
'backstrech',
|
'backstrech',
|
||||||
'Mixins/backbone.signalr.mixin'
|
'Mixins/backbone.signalr.mixin'
|
||||||
], function (App, Marionette, EpisodeCollection, SeasonCollection, SeasonCollectionView, SeasonMenuCollectionView, LoadingView, Actioneer) {
|
], function (App, Marionette, EpisodeCollection, SeasonCollection, SeasonCollectionView, SeasonMenuCollectionView, InfoView, LoadingView, Actioneer) {
|
||||||
return Marionette.Layout.extend({
|
return Marionette.Layout.extend({
|
||||||
|
|
||||||
itemViewContainer: '.x-series-seasons',
|
itemViewContainer: '.x-series-seasons',
|
||||||
|
@ -19,7 +20,8 @@ define(
|
||||||
|
|
||||||
regions: {
|
regions: {
|
||||||
seasonMenu: '#season-menu',
|
seasonMenu: '#season-menu',
|
||||||
seasons : '#seasons'
|
seasons : '#seasons',
|
||||||
|
info : '#info'
|
||||||
},
|
},
|
||||||
|
|
||||||
ui: {
|
ui: {
|
||||||
|
@ -43,7 +45,8 @@ define(
|
||||||
$('body').addClass('backdrop');
|
$('body').addClass('backdrop');
|
||||||
|
|
||||||
this.listenTo(this.model, 'sync', function () {
|
this.listenTo(this.model, 'sync', function () {
|
||||||
this._setMonitoredState()
|
this._setMonitoredState();
|
||||||
|
this._showInfo();
|
||||||
}, this);
|
}, this);
|
||||||
|
|
||||||
this.listenTo(App.vent, App.Events.SeriesDeleted, this._onSeriesDeleted);
|
this.listenTo(App.vent, App.Events.SeriesDeleted, this._onSeriesDeleted);
|
||||||
|
@ -61,6 +64,7 @@ define(
|
||||||
|
|
||||||
this._showSeasons();
|
this._showSeasons();
|
||||||
this._setMonitoredState();
|
this._setMonitoredState();
|
||||||
|
this._showInfo();
|
||||||
},
|
},
|
||||||
|
|
||||||
_getFanArt: function () {
|
_getFanArt: function () {
|
||||||
|
@ -178,6 +182,10 @@ define(
|
||||||
episodeCollection: self.episodeCollection
|
episodeCollection: self.episodeCollection
|
||||||
}));
|
}));
|
||||||
});
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
_showInfo: function () {
|
||||||
|
this.info.show(new InfoView({ model: this.model }));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -12,29 +12,11 @@
|
||||||
</span>
|
</span>
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
</div>
|
||||||
<div class="row series-detail-overview">
|
<div class="row series-detail-overview">
|
||||||
{{overview}}
|
{{overview}}
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div id="info" class="row">
|
||||||
{{qualityProfile qualityProfileId}}
|
|
||||||
<span class="label label-info">{{network}}</span>
|
|
||||||
<span class="label label-info">{{runtime}} minutes</span>
|
|
||||||
<span class="label label-info">{{path}}</span>
|
|
||||||
<span class="pull-right">
|
|
||||||
<a href="{{traktUrl}}" class="label label-info">Trakt</a>
|
|
||||||
|
|
||||||
{{#if imdbId}}
|
|
||||||
<a href="{{imdbUrl}}" class="label label-info">IMDB</a>
|
|
||||||
{{/if}}
|
|
||||||
|
|
||||||
{{#if tvdbId}}
|
|
||||||
<a href="{{tvdbUrl}}" class="label label-info">TVDB</a>
|
|
||||||
{{/if}}
|
|
||||||
|
|
||||||
{{#if tvRageId}}
|
|
||||||
<a href="{{tvRageUrl}}" class="label label-info">TVRage</a>
|
|
||||||
{{/if}}
|
|
||||||
</span>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div id="season-menu" class="season-menu"></div>
|
<div id="season-menu" class="season-menu"></div>
|
||||||
|
|
Loading…
Reference in New Issue