Added API: customFolderName to Jobs/MonitorManga and Jobs/DownloadNewChapters

resolves #30
This commit is contained in:
2023-09-05 19:50:56 +02:00
parent 384e4c4f43
commit ae1184320f
2 changed files with 19 additions and 2 deletions

View File

@ -28,7 +28,7 @@ public struct Manga
public string? originalLanguage { get; }
// ReSharper disable once MemberCanBePrivate.Global
public string status { get; }
public string folderName { get; }
public string folderName { get; private set; }
public string publicationId { get; }
public string internalId { get; }
public float ignoreChaptersBelow { get; set; }
@ -73,6 +73,15 @@ public struct Manga
return publicationFolder;
}
public void MovePublicationFolder(string downloadDirectory, string newFolderName)
{
string oldPath = Path.Join(downloadDirectory, this.folderName);
this.folderName = newFolderName;
string newPath = CreatePublicationFolder(downloadDirectory);
if(Directory.Exists(oldPath))
Directory.Move(oldPath, newPath);
}
public void SaveSeriesInfoJson(string downloadDirectory)
{
string publicationFolder = CreatePublicationFolder(downloadDirectory);