The Free Software Media System - Server Backend & API
Use correct id when finding existing dlna profile
Cody Robibero2f6437a98742
diff --git a/Emby.Dlna/DlnaManager.cs b/Emby.Dlna/DlnaManager.csindex 73e8a0008e..f37d2d7d7b 100644--- a/Emby.Dlna/DlnaManager.cs+++ b/Emby.Dlna/DlnaManager.cs@@ -416,7 +416,7 @@ namespace Emby.Dlna}/// <inheritdoc />- public void UpdateProfile(DeviceProfile profile)+ public void UpdateProfile(string profileId, DeviceProfile profile){profile = ReserializeProfile(profile);@@ -430,7 +430,7 @@ namespace Emby.Dlnathrow new ArgumentException("Profile is missing Name");}- var current = GetProfileInfosInternal().First(i => string.Equals(i.Info.Id, profile.Id, StringComparison.OrdinalIgnoreCase));+ var current = GetProfileInfosInternal().First(i => string.Equals(i.Info.Id, profileId, StringComparison.OrdinalIgnoreCase));var newFilename = _fileSystem.GetValidFilename(profile.Name) + ".xml";var path = Path.Combine(UserProfilesPath, newFilename);diff --git a/Jellyfin.Api/Controllers/DlnaController.cs b/Jellyfin.Api/Controllers/DlnaController.csindex 052a6aff2e..35c3a3d922 100644--- a/Jellyfin.Api/Controllers/DlnaController.cs+++ b/Jellyfin.Api/Controllers/DlnaController.cs@@ -126,7 +126,7 @@ namespace Jellyfin.Api.Controllersreturn NotFound();}- _dlnaManager.UpdateProfile(deviceProfile);+ _dlnaManager.UpdateProfile(profileId, deviceProfile);return NoContent();}}diff --git a/MediaBrowser.Controller/Dlna/IDlnaManager.cs b/MediaBrowser.Controller/Dlna/IDlnaManager.csindex cc0a107a81..06da5ea097 100644--- a/MediaBrowser.Controller/Dlna/IDlnaManager.cs+++ b/MediaBrowser.Controller/Dlna/IDlnaManager.cs@@ -37,8 +37,9 @@ namespace MediaBrowser.Controller.Dlna/// <summary>/// Updates the profile./// </summary>+ /// <param name="profileId">The profile id.</param>/// <param name="profile">The profile.</param>- void UpdateProfile(DeviceProfile profile);+ void UpdateProfile(string profileId, DeviceProfile profile);/// <summary>/// Deletes the profile.