mirror of
https://github.com/Kareadita/Kavita.git
synced 2026-06-05 06:15:25 -04:00
Progress Overhaul + Profile Page and a LOT more! (#4262)
Co-authored-by: Amelia <77553571+Fesaa@users.noreply.github.com> Co-authored-by: Robbie Davis <robbie@therobbiedavis.com>
This commit is contained in:
@@ -585,6 +585,7 @@ public class ImageService : IImageService
|
||||
{
|
||||
targetDirectory ??= _directoryService.CoverImageDirectory;
|
||||
using var thumbnail = Image.ThumbnailBuffer(Convert.FromBase64String(encodedImage), thumbnailWidth);
|
||||
|
||||
fileName += encodeFormat.GetExtension();
|
||||
thumbnail.WriteToFile(_directoryService.FileSystem.Path.Join(targetDirectory, fileName));
|
||||
|
||||
@@ -681,6 +682,16 @@ public class ImageService : IImageService
|
||||
return $"person{personId}";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the name format for a user cover
|
||||
/// </summary>
|
||||
/// <param name="userId"></param>
|
||||
/// <returns></returns>
|
||||
public static string GetUserFormat(int userId)
|
||||
{
|
||||
return $"user{userId}";
|
||||
}
|
||||
|
||||
public static string GetWebLinkFormat(string url, EncodeFormat encodeFormat)
|
||||
{
|
||||
return $"{new Uri(url).Host.Replace("www.", string.Empty)}{encodeFormat.GetExtension()}";
|
||||
|
||||
Reference in New Issue
Block a user