mirror of
https://github.com/C9Glax/tranga.git
synced 2025-04-16 05:13:18 +02:00
Change coverCacheFilenames, to avoid conflicts and malformatted filenames
This commit is contained in:
parent
b3bf523e1e
commit
1785aa28ea
@ -247,7 +247,8 @@ public abstract class MangaConnector : GlobalBase
|
|||||||
|
|
||||||
protected string SaveCoverImageToCache(string url, byte requestType)
|
protected string SaveCoverImageToCache(string url, byte requestType)
|
||||||
{
|
{
|
||||||
string filename = url.Split('/')[^1].Split('?')[0];
|
string filetype = url.Split('/')[^1].Split('?')[0].Split('.')[^1];
|
||||||
|
string filename = $"{DateTime.Now.Ticks.ToString()}.{filetype}";
|
||||||
string saveImagePath = Path.Join(settings.coverImageCache, filename);
|
string saveImagePath = Path.Join(settings.coverImageCache, filename);
|
||||||
|
|
||||||
if (File.Exists(saveImagePath))
|
if (File.Exists(saveImagePath))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user