aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller
diff options
context:
space:
mode:
authorTim Hobbs <jesus.tesh@gmail.com>2014-03-17 20:07:58 -0700
committerTim Hobbs <jesus.tesh@gmail.com>2014-03-17 20:07:58 -0700
commitbea21173b5ba001d39fbbfb1f0a572d2dce887ab (patch)
treee00d218e8aa240eb1e33e24f331dcf1815036781 /MediaBrowser.Controller
parentcf43180a2dcab023ba6a48f37920615d7e87c599 (diff)
parent53749f077bedc84323ac13694c7f0963a65d1f06 (diff)
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'MediaBrowser.Controller')
-rw-r--r--MediaBrowser.Controller/Channels/Channel.cs9
-rw-r--r--MediaBrowser.Controller/Channels/ChannelAudioItem.cs17
-rw-r--r--MediaBrowser.Controller/Channels/ChannelItemInfo.cs9
-rw-r--r--MediaBrowser.Controller/Channels/ChannelVideoItem.cs17
-rw-r--r--MediaBrowser.Controller/Channels/IChannel.cs16
-rw-r--r--MediaBrowser.Controller/Channels/IChannelItem.cs17
-rw-r--r--MediaBrowser.Controller/Channels/IChannelManager.cs28
-rw-r--r--MediaBrowser.Controller/Dlna/DeviceIdentification.cs15
-rw-r--r--MediaBrowser.Controller/Dlna/DeviceProfile.cs22
-rw-r--r--MediaBrowser.Controller/Dlna/DirectPlayProfile.cs1
-rw-r--r--MediaBrowser.Controller/Dlna/TranscodingProfile.cs23
-rw-r--r--MediaBrowser.Controller/LiveTv/LiveTvChannel.cs2
-rw-r--r--MediaBrowser.Controller/MediaBrowser.Controller.csproj4
13 files changed, 171 insertions, 9 deletions
diff --git a/MediaBrowser.Controller/Channels/Channel.cs b/MediaBrowser.Controller/Channels/Channel.cs
new file mode 100644
index 000000000..c9a70f2bc
--- /dev/null
+++ b/MediaBrowser.Controller/Channels/Channel.cs
@@ -0,0 +1,9 @@
+using MediaBrowser.Controller.Entities;
+
+namespace MediaBrowser.Controller.Channels
+{
+ public class Channel : BaseItem
+ {
+ public string OriginalChannelName { get; set; }
+ }
+}
diff --git a/MediaBrowser.Controller/Channels/ChannelAudioItem.cs b/MediaBrowser.Controller/Channels/ChannelAudioItem.cs
new file mode 100644
index 000000000..269a95456
--- /dev/null
+++ b/MediaBrowser.Controller/Channels/ChannelAudioItem.cs
@@ -0,0 +1,17 @@
+using MediaBrowser.Controller.Entities.Audio;
+
+namespace MediaBrowser.Controller.Channels
+{
+ public class ChannelAudioItem : Audio, IChannelItem
+ {
+ public string ExternalId { get; set; }
+
+ public ChannelItemType ChannelItemType { get; set; }
+
+ public bool IsInfiniteStream { get; set; }
+
+ public ChannelMediaContentType ContentType { get; set; }
+
+ public string OriginalImageUrl { get; set; }
+ }
+}
diff --git a/MediaBrowser.Controller/Channels/ChannelItemInfo.cs b/MediaBrowser.Controller/Channels/ChannelItemInfo.cs
index 496fbfbf4..f80ad8911 100644
--- a/MediaBrowser.Controller/Channels/ChannelItemInfo.cs
+++ b/MediaBrowser.Controller/Channels/ChannelItemInfo.cs
@@ -1,9 +1,11 @@
using MediaBrowser.Controller.Entities;
+using MediaBrowser.Model.Entities;
+using System;
using System.Collections.Generic;
namespace MediaBrowser.Controller.Channels
{
- public class ChannelItemInfo
+ public class ChannelItemInfo : IHasProviderIds
{
public string Name { get; set; }
@@ -23,18 +25,21 @@ namespace MediaBrowser.Controller.Channels
public long? RunTimeTicks { get; set; }
- public bool IsInfinite { get; set; }
+ public bool IsInfiniteStream { get; set; }
public string ImageUrl { get; set; }
public ChannelMediaType MediaType { get; set; }
public ChannelMediaContentType ContentType { get; set; }
+
+ public Dictionary<string, string> ProviderIds { get; set; }
public ChannelItemInfo()
{
Genres = new List<string>();
People = new List<PersonInfo>();
+ ProviderIds = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
}
}
diff --git a/MediaBrowser.Controller/Channels/ChannelVideoItem.cs b/MediaBrowser.Controller/Channels/ChannelVideoItem.cs
new file mode 100644
index 000000000..baa4c2a17
--- /dev/null
+++ b/MediaBrowser.Controller/Channels/ChannelVideoItem.cs
@@ -0,0 +1,17 @@
+using MediaBrowser.Controller.Entities;
+
+namespace MediaBrowser.Controller.Channels
+{
+ public class ChannelVideoItem : Video, IChannelItem
+ {
+ public string ExternalId { get; set; }
+
+ public ChannelItemType ChannelItemType { get; set; }
+
+ public bool IsInfiniteStream { get; set; }
+
+ public ChannelMediaContentType ContentType { get; set; }
+
+ public string OriginalImageUrl { get; set; }
+ }
+}
diff --git a/MediaBrowser.Controller/Channels/IChannel.cs b/MediaBrowser.Controller/Channels/IChannel.cs
index ba1bd4083..956eb67e8 100644
--- a/MediaBrowser.Controller/Channels/IChannel.cs
+++ b/MediaBrowser.Controller/Channels/IChannel.cs
@@ -26,13 +26,20 @@ namespace MediaBrowser.Controller.Channels
ChannelCapabilities GetCapabilities();
/// <summary>
+ /// Determines whether [is enabled for] [the specified user].
+ /// </summary>
+ /// <param name="user">The user.</param>
+ /// <returns><c>true</c> if [is enabled for] [the specified user]; otherwise, <c>false</c>.</returns>
+ bool IsEnabledFor(User user);
+
+ /// <summary>
/// Searches the specified search term.
/// </summary>
- /// <param name="searchTerm">The search term.</param>
+ /// <param name="searchInfo">The search information.</param>
/// <param name="user">The user.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task{IEnumerable{ChannelItemInfo}}.</returns>
- Task<IEnumerable<ChannelItemInfo>> Search(string searchTerm, User user, CancellationToken cancellationToken);
+ Task<IEnumerable<ChannelItemInfo>> Search(ChannelSearchInfo searchInfo, User user, CancellationToken cancellationToken);
/// <summary>
/// Gets the channel items.
@@ -56,4 +63,9 @@ namespace MediaBrowser.Controller.Channels
{
public bool CanSearch { get; set; }
}
+
+ public class ChannelSearchInfo
+ {
+ public string SearchTerm { get; set; }
+ }
}
diff --git a/MediaBrowser.Controller/Channels/IChannelItem.cs b/MediaBrowser.Controller/Channels/IChannelItem.cs
new file mode 100644
index 000000000..ffef532a9
--- /dev/null
+++ b/MediaBrowser.Controller/Channels/IChannelItem.cs
@@ -0,0 +1,17 @@
+using MediaBrowser.Controller.Entities;
+
+namespace MediaBrowser.Controller.Channels
+{
+ public interface IChannelItem : IHasImages
+ {
+ string ExternalId { get; set; }
+
+ ChannelItemType ChannelItemType { get; set; }
+
+ bool IsInfiniteStream { get; set; }
+
+ ChannelMediaContentType ContentType { get; set; }
+
+ string OriginalImageUrl { get; set; }
+ }
+}
diff --git a/MediaBrowser.Controller/Channels/IChannelManager.cs b/MediaBrowser.Controller/Channels/IChannelManager.cs
index 561ab555b..b34e77415 100644
--- a/MediaBrowser.Controller/Channels/IChannelManager.cs
+++ b/MediaBrowser.Controller/Channels/IChannelManager.cs
@@ -1,12 +1,34 @@
-using System;
+using MediaBrowser.Model.Channels;
+using MediaBrowser.Model.Dto;
+using MediaBrowser.Model.Querying;
using System.Collections.Generic;
-using System.Linq;
-using System.Text;
+using System.Threading;
using System.Threading.Tasks;
namespace MediaBrowser.Controller.Channels
{
public interface IChannelManager
{
+ /// <summary>
+ /// Adds the parts.
+ /// </summary>
+ /// <param name="channels">The channels.</param>
+ void AddParts(IEnumerable<IChannel> channels);
+
+ /// <summary>
+ /// Gets the channels.
+ /// </summary>
+ /// <param name="query">The query.</param>
+ /// <param name="cancellationToken">The cancellation token.</param>
+ /// <returns>Task{QueryResult{BaseItemDto}}.</returns>
+ Task<QueryResult<BaseItemDto>> GetChannels(ChannelQuery query, CancellationToken cancellationToken);
+
+ /// <summary>
+ /// Gets the channel items.
+ /// </summary>
+ /// <param name="query">The query.</param>
+ /// <param name="cancellationToken">The cancellation token.</param>
+ /// <returns>Task{QueryResult{BaseItemDto}}.</returns>
+ Task<QueryResult<BaseItemDto>> GetChannelItems(ChannelItemQuery query, CancellationToken cancellationToken);
}
}
diff --git a/MediaBrowser.Controller/Dlna/DeviceIdentification.cs b/MediaBrowser.Controller/Dlna/DeviceIdentification.cs
index a3a615516..4ccba1106 100644
--- a/MediaBrowser.Controller/Dlna/DeviceIdentification.cs
+++ b/MediaBrowser.Controller/Dlna/DeviceIdentification.cs
@@ -25,6 +25,21 @@ namespace MediaBrowser.Controller.Dlna
/// <value>The name of the model.</value>
public string ModelName { get; set; }
/// <summary>
+ /// Gets or sets the model description.
+ /// </summary>
+ /// <value>The model description.</value>
+ public string ModelDescription { get; set; }
+ /// <summary>
+ /// Gets or sets the device description.
+ /// </summary>
+ /// <value>The device description.</value>
+ public string DeviceDescription { get; set; }
+ /// <summary>
+ /// Gets or sets the model URL.
+ /// </summary>
+ /// <value>The model URL.</value>
+ public string ModelUrl { get; set; }
+ /// <summary>
/// Gets or sets the manufacturer.
/// </summary>
/// <value>
diff --git a/MediaBrowser.Controller/Dlna/DeviceProfile.cs b/MediaBrowser.Controller/Dlna/DeviceProfile.cs
index 119cfffd7..ca5929d13 100644
--- a/MediaBrowser.Controller/Dlna/DeviceProfile.cs
+++ b/MediaBrowser.Controller/Dlna/DeviceProfile.cs
@@ -33,6 +33,28 @@ namespace MediaBrowser.Controller.Dlna
/// <value>The identification.</value>
public DeviceIdentification Identification { get; set; }
+ public string FriendlyName { get; set; }
+ public string Manufacturer { get; set; }
+ public string ManufacturerUrl { get; set; }
+ public string ModelName { get; set; }
+ public string ModelDescription { get; set; }
+ public string ModelNumber { get; set; }
+ public string ModelUrl { get; set; }
+ /// <summary>
+ /// Controls the content of the X_DLNADOC element in the urn:schemas-dlna-org:device-1-0 namespace.
+ /// </summary>
+ public string XDlnaDoc { get; set; }
+ /// <summary>
+ /// Controls the content of the X_DLNACAP element in the urn:schemas-dlna-org:device-1-0 namespace.
+ /// </summary>
+ public string XDlnaCap { get; set; }
+ /// <summary>
+ /// Controls the content of the aggregationFlags element in the urn:schemas-sonycom:av.
+ /// </summary>
+ public string SonyAggregationFlags { get; set; }
+
+ public string ProtocolInfo { get; set; }
+
public DeviceProfile()
{
DirectPlayProfiles = new DirectPlayProfile[] { };
diff --git a/MediaBrowser.Controller/Dlna/DirectPlayProfile.cs b/MediaBrowser.Controller/Dlna/DirectPlayProfile.cs
index 8c35b52a8..68e25e2f7 100644
--- a/MediaBrowser.Controller/Dlna/DirectPlayProfile.cs
+++ b/MediaBrowser.Controller/Dlna/DirectPlayProfile.cs
@@ -53,6 +53,7 @@ namespace MediaBrowser.Controller.Dlna
}
}
+ public string OrgPn { get; set; }
public string MimeType { get; set; }
public DlnaProfileType Type { get; set; }
diff --git a/MediaBrowser.Controller/Dlna/TranscodingProfile.cs b/MediaBrowser.Controller/Dlna/TranscodingProfile.cs
index abc8868fb..3b0a513d1 100644
--- a/MediaBrowser.Controller/Dlna/TranscodingProfile.cs
+++ b/MediaBrowser.Controller/Dlna/TranscodingProfile.cs
@@ -1,4 +1,5 @@
-
+using System.Collections.Generic;
+
namespace MediaBrowser.Controller.Dlna
{
public class TranscodingProfile
@@ -9,8 +10,28 @@ namespace MediaBrowser.Controller.Dlna
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; }
+
+ public TranscodingProfile()
+ {
+ Settings = new List<TranscodingSetting>();
+ }
+ }
+
+ public class TranscodingSetting
+ {
+ public TranscodingSettingType Name { get; set; }
+ public string Value { get; set; }
+ }
+
+ public enum TranscodingSettingType
+ {
+ Profile
}
}
diff --git a/MediaBrowser.Controller/LiveTv/LiveTvChannel.cs b/MediaBrowser.Controller/LiveTv/LiveTvChannel.cs
index 3e6832123..5b78b6789 100644
--- a/MediaBrowser.Controller/LiveTv/LiveTvChannel.cs
+++ b/MediaBrowser.Controller/LiveTv/LiveTvChannel.cs
@@ -107,7 +107,7 @@ namespace MediaBrowser.Controller.LiveTv
public override string GetClientTypeName()
{
- return "Channel";
+ return "TvChannel";
}
public IEnumerable<BaseItem> GetTaggedItems(IEnumerable<BaseItem> inputItems)
diff --git a/MediaBrowser.Controller/MediaBrowser.Controller.csproj b/MediaBrowser.Controller/MediaBrowser.Controller.csproj
index 2dc444ea9..87fdc66f9 100644
--- a/MediaBrowser.Controller/MediaBrowser.Controller.csproj
+++ b/MediaBrowser.Controller/MediaBrowser.Controller.csproj
@@ -71,6 +71,10 @@
<Compile Include="Channels\ChannelItemInfo.cs" />
<Compile Include="Channels\IChannel.cs" />
<Compile Include="Channels\IChannelManager.cs" />
+ <Compile Include="Channels\IChannelItem.cs" />
+ <Compile Include="Channels\ChannelAudioItem.cs" />
+ <Compile Include="Channels\ChannelVideoItem.cs" />
+ <Compile Include="Channels\Channel.cs" />
<Compile Include="Collections\CollectionCreationOptions.cs" />
<Compile Include="Collections\ICollectionManager.cs" />
<Compile Include="Dlna\DeviceIdentification.cs" />