Method description and Name CopyCoverFromCacheToDownloadLocation

This commit is contained in:
glax 2023-05-31 20:39:57 +02:00
parent f1ab823e7f
commit 2bc92556e3
2 changed files with 4 additions and 5 deletions

View File

@ -57,16 +57,15 @@ public abstract class Connector
public abstract void DownloadChapter(Publication publication, Chapter chapter);
/// <summary>
/// Retrieves the Cover from the Website
/// Copies the already downloaded cover from cache to downloadLocation
/// </summary>
/// <param name="publication">Publication to retrieve Cover for</param>
/// <param name="settings">TrangaSettings</param>
public void CloneCoverFromCache(Publication publication, TrangaSettings settings)
public void CopyCoverFromCacheToDownloadLocation(Publication publication, TrangaSettings settings)
{
logger?.WriteLine(this.GetType().ToString(), $"Cloning cover {publication.sortName}");
logger?.WriteLine(this.GetType().ToString(), $"Cloning cover {publication.sortName} {publication.internalId}");
//Check if Publication already has a Folder and cover
string publicationFolder = Path.Join(downloadLocation, publication.folderName);
if(!Directory.Exists(publicationFolder))
Directory.CreateDirectory(publicationFolder);
DirectoryInfo dirInfo = new (publicationFolder);

View File

@ -98,7 +98,7 @@ public static class TaskExecutor
Directory.CreateDirectory(publicationFolder);
List<Chapter> newChapters = UpdateChapters(connector, publication, language, ref chapterCollection);
connector.CloneCoverFromCache(publication, settings);
connector.CopyCoverFromCacheToDownloadLocation(publication, settings);
publication.SaveSeriesInfoJson(connector.downloadLocation);