aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Controller')
-rw-r--r--MediaBrowser.Controller/Dlna/DirectPlayProfile.cs25
-rw-r--r--MediaBrowser.Controller/Dlna/DlnaProfile.cs54
-rw-r--r--MediaBrowser.Controller/Dlna/IDlnaManager.cs28
-rw-r--r--MediaBrowser.Controller/Dlna/TranscodingProfile.cs16
-rw-r--r--MediaBrowser.Controller/Entities/BaseItem.cs5
-rw-r--r--MediaBrowser.Controller/MediaBrowser.Controller.csproj4
6 files changed, 132 insertions, 0 deletions
diff --git a/MediaBrowser.Controller/Dlna/DirectPlayProfile.cs b/MediaBrowser.Controller/Dlna/DirectPlayProfile.cs
new file mode 100644
index 000000000..f1922dd32
--- /dev/null
+++ b/MediaBrowser.Controller/Dlna/DirectPlayProfile.cs
@@ -0,0 +1,25 @@
+
+namespace MediaBrowser.Controller.Dlna
+{
+ public class DirectPlayProfile
+ {
+ public string[] Containers { get; set; }
+ public string[] AudioCodecs { get; set; }
+ public string[] VideoCodecs { get; set; }
+ public string MimeType { get; set; }
+ public DlnaProfileType Type { get; set; }
+
+ public DirectPlayProfile()
+ {
+ Containers = new string[] { };
+ AudioCodecs = new string[] { };
+ VideoCodecs = new string[] { };
+ }
+ }
+
+ public enum DlnaProfileType
+ {
+ Audio = 0,
+ Video = 1
+ }
+}
diff --git a/MediaBrowser.Controller/Dlna/DlnaProfile.cs b/MediaBrowser.Controller/Dlna/DlnaProfile.cs
new file mode 100644
index 000000000..33f95b794
--- /dev/null
+++ b/MediaBrowser.Controller/Dlna/DlnaProfile.cs
@@ -0,0 +1,54 @@
+
+namespace MediaBrowser.Controller.Dlna
+{
+ public class DlnaProfile
+ {
+ /// <summary>
+ /// Gets or sets the name.
+ /// </summary>
+ /// <value>The name.</value>
+ public string Name { get; set; }
+
+ /// <summary>
+ /// Gets or sets the type of the client.
+ /// </summary>
+ /// <value>The type of the client.</value>
+ public string ClientType { get; set; }
+
+ /// <summary>
+ /// Gets or sets the name of the friendly.
+ /// </summary>
+ /// <value>The name of the friendly.</value>
+ public string FriendlyName { get; set; }
+
+ /// <summary>
+ /// Gets or sets the model number.
+ /// </summary>
+ /// <value>The model number.</value>
+ public string ModelNumber { get; set; }
+
+ /// <summary>
+ /// Gets or sets the name of the model.
+ /// </summary>
+ /// <value>The name of the model.</value>
+ public string ModelName { get; set; }
+
+ /// <summary>
+ /// Gets or sets the transcoding profiles.
+ /// </summary>
+ /// <value>The transcoding profiles.</value>
+ public TranscodingProfile[] TranscodingProfiles { get; set; }
+
+ /// <summary>
+ /// Gets or sets the direct play profiles.
+ /// </summary>
+ /// <value>The direct play profiles.</value>
+ public DirectPlayProfile[] DirectPlayProfiles { get; set; }
+
+ public DlnaProfile()
+ {
+ DirectPlayProfiles = new DirectPlayProfile[] { };
+ TranscodingProfiles = new TranscodingProfile[] { };
+ }
+ }
+}
diff --git a/MediaBrowser.Controller/Dlna/IDlnaManager.cs b/MediaBrowser.Controller/Dlna/IDlnaManager.cs
new file mode 100644
index 000000000..017dbc874
--- /dev/null
+++ b/MediaBrowser.Controller/Dlna/IDlnaManager.cs
@@ -0,0 +1,28 @@
+using System.Collections.Generic;
+
+namespace MediaBrowser.Controller.Dlna
+{
+ public interface IDlnaManager
+ {
+ /// <summary>
+ /// Gets the dlna profiles.
+ /// </summary>
+ /// <returns>IEnumerable{DlnaProfile}.</returns>
+ IEnumerable<DlnaProfile> GetProfiles();
+
+ /// <summary>
+ /// Gets the default profile.
+ /// </summary>
+ /// <returns>DlnaProfile.</returns>
+ DlnaProfile GetDefaultProfile();
+
+ /// <summary>
+ /// Gets the profile.
+ /// </summary>
+ /// <param name="friendlyName">Name of the friendly.</param>
+ /// <param name="modelName">Name of the model.</param>
+ /// <param name="modelNumber">The model number.</param>
+ /// <returns>DlnaProfile.</returns>
+ DlnaProfile GetProfile(string friendlyName, string modelName, string modelNumber);
+ }
+}
diff --git a/MediaBrowser.Controller/Dlna/TranscodingProfile.cs b/MediaBrowser.Controller/Dlna/TranscodingProfile.cs
new file mode 100644
index 000000000..abc8868fb
--- /dev/null
+++ b/MediaBrowser.Controller/Dlna/TranscodingProfile.cs
@@ -0,0 +1,16 @@
+
+namespace MediaBrowser.Controller.Dlna
+{
+ public class TranscodingProfile
+ {
+ public string Container { get; set; }
+
+ public DlnaProfileType Type { get; set; }
+
+ public string MimeType { get; set; }
+
+ public string VideoCodec { get; set; }
+
+ public string AudioCodec { get; set; }
+ }
+}
diff --git a/MediaBrowser.Controller/Entities/BaseItem.cs b/MediaBrowser.Controller/Entities/BaseItem.cs
index 23f8ac31a..e0c792307 100644
--- a/MediaBrowser.Controller/Entities/BaseItem.cs
+++ b/MediaBrowser.Controller/Entities/BaseItem.cs
@@ -1332,6 +1332,11 @@ namespace MediaBrowser.Controller.Entities
return ImageInfos.Where(i => i.Type == imageType);
}
+ public bool AddImages(ImageType imageType, IEnumerable<FileInfo> images)
+ {
+ return AddImages(imageType, images.Cast<FileSystemInfo>());
+ }
+
/// <summary>
/// Adds the images.
/// </summary>
diff --git a/MediaBrowser.Controller/MediaBrowser.Controller.csproj b/MediaBrowser.Controller/MediaBrowser.Controller.csproj
index 16c54861e..21a501b08 100644
--- a/MediaBrowser.Controller/MediaBrowser.Controller.csproj
+++ b/MediaBrowser.Controller/MediaBrowser.Controller.csproj
@@ -73,6 +73,10 @@
<Compile Include="Channels\IChannelManager.cs" />
<Compile Include="Collections\CollectionCreationOptions.cs" />
<Compile Include="Collections\ICollectionManager.cs" />
+ <Compile Include="Dlna\DirectPlayProfile.cs" />
+ <Compile Include="Dlna\IDlnaManager.cs" />
+ <Compile Include="Dlna\DlnaProfile.cs" />
+ <Compile Include="Dlna\TranscodingProfile.cs" />
<Compile Include="Drawing\IImageProcessor.cs" />
<Compile Include="Drawing\ImageFormat.cs" />
<Compile Include="Drawing\ImageProcessingOptions.cs" />