mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-29 21:39:34 +02:00
Series monitored visible on seasons/episodes on details page and episode details modal
New: Visual indication on season/episode when series is not monitored New: Prevent changing monitored state when series is not monitored
This commit is contained in:
@@ -4,15 +4,27 @@ define(
|
||||
'vent',
|
||||
'marionette',
|
||||
'backgrid',
|
||||
'Cells/ToggleCell',
|
||||
'Cells/EpisodeMonitoredCell',
|
||||
'Cells/EpisodeTitleCell',
|
||||
'Cells/RelativeDateCell',
|
||||
'Cells/EpisodeStatusCell',
|
||||
'Cells/EpisodeActionsCell',
|
||||
'Commands/CommandController',
|
||||
'moment',
|
||||
'underscore'
|
||||
], function (vent, Marionette, Backgrid, ToggleCell, EpisodeTitleCell, RelativeDateCell, EpisodeStatusCell, EpisodeActionsCell, CommandController, Moment, _) {
|
||||
'underscore',
|
||||
'Shared/Messenger'
|
||||
], function (vent,
|
||||
Marionette,
|
||||
Backgrid,
|
||||
ToggleCell,
|
||||
EpisodeTitleCell,
|
||||
RelativeDateCell,
|
||||
EpisodeStatusCell,
|
||||
EpisodeActionsCell,
|
||||
CommandController,
|
||||
Moment,
|
||||
_,
|
||||
Messenger) {
|
||||
return Marionette.Layout.extend({
|
||||
template: 'Series/Details/SeasonLayoutTemplate',
|
||||
|
||||
@@ -95,7 +107,6 @@ define(
|
||||
|
||||
onRender: function () {
|
||||
|
||||
|
||||
if (this.showingEpisodes) {
|
||||
this._showEpisodes();
|
||||
}
|
||||
@@ -135,6 +146,16 @@ define(
|
||||
},
|
||||
|
||||
_seasonMonitored: function () {
|
||||
if (!this.series.get('monitored')) {
|
||||
|
||||
Messenger.show({
|
||||
message: 'Unable to change monitored state when series is not monitored',
|
||||
type : 'error'
|
||||
});
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
var name = 'monitored';
|
||||
this.model.set(name, !this.model.get(name));
|
||||
this.series.setSeasonMonitored(this.model.get('seasonNumber'));
|
||||
|
Reference in New Issue
Block a user