mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-22 22:43:31 -07:00
Fixes #100 - When adding a movie, monitored toggle doesn't apply and always defaults to being monitored
This commit is contained in:
parent
48559cf964
commit
d252a8b232
2 changed files with 7 additions and 40 deletions
|
@ -58,7 +58,7 @@ var view = Marionette.ItemView.extend({
|
||||||
var defaultProfile = Config.getValue(Config.Keys.DefaultProfileId);
|
var defaultProfile = Config.getValue(Config.Keys.DefaultProfileId);
|
||||||
var defaultRoot = Config.getValue(Config.Keys.DefaultRootFolderId);
|
var defaultRoot = Config.getValue(Config.Keys.DefaultRootFolderId);
|
||||||
var useSeasonFolder = Config.getValueBoolean(Config.Keys.UseSeasonFolder, true);
|
var useSeasonFolder = Config.getValueBoolean(Config.Keys.UseSeasonFolder, true);
|
||||||
var defaultMonitorEpisodes = Config.getValue(Config.Keys.MonitorEpisodes, 'missing');
|
var defaultMonitorEpisodes = Config.getValue(Config.Keys.MonitorEpisodes, 'all');
|
||||||
|
|
||||||
if (Profiles.get(defaultProfile)) {
|
if (Profiles.get(defaultProfile)) {
|
||||||
this.ui.profile.val(defaultProfile);
|
this.ui.profile.val(defaultProfile);
|
||||||
|
@ -169,6 +169,7 @@ var view = Marionette.ItemView.extend({
|
||||||
|
|
||||||
var profile = this.ui.profile.val();
|
var profile = this.ui.profile.val();
|
||||||
var rootFolderPath = this.ui.rootFolder.children(':selected').text();
|
var rootFolderPath = this.ui.rootFolder.children(':selected').text();
|
||||||
|
var monitor = this.ui.monitor.val();
|
||||||
|
|
||||||
var options = this._getAddMoviesOptions();
|
var options = this._getAddMoviesOptions();
|
||||||
options.searchForMovie = searchForMovie;
|
options.searchForMovie = searchForMovie;
|
||||||
|
@ -178,7 +179,7 @@ var view = Marionette.ItemView.extend({
|
||||||
profileId : profile,
|
profileId : profile,
|
||||||
rootFolderPath : rootFolderPath,
|
rootFolderPath : rootFolderPath,
|
||||||
addOptions : options,
|
addOptions : options,
|
||||||
monitored : true
|
monitored : (monitor === 'all' ? true : false)
|
||||||
}, { silent : true });
|
}, { silent : true });
|
||||||
|
|
||||||
var self = this;
|
var self = this;
|
||||||
|
@ -229,44 +230,10 @@ var view = Marionette.ItemView.extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
_getAddMoviesOptions : function() {
|
_getAddMoviesOptions : function() {
|
||||||
var monitor = this.ui.monitor.val();
|
return {
|
||||||
|
|
||||||
var options = {
|
|
||||||
ignoreEpisodesWithFiles : false,
|
ignoreEpisodesWithFiles : false,
|
||||||
ignoreEpisodesWithoutFiles : false
|
ignoreEpisodesWithoutFiles : false
|
||||||
};
|
};
|
||||||
|
|
||||||
if (monitor === 'all') {
|
|
||||||
return options;
|
|
||||||
}
|
|
||||||
|
|
||||||
else if (monitor === 'future') {
|
|
||||||
options.ignoreEpisodesWithFiles = true;
|
|
||||||
options.ignoreEpisodesWithoutFiles = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// else if (monitor === 'latest') {
|
|
||||||
// this.model.setSeasonPass(lastSeason.seasonNumber);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// else if (monitor === 'first') {
|
|
||||||
// this.model.setSeasonPass(lastSeason.seasonNumber + 1);
|
|
||||||
// this.model.setSeasonMonitored(firstSeason.seasonNumber);
|
|
||||||
// }
|
|
||||||
|
|
||||||
else if (monitor === 'missing') {
|
|
||||||
options.ignoreEpisodesWithFiles = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
else if (monitor === 'existing') {
|
|
||||||
options.ignoreEpisodesWithoutFiles = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// else if (monitor === 'none') {
|
|
||||||
// this.model.setSeasonPass(lastSeason.seasonNumber + 1);
|
|
||||||
// }
|
|
||||||
|
|
||||||
return options;
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -41,9 +41,9 @@
|
||||||
<div class="form-group col-md-2">
|
<div class="form-group col-md-2">
|
||||||
<label>Monitor <i class="icon-sonarr-form-info monitor-tooltip x-monitor-tooltip"></i></label>
|
<label>Monitor <i class="icon-sonarr-form-info monitor-tooltip x-monitor-tooltip"></i></label>
|
||||||
<select class="form-control col-md-2 x-monitor">
|
<select class="form-control col-md-2 x-monitor">
|
||||||
<option value="all">All</option>
|
<option value="all">Yes</option>
|
||||||
<option value="missing">Missing</option>
|
<!-- <option value="missing">Missing</option> -->
|
||||||
<option value="none">None</option>
|
<option value="none">No</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue