mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-06 03:26:07 +02:00
Merge pull request #6745 from crobibero/dlna-profile-save
Use correct id when finding existing dlna profile
This commit is contained in:
commit
76eeb8f655
3 changed files with 5 additions and 4 deletions
|
@ -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);
|
||||
|
|
|
@ -126,7 +126,7 @@ namespace Jellyfin.Api.Controllers
|
|||
return NotFound();
|
||||
}
|
||||
|
||||
_dlnaManager.UpdateProfile(deviceProfile);
|
||||
_dlnaManager.UpdateProfile(profileId, deviceProfile);
|
||||
return NoContent();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue