Skip to content

Commit

Permalink
Apply review suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
Shadowghost committed Nov 8, 2024
1 parent d31355a commit c84edaa
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
6 changes: 4 additions & 2 deletions src/Jellyfin.Plugin.Dlna.Model/DlnaDeviceProfile.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#pragma warning disable CA1819 // Properties should not return arrays

using System;
using System.Collections.Generic;
using System.ComponentModel;
Expand Down Expand Up @@ -158,12 +160,12 @@ public class DlnaDeviceProfile : DeviceProfile
/// <summary>
/// Gets or sets the XmlRootAttributes.
/// </summary>
public IReadOnlyList<XmlAttribute> XmlRootAttributes { get; set; } = [];
public XmlAttribute[] XmlRootAttributes { get; set; } = [];

/// <summary>
/// Gets or sets the ResponseProfiles.
/// </summary>
public IReadOnlyList<ResponseProfile> ResponseProfiles { get; set; } = [];
public ResponseProfile[] ResponseProfiles { get; set; } = [];

/// <summary>
/// The supported media types.
Expand Down
1 change: 0 additions & 1 deletion src/Jellyfin.Plugin.Dlna.Model/IDeviceDiscovery.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ namespace Jellyfin.Plugin.Dlna.Model;
/// <summary>
/// Defines the <see cref="IDeviceDiscovery" /> interface.
/// </summary>

public interface IDeviceDiscovery
{
/// <summary>
Expand Down
4 changes: 2 additions & 2 deletions src/Jellyfin.Plugin.Dlna/Didl/DidlBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -261,8 +261,8 @@ private void AddVideoResource(XmlWriter writer, BaseItem video, string deviceId,
var contentFeatureList = ContentFeatureBuilder.BuildVideoHeader(
_profile,
streamInfo.Container,
streamInfo.TargetVideoCodec[0],
streamInfo.TargetAudioCodec[0],
streamInfo.TargetVideoCodec.FirstOrDefault(),
streamInfo.TargetAudioCodec.FirstOrDefault(),
targetWidth,
targetHeight,
streamInfo.TargetVideoBitDepth,
Expand Down
2 changes: 1 addition & 1 deletion src/Jellyfin.Plugin.Dlna/DlnaManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ public void UpdateProfile(string profileId, DlnaDeviceProfile profile)

if (profile.Id.IsNullOrEmpty())
{
throw new ArgumentException("Profile id cannot be empty. ProfileId: {Id}", nameof(profile));
throw new ArgumentException($"Profile id cannot be empty. ProfileId: {profile.Id}", nameof(profile));
}

ArgumentException.ThrowIfNullOrEmpty(profile.Name);
Expand Down

0 comments on commit c84edaa

Please sign in to comment.