mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-07-09 07:10:34 +02:00
Fix check for profile supporting a codec - it should first check if profile is talking about media type
For example, audio-only profiles have "VideoCodec" set to "null" which translates to "any codec", which breaks some logic later on
This commit is contained in:
parent
0cd7cd611e
commit
8e514f8d63
|
@ -25,12 +25,12 @@ namespace MediaBrowser.Model.Dlna
|
|||
|
||||
public bool SupportsVideoCodec(string codec)
|
||||
{
|
||||
return ContainerProfile.ContainsContainer(VideoCodec, codec);
|
||||
return Type == DlnaProfileType.Video && ContainerProfile.ContainsContainer(VideoCodec, codec);
|
||||
}
|
||||
|
||||
public bool SupportsAudioCodec(string codec)
|
||||
{
|
||||
return ContainerProfile.ContainsContainer(AudioCodec, codec);
|
||||
return (Type == DlnaProfileType.Audio || Type == DlnaProfileType.Video) && ContainerProfile.ContainsContainer(AudioCodec, codec);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue