mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-28 21:06:32 +01:00
added new device profiles
This commit is contained in:
@@ -29,5 +29,11 @@ namespace MediaBrowser.Model.Dlna
|
||||
/// The application's configured quality setting
|
||||
/// </summary>
|
||||
public int? MaxBitrate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the context.
|
||||
/// </summary>
|
||||
/// <value>The context.</value>
|
||||
public EncodingContext Context { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -89,6 +89,9 @@ namespace MediaBrowser.Model.Dlna
|
||||
public CodecProfile[] CodecProfiles { get; set; }
|
||||
public ResponseProfile[] ResponseProfiles { get; set; }
|
||||
|
||||
public SubtitleProfile[] SoftSubtitleProfiles { get; set; }
|
||||
public SubtitleProfile[] ExternalSubtitleProfiles { get; set; }
|
||||
|
||||
public DeviceProfile()
|
||||
{
|
||||
DirectPlayProfiles = new DirectPlayProfile[] { };
|
||||
@@ -97,6 +100,9 @@ namespace MediaBrowser.Model.Dlna
|
||||
CodecProfiles = new CodecProfile[] { };
|
||||
ContainerProfiles = new ContainerProfile[] { };
|
||||
|
||||
SoftSubtitleProfiles = new SubtitleProfile[] { };
|
||||
ExternalSubtitleProfiles = new SubtitleProfile[] { };
|
||||
|
||||
XmlRootAttributes = new XmlAttribute[] { };
|
||||
|
||||
SupportedMediaTypes = "Audio,Photo,Video";
|
||||
|
||||
@@ -171,7 +171,7 @@ namespace MediaBrowser.Model.Dlna
|
||||
TranscodingProfile transcodingProfile = null;
|
||||
foreach (TranscodingProfile i in options.Profile.TranscodingProfiles)
|
||||
{
|
||||
if (i.Type == playlistItem.MediaType)
|
||||
if (i.Type == playlistItem.MediaType && i.Context == options.Context)
|
||||
{
|
||||
transcodingProfile = i;
|
||||
break;
|
||||
@@ -262,7 +262,7 @@ namespace MediaBrowser.Model.Dlna
|
||||
TranscodingProfile transcodingProfile = null;
|
||||
foreach (TranscodingProfile i in options.Profile.TranscodingProfiles)
|
||||
{
|
||||
if (i.Type == playlistItem.MediaType)
|
||||
if (i.Type == playlistItem.MediaType && i.Context == options.Context)
|
||||
{
|
||||
transcodingProfile = i;
|
||||
break;
|
||||
|
||||
8
MediaBrowser.Model/Dlna/SubtitleProfile.cs
Normal file
8
MediaBrowser.Model/Dlna/SubtitleProfile.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
|
||||
namespace MediaBrowser.Model.Dlna
|
||||
{
|
||||
public class SubtitleProfile
|
||||
{
|
||||
public string Format { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -32,6 +32,9 @@ namespace MediaBrowser.Model.Dlna
|
||||
[XmlAttribute("videoProfile")]
|
||||
public string VideoProfile { get; set; }
|
||||
|
||||
[XmlAttribute("context")]
|
||||
public EncodingContext Context { get; set; }
|
||||
|
||||
public List<string> GetAudioCodecs()
|
||||
{
|
||||
List<string> list = new List<string>();
|
||||
@@ -42,4 +45,10 @@ namespace MediaBrowser.Model.Dlna
|
||||
return list;
|
||||
}
|
||||
}
|
||||
|
||||
public enum EncodingContext
|
||||
{
|
||||
Streaming = 0,
|
||||
Static = 1
|
||||
}
|
||||
}
|
||||
|
||||
@@ -89,6 +89,7 @@
|
||||
<Compile Include="Configuration\MetadataOptions.cs" />
|
||||
<Compile Include="Configuration\MetadataPluginSummary.cs" />
|
||||
<Compile Include="Configuration\MetadataPluginType.cs" />
|
||||
<Compile Include="Dlna\SubtitleProfile.cs" />
|
||||
<Compile Include="Notifications\NotificationOption.cs" />
|
||||
<Compile Include="Notifications\NotificationOptions.cs" />
|
||||
<Compile Include="Notifications\NotificationType.cs" />
|
||||
|
||||
@@ -7,5 +7,6 @@
|
||||
public const string ASS = "ass";
|
||||
public const string VTT = "vtt";
|
||||
public const string SUB = "sub";
|
||||
public const string SMI = "smi";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user