|
|
|
@ -1,4 +1,4 @@
|
|
|
|
|
using System;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.IO;
|
|
|
|
|
using System.Text.RegularExpressions;
|
|
|
|
@ -11,8 +11,8 @@ namespace NzbDrone.Common.Extensions
|
|
|
|
|
public static class PathExtensions
|
|
|
|
|
{
|
|
|
|
|
private const string APP_CONFIG_FILE = "config.xml";
|
|
|
|
|
private const string NZBDRONE_DB = "lidarr.db";
|
|
|
|
|
private const string NZBDRONE_LOG_DB = "logs.db";
|
|
|
|
|
private const string DB = "lidarr.db";
|
|
|
|
|
private const string LOG_DB = "logs.db";
|
|
|
|
|
private const string NLOG_CONFIG_FILE = "nlog.config";
|
|
|
|
|
private const string UPDATE_CLIENT_EXE = "Lidarr.Update.exe";
|
|
|
|
|
private const string BACKUP_FOLDER = "Backups";
|
|
|
|
@ -21,7 +21,7 @@ namespace NzbDrone.Common.Extensions
|
|
|
|
|
private static readonly string UPDATE_PACKAGE_FOLDER_NAME = "Lidarr" + Path.DirectorySeparatorChar;
|
|
|
|
|
private static readonly string UPDATE_BACKUP_FOLDER_NAME = "lidarr_backup" + Path.DirectorySeparatorChar;
|
|
|
|
|
private static readonly string UPDATE_BACKUP_APPDATA_FOLDER_NAME = "lidarr_appdata_backup" + Path.DirectorySeparatorChar;
|
|
|
|
|
private static readonly string UPDATE_CLIENT_FOLDER_NAME = "NzbDrone.Update" + Path.DirectorySeparatorChar;
|
|
|
|
|
private static readonly string UPDATE_CLIENT_FOLDER_NAME = "Lidarr.Update" + Path.DirectorySeparatorChar;
|
|
|
|
|
private static readonly string UPDATE_LOG_FOLDER_NAME = "UpdateLogs" + Path.DirectorySeparatorChar;
|
|
|
|
|
|
|
|
|
|
public static string CleanFilePath(this string path)
|
|
|
|
@ -238,7 +238,7 @@ namespace NzbDrone.Common.Extensions
|
|
|
|
|
|
|
|
|
|
public static string GetUpdateBackupDatabase(this IAppFolderInfo appFolderInfo)
|
|
|
|
|
{
|
|
|
|
|
return Path.Combine(GetUpdateBackUpAppDataFolder(appFolderInfo), NZBDRONE_DB);
|
|
|
|
|
return Path.Combine(GetUpdateBackUpAppDataFolder(appFolderInfo), DB);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static string GetUpdatePackageFolder(this IAppFolderInfo appFolderInfo)
|
|
|
|
@ -261,14 +261,14 @@ namespace NzbDrone.Common.Extensions
|
|
|
|
|
return Path.Combine(GetAppDataPath(appFolderInfo), BACKUP_FOLDER);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static string GetNzbDroneDatabase(this IAppFolderInfo appFolderInfo)
|
|
|
|
|
public static string GetDatabase(this IAppFolderInfo appFolderInfo)
|
|
|
|
|
{
|
|
|
|
|
return Path.Combine(GetAppDataPath(appFolderInfo), NZBDRONE_DB);
|
|
|
|
|
return Path.Combine(GetAppDataPath(appFolderInfo), DB);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static string GetLogDatabase(this IAppFolderInfo appFolderInfo)
|
|
|
|
|
{
|
|
|
|
|
return Path.Combine(GetAppDataPath(appFolderInfo), NZBDRONE_LOG_DB);
|
|
|
|
|
return Path.Combine(GetAppDataPath(appFolderInfo), LOG_DB);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static string GetNlogConfigPath(this IAppFolderInfo appFolderInfo)
|
|
|
|
@ -276,4 +276,4 @@ namespace NzbDrone.Common.Extensions
|
|
|
|
|
return Path.Combine(appFolderInfo.StartUpFolder, NLOG_CONFIG_FILE);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|