mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-22 22:43:31 -07:00
Merge branch 'develop' of https://github.com/galli-leo/Radarr into develop
This commit is contained in:
commit
0506cc4185
4 changed files with 11 additions and 44 deletions
|
@ -25,7 +25,7 @@ namespace NzbDrone.Api.Frontend.Mappers
|
||||||
|
|
||||||
public override bool CanHandle(string resourceUrl)
|
public override bool CanHandle(string resourceUrl)
|
||||||
{
|
{
|
||||||
return resourceUrl.StartsWith("/backup/") && resourceUrl.ContainsIgnoreCase("nzbdrone_backup_") && resourceUrl.EndsWith(".zip");
|
return resourceUrl.StartsWith("/backup/") && resourceUrl.ContainsIgnoreCase("radarr_backup_") && resourceUrl.EndsWith(".zip");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -33,7 +33,7 @@ namespace NzbDrone.Core.Backup
|
||||||
|
|
||||||
private string _backupTempFolder;
|
private string _backupTempFolder;
|
||||||
|
|
||||||
private static readonly Regex BackupFileRegex = new Regex(@"nzbdrone_backup_[._0-9]+\.zip", RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
private static readonly Regex BackupFileRegex = new Regex(@"radarr_backup_[._0-9]+\.zip", RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
||||||
|
|
||||||
public BackupService(IMainDatabase maindDb,
|
public BackupService(IMainDatabase maindDb,
|
||||||
IDiskTransferService diskTransferService,
|
IDiskTransferService diskTransferService,
|
||||||
|
@ -49,7 +49,7 @@ namespace NzbDrone.Core.Backup
|
||||||
_archiveService = archiveService;
|
_archiveService = archiveService;
|
||||||
_logger = logger;
|
_logger = logger;
|
||||||
|
|
||||||
_backupTempFolder = Path.Combine(_appFolderInfo.TempFolder, "nzbdrone_backup");
|
_backupTempFolder = Path.Combine(_appFolderInfo.TempFolder, "radarr_backup");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Backup(BackupType backupType)
|
public void Backup(BackupType backupType)
|
||||||
|
@ -59,7 +59,7 @@ namespace NzbDrone.Core.Backup
|
||||||
_diskProvider.EnsureFolder(_backupTempFolder);
|
_diskProvider.EnsureFolder(_backupTempFolder);
|
||||||
_diskProvider.EnsureFolder(GetBackupFolder(backupType));
|
_diskProvider.EnsureFolder(GetBackupFolder(backupType));
|
||||||
|
|
||||||
var backupFilename = string.Format("nzbdrone_backup_{0:yyyy.MM.dd_HH.mm.ss}.zip", DateTime.Now);
|
var backupFilename = string.Format("radarr_backup_{0:yyyy.MM.dd_HH.mm.ss}.zip", DateTime.Now);
|
||||||
var backupPath = Path.Combine(GetBackupFolder(backupType), backupFilename);
|
var backupPath = Path.Combine(GetBackupFolder(backupType), backupFilename);
|
||||||
|
|
||||||
Cleanup();
|
Cleanup();
|
||||||
|
|
|
@ -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