Skip to content

Commit

Permalink
Merge branch 'refs/heads/cuttingedge-merge-ServerV2' into cuttingedge
Browse files Browse the repository at this point in the history
  • Loading branch information
C9Glax committed Apr 22, 2024
2 parents 762da4c + 51a26a3 commit aaf06da
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Tranga/MangaConnectors/MangaConnector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ public void CopyCoverFromCacheToDownloadLocation(Manga manga, int? retries = 1)
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}.");
Expand Down Expand Up @@ -299,6 +299,6 @@ protected string SaveCoverImageToCache(string url, RequestType requestType)
coverResult.result.CopyTo(ms);
File.WriteAllBytes(saveImagePath, ms.ToArray());
Log($"Saving cover to {saveImagePath}");
return filename;
return saveImagePath;
}
}
2 changes: 1 addition & 1 deletion Tranga/Server.cs
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ private void HandleGet(HttpListenerRequest request, HttpListenerResponse respons
break;
}

string filePath = settings.GetFullCoverPath((Manga)manga!);
string filePath = manga?.coverFileNameInCache ?? "";
if (File.Exists(filePath))
{
FileStream coverStream = new(filePath, FileMode.Open);
Expand Down

0 comments on commit aaf06da

Please sign in to comment.