Change Backup Names To Not Conflict with Sonarr

pull/6/head
Qstick 7 years ago
parent 3f0b315051
commit c333ca4161

@ -25,7 +25,7 @@ namespace Lidarr.Http.Frontend.Mappers
public override bool CanHandle(string resourceUrl)
{
return resourceUrl.StartsWith("/backup/") && resourceUrl.ContainsIgnoreCase("nzbdrone_backup_") && resourceUrl.EndsWith(".zip");
return resourceUrl.StartsWith("/backup/") && resourceUrl.ContainsIgnoreCase("lidarr_backup_") && resourceUrl.EndsWith(".zip");
}
}
}
}

@ -35,7 +35,7 @@ namespace NzbDrone.Core.Backup
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(@"lidarr_backup_[._0-9]+\.zip", RegexOptions.Compiled | RegexOptions.IgnoreCase);
public BackupService(IMainDatabase maindDb,
IMakeDatabaseBackup makeDatabaseBackup,
@ -53,7 +53,7 @@ namespace NzbDrone.Core.Backup
_archiveService = archiveService;
_logger = logger;
_backupTempFolder = Path.Combine(_appFolderInfo.TempFolder, "nzbdrone_backup");
_backupTempFolder = Path.Combine(_appFolderInfo.TempFolder, "lidarr_backup");
}
public void Backup(BackupType backupType)
@ -63,7 +63,7 @@ namespace NzbDrone.Core.Backup
_diskProvider.EnsureFolder(_backupTempFolder);
_diskProvider.EnsureFolder(GetBackupFolder(backupType));
var backupFilename = string.Format("nzbdrone_backup_{0:yyyy.MM.dd_HH.mm.ss}.zip", DateTime.Now);
var backupFilename = string.Format("lidarr_backup_{0:yyyy.MM.dd_HH.mm.ss}.zip", DateTime.Now);
var backupPath = Path.Combine(GetBackupFolder(backupType), backupFilename);
Cleanup();

Loading…
Cancel
Save