aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Controller')
-rw-r--r--MediaBrowser.Controller/Dlna/CodecProfile.cs56
-rw-r--r--MediaBrowser.Controller/Dlna/DeviceIdentification.cs7
-rw-r--r--MediaBrowser.Controller/Dlna/DeviceProfile.cs7
-rw-r--r--MediaBrowser.Controller/Dlna/DirectPlayProfile.cs90
-rw-r--r--MediaBrowser.Controller/Dlna/MediaProfile.cs26
-rw-r--r--MediaBrowser.Controller/Dlna/TranscodingProfile.cs5
-rw-r--r--MediaBrowser.Controller/Dto/IDtoService.cs7
-rw-r--r--MediaBrowser.Controller/Entities/Video.cs4
-rw-r--r--MediaBrowser.Controller/Library/PlaybackProgressEventArgs.cs1
-rw-r--r--MediaBrowser.Controller/MediaBrowser.Controller.csproj2
-rw-r--r--MediaBrowser.Controller/Session/PlaybackInfo.cs6
-rw-r--r--MediaBrowser.Controller/Session/PlaybackProgressInfo.cs6
-rw-r--r--MediaBrowser.Controller/Session/PlaybackStopInfo.cs6
-rw-r--r--MediaBrowser.Controller/Session/SessionInfo.cs26
14 files changed, 160 insertions, 89 deletions
diff --git a/MediaBrowser.Controller/Dlna/CodecProfile.cs b/MediaBrowser.Controller/Dlna/CodecProfile.cs
new file mode 100644
index 000000000..bff374298
--- /dev/null
+++ b/MediaBrowser.Controller/Dlna/CodecProfile.cs
@@ -0,0 +1,56 @@
+using System.Collections.Generic;
+using System.Linq;
+
+namespace MediaBrowser.Controller.Dlna
+{
+ public class CodecProfile
+ {
+ public CodecType Type { get; set; }
+ public List<ProfileCondition> Conditions { get; set; }
+ public string Codec { get; set; }
+
+ public CodecProfile()
+ {
+ Conditions = new List<ProfileCondition>();
+ }
+
+ public List<string> GetCodecs()
+ {
+ return (Codec ?? string.Empty).Split(',').Where(i => !string.IsNullOrWhiteSpace(i)).ToList();
+ }
+ }
+
+ public enum CodecType
+ {
+ VideoCodec = 0,
+ VideoAudioCodec = 1,
+ AudioCodec = 2
+ }
+
+ public class ProfileCondition
+ {
+ public ProfileConditionType Condition { get; set; }
+ public ProfileConditionValue Property { get; set; }
+ public string Value { get; set; }
+ }
+
+ public enum ProfileConditionType
+ {
+ Equals = 0,
+ NotEquals = 1,
+ LessThanEqual = 2,
+ GreaterThanEqual = 3
+ }
+
+ public enum ProfileConditionValue
+ {
+ AudioChannels,
+ AudioBitrate,
+ Filesize,
+ Width,
+ Height,
+ VideoBitrate,
+ VideoFramerate,
+ VideoLevel
+ }
+}
diff --git a/MediaBrowser.Controller/Dlna/DeviceIdentification.cs b/MediaBrowser.Controller/Dlna/DeviceIdentification.cs
index 4ccba1106..20c94ad50 100644
--- a/MediaBrowser.Controller/Dlna/DeviceIdentification.cs
+++ b/MediaBrowser.Controller/Dlna/DeviceIdentification.cs
@@ -67,5 +67,12 @@ namespace MediaBrowser.Controller.Dlna
{
public string Name { get; set; }
public string Value { get; set; }
+ public HeaderMatchType Match { get; set; }
+ }
+
+ public enum HeaderMatchType
+ {
+ Equals = 0,
+ Substring = 1
}
}
diff --git a/MediaBrowser.Controller/Dlna/DeviceProfile.cs b/MediaBrowser.Controller/Dlna/DeviceProfile.cs
index ca5929d13..91be73bba 100644
--- a/MediaBrowser.Controller/Dlna/DeviceProfile.cs
+++ b/MediaBrowser.Controller/Dlna/DeviceProfile.cs
@@ -55,10 +55,17 @@ namespace MediaBrowser.Controller.Dlna
public string ProtocolInfo { get; set; }
+ public MediaProfile[] MediaProfiles { get; set; }
+ public CodecProfile[] CodecProfiles { get; set; }
+
+ public int TimelineOffsetSeconds { get; set; }
+
public DeviceProfile()
{
DirectPlayProfiles = new DirectPlayProfile[] { };
TranscodingProfiles = new TranscodingProfile[] { };
+ MediaProfiles = new MediaProfile[] { };
+ CodecProfiles = new CodecProfile[] { };
}
}
}
diff --git a/MediaBrowser.Controller/Dlna/DirectPlayProfile.cs b/MediaBrowser.Controller/Dlna/DirectPlayProfile.cs
index 68e25e2f7..53d32a2f8 100644
--- a/MediaBrowser.Controller/Dlna/DirectPlayProfile.cs
+++ b/MediaBrowser.Controller/Dlna/DirectPlayProfile.cs
@@ -1,60 +1,14 @@
-using System;
-using System.Collections.Generic;
-using System.Runtime.Serialization;
-using System.Xml.Serialization;
+using System.Collections.Generic;
+using System.Linq;
namespace MediaBrowser.Controller.Dlna
{
public class DirectPlayProfile
{
- public string Container { get; set; }
+ public string[] Containers { get; set; }
public string AudioCodec { get; set; }
public string VideoCodec { get; set; }
- [IgnoreDataMember]
- [XmlIgnore]
- public string[] Containers
- {
- get
- {
- return (Container ?? string.Empty).Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
- }
- set
- {
- Container = value == null ? null : string.Join(",", value);
- }
- }
-
- [IgnoreDataMember]
- [XmlIgnore]
- public string[] AudioCodecs
- {
- get
- {
- return (AudioCodec ?? string.Empty).Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
- }
- set
- {
- AudioCodec = value == null ? null : string.Join(",", value);
- }
- }
-
- [IgnoreDataMember]
- [XmlIgnore]
- public string[] VideoCodecs
- {
- get
- {
- return (VideoCodec ?? string.Empty).Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
- }
- set
- {
- VideoCodec = value == null ? null : string.Join(",", value);
- }
- }
-
- public string OrgPn { get; set; }
- public string MimeType { get; set; }
public DlnaProfileType Type { get; set; }
public List<ProfileCondition> Conditions { get; set; }
@@ -62,37 +16,25 @@ namespace MediaBrowser.Controller.Dlna
public DirectPlayProfile()
{
Conditions = new List<ProfileCondition>();
+
+ Containers = new string[] { };
}
- }
- public class ProfileCondition
- {
- public ProfileConditionType Condition { get; set; }
- public ProfileConditionValue Value { get; set; }
+ public List<string> GetAudioCodecs()
+ {
+ return (AudioCodec ?? string.Empty).Split(',').Where(i => !string.IsNullOrWhiteSpace(i)).ToList();
+ }
+
+ public List<string> GetVideoCodecs()
+ {
+ return (VideoCodec ?? string.Empty).Split(',').Where(i => !string.IsNullOrWhiteSpace(i)).ToList();
+ }
}
public enum DlnaProfileType
{
Audio = 0,
- Video = 1
- }
-
- public enum ProfileConditionType
- {
- Equals = 0,
- NotEquals = 1,
- LessThanEqual = 2,
- GreaterThanEqual = 3
- }
-
- public enum ProfileConditionValue
- {
- AudioChannels,
- AudioBitrate,
- Filesize,
- VideoWidth,
- VideoHeight,
- VideoBitrate,
- VideoFramerate
+ Video = 1,
+ Photo = 2
}
}
diff --git a/MediaBrowser.Controller/Dlna/MediaProfile.cs b/MediaBrowser.Controller/Dlna/MediaProfile.cs
new file mode 100644
index 000000000..5fa41b18a
--- /dev/null
+++ b/MediaBrowser.Controller/Dlna/MediaProfile.cs
@@ -0,0 +1,26 @@
+using System.Collections.Generic;
+using System.Linq;
+
+namespace MediaBrowser.Controller.Dlna
+{
+ public class MediaProfile
+ {
+ public string Container { get; set; }
+ public string AudioCodec { get; set; }
+ public string VideoCodec { get; set; }
+
+ public DlnaProfileType Type { get; set; }
+ public string OrgPn { get; set; }
+ public string MimeType { get; set; }
+
+ public List<string> GetAudioCodecs()
+ {
+ return (AudioCodec ?? string.Empty).Split(',').Where(i => !string.IsNullOrWhiteSpace(i)).ToList();
+ }
+
+ public List<string> GetVideoCodecs()
+ {
+ return (VideoCodec ?? string.Empty).Split(',').Where(i => !string.IsNullOrWhiteSpace(i)).ToList();
+ }
+ }
+}
diff --git a/MediaBrowser.Controller/Dlna/TranscodingProfile.cs b/MediaBrowser.Controller/Dlna/TranscodingProfile.cs
index 3b0a513d1..530a44b8c 100644
--- a/MediaBrowser.Controller/Dlna/TranscodingProfile.cs
+++ b/MediaBrowser.Controller/Dlna/TranscodingProfile.cs
@@ -8,12 +8,7 @@ namespace MediaBrowser.Controller.Dlna
public DlnaProfileType Type { get; set; }
- public string MimeType { get; set; }
-
- public string OrgPn { get; set; }
-
public string VideoCodec { get; set; }
-
public string AudioCodec { get; set; }
public List<TranscodingSetting> Settings { get; set; }
diff --git a/MediaBrowser.Controller/Dto/IDtoService.cs b/MediaBrowser.Controller/Dto/IDtoService.cs
index 03039dc83..a02851a9f 100644
--- a/MediaBrowser.Controller/Dto/IDtoService.cs
+++ b/MediaBrowser.Controller/Dto/IDtoService.cs
@@ -29,13 +29,6 @@ namespace MediaBrowser.Controller.Dto
SessionInfoDto GetSessionInfoDto(SessionInfo session);
/// <summary>
- /// Gets the base item info.
- /// </summary>
- /// <param name="item">The item.</param>
- /// <returns>BaseItemInfo.</returns>
- BaseItemInfo GetBaseItemInfo(BaseItem item);
-
- /// <summary>
/// Gets the dto id.
/// </summary>
/// <param name="item">The item.</param>
diff --git a/MediaBrowser.Controller/Entities/Video.cs b/MediaBrowser.Controller/Entities/Video.cs
index 76e0e1fc5..a6f501689 100644
--- a/MediaBrowser.Controller/Entities/Video.cs
+++ b/MediaBrowser.Controller/Entities/Video.cs
@@ -37,11 +37,11 @@ namespace MediaBrowser.Controller.Entities
}
[IgnoreDataMember]
- public int AlternateVersionCount
+ public int MediaSourceCount
{
get
{
- return LinkedAlternateVersions.Count + LocalAlternateVersionIds.Count;
+ return LinkedAlternateVersions.Count + LocalAlternateVersionIds.Count + 1;
}
}
diff --git a/MediaBrowser.Controller/Library/PlaybackProgressEventArgs.cs b/MediaBrowser.Controller/Library/PlaybackProgressEventArgs.cs
index 2ec3d308e..61984c795 100644
--- a/MediaBrowser.Controller/Library/PlaybackProgressEventArgs.cs
+++ b/MediaBrowser.Controller/Library/PlaybackProgressEventArgs.cs
@@ -12,6 +12,7 @@ namespace MediaBrowser.Controller.Library
public List<User> Users { get; set; }
public long? PlaybackPositionTicks { get; set; }
public BaseItem Item { get; set; }
+ public string MediaSourceId { get; set; }
public PlaybackProgressEventArgs()
{
diff --git a/MediaBrowser.Controller/MediaBrowser.Controller.csproj b/MediaBrowser.Controller/MediaBrowser.Controller.csproj
index ac178ff53..b51824bdb 100644
--- a/MediaBrowser.Controller/MediaBrowser.Controller.csproj
+++ b/MediaBrowser.Controller/MediaBrowser.Controller.csproj
@@ -78,10 +78,12 @@
<Compile Include="Channels\Channel.cs" />
<Compile Include="Collections\CollectionCreationOptions.cs" />
<Compile Include="Collections\ICollectionManager.cs" />
+ <Compile Include="Dlna\CodecProfile.cs" />
<Compile Include="Dlna\DeviceIdentification.cs" />
<Compile Include="Dlna\DirectPlayProfile.cs" />
<Compile Include="Dlna\IDlnaManager.cs" />
<Compile Include="Dlna\DeviceProfile.cs" />
+ <Compile Include="Dlna\MediaProfile.cs" />
<Compile Include="Dlna\TranscodingProfile.cs" />
<Compile Include="Drawing\IImageProcessor.cs" />
<Compile Include="Drawing\ImageFormat.cs" />
diff --git a/MediaBrowser.Controller/Session/PlaybackInfo.cs b/MediaBrowser.Controller/Session/PlaybackInfo.cs
index ab3111e76..a97f9e0d0 100644
--- a/MediaBrowser.Controller/Session/PlaybackInfo.cs
+++ b/MediaBrowser.Controller/Session/PlaybackInfo.cs
@@ -34,5 +34,11 @@ namespace MediaBrowser.Controller.Session
/// </summary>
/// <value>The session id.</value>
public Guid SessionId { get; set; }
+
+ /// <summary>
+ /// Gets or sets the media version identifier.
+ /// </summary>
+ /// <value>The media version identifier.</value>
+ public string MediaSourceId { get; set; }
}
}
diff --git a/MediaBrowser.Controller/Session/PlaybackProgressInfo.cs b/MediaBrowser.Controller/Session/PlaybackProgressInfo.cs
index a07543260..3d402aa6f 100644
--- a/MediaBrowser.Controller/Session/PlaybackProgressInfo.cs
+++ b/MediaBrowser.Controller/Session/PlaybackProgressInfo.cs
@@ -34,5 +34,11 @@ namespace MediaBrowser.Controller.Session
/// </summary>
/// <value>The position ticks.</value>
public long? PositionTicks { get; set; }
+
+ /// <summary>
+ /// Gets or sets the media version identifier.
+ /// </summary>
+ /// <value>The media version identifier.</value>
+ public string MediaSourceId { get; set; }
}
}
diff --git a/MediaBrowser.Controller/Session/PlaybackStopInfo.cs b/MediaBrowser.Controller/Session/PlaybackStopInfo.cs
index 5d1ce0131..063abf78c 100644
--- a/MediaBrowser.Controller/Session/PlaybackStopInfo.cs
+++ b/MediaBrowser.Controller/Session/PlaybackStopInfo.cs
@@ -22,5 +22,11 @@ namespace MediaBrowser.Controller.Session
/// </summary>
/// <value>The position ticks.</value>
public long? PositionTicks { get; set; }
+
+ /// <summary>
+ /// Gets or sets the media version identifier.
+ /// </summary>
+ /// <value>The media version identifier.</value>
+ public string MediaSourceId { get; set; }
}
}
diff --git a/MediaBrowser.Controller/Session/SessionInfo.cs b/MediaBrowser.Controller/Session/SessionInfo.cs
index 73e33d78c..9dd57d12a 100644
--- a/MediaBrowser.Controller/Session/SessionInfo.cs
+++ b/MediaBrowser.Controller/Session/SessionInfo.cs
@@ -120,11 +120,23 @@ namespace MediaBrowser.Controller.Session
public BaseItem NowPlayingItem { get; set; }
/// <summary>
+ /// Gets or sets the now playing media version identifier.
+ /// </summary>
+ /// <value>The now playing media version identifier.</value>
+ public string NowPlayingMediaSourceId { get; set; }
+
+
+ /// <summary>
+ /// Gets or sets the now playing run time ticks.
+ /// </summary>
+ /// <value>The now playing run time ticks.</value>
+ public long? NowPlayingRunTimeTicks { get; set; }
+
+ /// <summary>
/// Gets or sets the now playing position ticks.
/// </summary>
/// <value>The now playing position ticks.</value>
public long? NowPlayingPositionTicks { get; set; }
-
/// <summary>
/// Gets or sets a value indicating whether this instance is paused.
/// </summary>
@@ -162,6 +174,18 @@ namespace MediaBrowser.Controller.Session
public bool SupportsFullscreenToggle { get; set; }
/// <summary>
+ /// Gets or sets a value indicating whether [supports osd toggle].
+ /// </summary>
+ /// <value><c>true</c> if [supports osd toggle]; otherwise, <c>false</c>.</value>
+ public bool SupportsOsdToggle { get; set; }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether [supports navigation commands].
+ /// </summary>
+ /// <value><c>true</c> if [supports navigation commands]; otherwise, <c>false</c>.</value>
+ public bool SupportsNavigationControl { get; set; }
+
+ /// <summary>
/// Gets a value indicating whether this instance is active.
/// </summary>
/// <value><c>true</c> if this instance is active; otherwise, <c>false</c>.</value>