diff --git a/Shoko.Server/Extensions/ImageResolvers.cs b/Shoko.Server/Extensions/ImageResolvers.cs index 4bfbd353b..d762f665d 100644 --- a/Shoko.Server/Extensions/ImageResolvers.cs +++ b/Shoko.Server/Extensions/ImageResolvers.cs @@ -70,7 +70,7 @@ public static string GetFullImagePath(this TvDB_Episode episode) return string.Empty; var fname = episode.Filename.Replace('/', Path.DirectorySeparatorChar); - return Path.Combine(ImageUtils.GetTvDBImagePath(), fname); + return Path.Combine(ImageUtils.GetBaseTvDBImagesPath(), fname); } public static IImageMetadata? GetImageMetadata(this TvDB_ImageFanart fanart, bool preferred = false) @@ -88,7 +88,7 @@ public static string GetFullImagePath(this TvDB_ImageFanart fanart) return string.Empty; var fname = fanart.BannerPath.Replace('/', Path.DirectorySeparatorChar); - return Path.Combine(ImageUtils.GetTvDBImagePath(), fname); + return Path.Combine(ImageUtils.GetBaseTvDBImagesPath(), fname); } public static IImageMetadata? GetImageMetadata(this TvDB_ImagePoster poster, bool preferred = false) @@ -106,7 +106,7 @@ public static string GetFullImagePath(this TvDB_ImagePoster poster) return string.Empty; var fname = poster.BannerPath.Replace('/', Path.DirectorySeparatorChar); - return Path.Combine(ImageUtils.GetTvDBImagePath(), fname); + return Path.Combine(ImageUtils.GetBaseTvDBImagesPath(), fname); } public static IImageMetadata? GetImageMetadata(this TvDB_ImageWideBanner banner, bool preferred = false) @@ -124,7 +124,7 @@ public static string GetFullImagePath(this TvDB_ImageWideBanner banner) return string.Empty; var fname = banner.BannerPath.Replace('/', Path.DirectorySeparatorChar); - return Path.Combine(ImageUtils.GetTvDBImagePath(), fname); + return Path.Combine(ImageUtils.GetBaseTvDBImagesPath(), fname); } public static IImageMetadata? GetImageMetadata(this AniDB_Character character, bool preferred = false) diff --git a/Shoko.Server/Utilities/ImageUtils.cs b/Shoko.Server/Utilities/ImageUtils.cs index 12f263265..466d54af5 100644 --- a/Shoko.Server/Utilities/ImageUtils.cs +++ b/Shoko.Server/Utilities/ImageUtils.cs @@ -85,16 +85,6 @@ public static string GetBaseTvDBImagesPath() return dirPath; } - public static string GetImagesTempFolder() - { - var dirPath = Path.Combine(GetBaseImagesPath(), "_Temp_"); - - if (!Directory.Exists(dirPath)) - Directory.CreateDirectory(dirPath); - - return dirPath; - } - public static string GetAniDBCharacterImagePath(int charID) { var sid = charID.ToString(); @@ -128,15 +118,6 @@ public static string GetAniDBImagePath(int animeID) return dirPath; } - public static string GetTvDBImagePath() - { - var dirPath = GetBaseTvDBImagesPath(); - if (!Directory.Exists(dirPath)) - Directory.CreateDirectory(dirPath); - - return dirPath; - } - public static IImageMetadata? GetImageMetadata(CL_ImageEntityType imageEntityType, int imageId) => GetImageMetadata(imageEntityType.ToServerSource(), imageEntityType.ToServerType(), imageId);