mirror of
https://github.com/C9Glax/tranga-website.git
synced 2025-07-01 00:24:16 +02:00
Created Method to check wether file is already downloaded.
Using this method when running TaskExecutor.UpdateChapters to get a list of all chapters that have not yet been downloaded.
This commit is contained in:
@ -77,6 +77,16 @@ public abstract class Connector
|
||||
);
|
||||
return comicInfo.ToString();
|
||||
}
|
||||
|
||||
public bool ChapterIsDownloaded(Publication publication, Chapter chapter)
|
||||
{
|
||||
return File.Exists(CreateFullFilepath(publication, chapter));
|
||||
}
|
||||
|
||||
protected string CreateFullFilepath(Publication publication, Chapter chapter)
|
||||
{
|
||||
return Path.Join(downloadLocation, publication.folderName, chapter.fileName);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Downloads Image from URL and saves it to the given path(incl. fileName)
|
||||
|
Reference in New Issue
Block a user