mirror of
https://github.com/Kareadita/Kavita.git
synced 2026-06-05 14:25:17 -04:00
Backend Bugfixes and Enhanced Selections (#754)
* Updated some signatures to avoid a ToArray() within a loop. * Use UpdateSeries directly when adding new series, rather than a modified version for new series only. * Refactored some messages for scanner loop to reduce duplicate code and write messages more clear. Hooked in a RefreshMetadataProgress event (no UI changes). * Fixed a bug on docker where backup service was using different logic than non-docker, which isn't needed after config change last release. * Allow user to make more than 1 backup per day * Implemented a select all checkbox for library access modal
This commit is contained in:
@@ -26,8 +26,6 @@ namespace API.Data
|
||||
"temp"
|
||||
};
|
||||
|
||||
private static readonly string ConfigDirectory = Path.Join(Directory.GetCurrentDirectory(), "config");
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// In v0.4.8 we moved all config files to config/ to match with how docker was setup. This will move all config files from current directory
|
||||
@@ -66,8 +64,8 @@ namespace API.Data
|
||||
Console.WriteLine(
|
||||
"Migrating files from pre-v0.4.8. All Kavita config files are now located in config/");
|
||||
|
||||
Console.WriteLine($"Creating {ConfigDirectory}");
|
||||
DirectoryService.ExistOrCreate(ConfigDirectory);
|
||||
Console.WriteLine($"Creating {DirectoryService.ConfigDirectory}");
|
||||
DirectoryService.ExistOrCreate(DirectoryService.ConfigDirectory);
|
||||
|
||||
try
|
||||
{
|
||||
@@ -116,13 +114,13 @@ namespace API.Data
|
||||
|
||||
foreach (var folderToMove in AppFolders)
|
||||
{
|
||||
if (new DirectoryInfo(Path.Join(ConfigDirectory, folderToMove)).Exists) continue;
|
||||
if (new DirectoryInfo(Path.Join(DirectoryService.ConfigDirectory, folderToMove)).Exists) continue;
|
||||
|
||||
try
|
||||
{
|
||||
DirectoryService.CopyDirectoryToDirectory(
|
||||
Path.Join(Directory.GetCurrentDirectory(), folderToMove),
|
||||
Path.Join(ConfigDirectory, folderToMove));
|
||||
Path.Join(DirectoryService.ConfigDirectory, folderToMove));
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
@@ -144,7 +142,7 @@ namespace API.Data
|
||||
{
|
||||
try
|
||||
{
|
||||
fileInfo.CopyTo(Path.Join(ConfigDirectory, fileInfo.Name));
|
||||
fileInfo.CopyTo(Path.Join(DirectoryService.ConfigDirectory, fileInfo.Name));
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user