mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-05-02 20:46:27 +02:00
Remove profile image before setting new
This commit is contained in:
parent
8ac08499bc
commit
59365150d8
1 changed files with 5 additions and 0 deletions
|
|
@ -895,6 +895,11 @@ namespace MediaBrowser.Api.Images
|
|||
// Handle image/png; charset=utf-8
|
||||
mimeType = mimeType.Split(';').FirstOrDefault();
|
||||
var userDataPath = Path.Combine(ServerConfigurationManager.ApplicationPaths.UserConfigurationDirectoryPath, user.Username);
|
||||
if (user.ProfileImage != null)
|
||||
{
|
||||
_userManager.ClearProfileImage(user);
|
||||
}
|
||||
|
||||
user.ProfileImage = new Jellyfin.Data.Entities.ImageInfo(Path.Combine(userDataPath, "profile" + MimeTypes.ToExtension(mimeType)));
|
||||
|
||||
await _providerManager
|
||||
|
|
|
|||
Loading…
Reference in a new issue