Fix DeviceProfile.Id should be nullable (#12679)

pull/12681/head
Niels van Velzen 2 months ago committed by GitHub
parent b162e9290b
commit bcc818f397
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -22,7 +22,7 @@ public class DeviceProfile
/// <summary>
/// Gets or sets the unique internal identifier.
/// </summary>
public Guid Id { get; set; }
public Guid? Id { get; set; }
/// <summary>
/// Gets or sets the maximum allowed bitrate for all streamed content.

@ -65,7 +65,7 @@ namespace MediaBrowser.Model.Dlna
if (streamInfo is not null)
{
streamInfo.DeviceId = options.DeviceId;
streamInfo.DeviceProfileId = options.Profile.Id.ToString("N", CultureInfo.InvariantCulture);
streamInfo.DeviceProfileId = options.Profile.Id?.ToString("N", CultureInfo.InvariantCulture);
streams.Add(streamInfo);
}
}
@ -240,7 +240,7 @@ namespace MediaBrowser.Model.Dlna
foreach (var stream in streams)
{
stream.DeviceId = options.DeviceId;
stream.DeviceProfileId = options.Profile.Id.ToString("N", CultureInfo.InvariantCulture);
stream.DeviceProfileId = options.Profile.Id?.ToString("N", CultureInfo.InvariantCulture);
}
return GetOptimalStream(streams, options.GetMaxBitrate(false) ?? 0);

Loading…
Cancel
Save