Merge branch 'refs/heads/cuttingedge-merge-ServerV2' into cuttingedge

This commit is contained in:
Glax 2024-04-23 00:20:50 +02:00
commit aaf06da8e1
2 changed files with 3 additions and 3 deletions

View File

@ -175,7 +175,7 @@ public abstract class MangaConnector : GlobalBase
return;
}
string fileInCache = Path.Join(settings.coverImageCache, manga.coverFileNameInCache);
string fileInCache = manga.coverFileNameInCache ?? Path.Join(settings.coverImageCache, manga.coverFileNameInCache);
if (!File.Exists(fileInCache))
{
Log($"Cloning cover failed: File missing {fileInCache}.");
@ -299,6 +299,6 @@ public abstract class MangaConnector : GlobalBase
coverResult.result.CopyTo(ms);
File.WriteAllBytes(saveImagePath, ms.ToArray());
Log($"Saving cover to {saveImagePath}");
return filename;
return saveImagePath;
}
}

View File

@ -122,7 +122,7 @@ public class Server : GlobalBase
break;
}
string filePath = settings.GetFullCoverPath((Manga)manga!);
string filePath = manga?.coverFileNameInCache ?? "";
if (File.Exists(filePath))
{
FileStream coverStream = new(filePath, FileMode.Open);