diff options
| author | Claus Vium <cvium@users.noreply.github.com> | 2021-11-01 17:19:43 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-11-01 17:19:43 +0100 |
| commit | 76eeb8f655424d295e73ced8349c6fefee6ddb12 (patch) | |
| tree | e1b1bd603b011ca98e5793e356326bf4a35a7050 | |
| parent | e8efc433fa8c7ed917ae8d9b42440a6a0812d62a (diff) | |
| parent | 2f6437a987423bf75a32bf7112f596f6cfa242ec (diff) | |
Merge pull request #6745 from crobibero/dlna-profile-save
Use correct id when finding existing dlna profile
| -rw-r--r-- | Emby.Dlna/DlnaManager.cs | 4 | ||||
| -rw-r--r-- | Jellyfin.Api/Controllers/DlnaController.cs | 2 | ||||
| -rw-r--r-- | MediaBrowser.Controller/Dlna/IDlnaManager.cs | 3 |
3 files changed, 5 insertions, 4 deletions
diff --git a/Emby.Dlna/DlnaManager.cs b/Emby.Dlna/DlnaManager.cs index 73e8a0008..f37d2d7d7 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.Dlna throw 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.cs index 052a6aff2..35c3a3d92 100644 --- a/Jellyfin.Api/Controllers/DlnaController.cs +++ b/Jellyfin.Api/Controllers/DlnaController.cs @@ -126,7 +126,7 @@ namespace Jellyfin.Api.Controllers return NotFound(); } - _dlnaManager.UpdateProfile(deviceProfile); + _dlnaManager.UpdateProfile(profileId, deviceProfile); return NoContent(); } } diff --git a/MediaBrowser.Controller/Dlna/IDlnaManager.cs b/MediaBrowser.Controller/Dlna/IDlnaManager.cs index cc0a107a8..06da5ea09 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. |
