aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Channels
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2014-06-02 15:32:41 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2014-06-02 15:32:41 -0400
commit858c37b8607ff0698a94b9e7bfff6190d3bca56d (patch)
treeec673c5ebe7ffe813b6a16340471ac472a5dbf5b /MediaBrowser.Controller/Channels
parent36648d27082c1ee50c1483e17f14ba1ae838a00e (diff)
add channel downloading settings
Diffstat (limited to 'MediaBrowser.Controller/Channels')
-rw-r--r--MediaBrowser.Controller/Channels/ChannelAudioItem.cs5
-rw-r--r--MediaBrowser.Controller/Channels/ChannelFolderItem.cs5
-rw-r--r--MediaBrowser.Controller/Channels/ChannelMediaInfo.cs5
-rw-r--r--MediaBrowser.Controller/Channels/ChannelVideoItem.cs2
-rw-r--r--MediaBrowser.Controller/Channels/IChannel.cs8
-rw-r--r--MediaBrowser.Controller/Channels/IChannelManager.cs22
-rw-r--r--MediaBrowser.Controller/Channels/IChannelMediaItem.cs3
-rw-r--r--MediaBrowser.Controller/Channels/InternalChannelFeatures.cs6
-rw-r--r--MediaBrowser.Controller/Channels/InternalChannelItemQuery.cs5
9 files changed, 57 insertions, 4 deletions
diff --git a/MediaBrowser.Controller/Channels/ChannelAudioItem.cs b/MediaBrowser.Controller/Channels/ChannelAudioItem.cs
index 7072d42848..8afaa73aca 100644
--- a/MediaBrowser.Controller/Channels/ChannelAudioItem.cs
+++ b/MediaBrowser.Controller/Channels/ChannelAudioItem.cs
@@ -28,6 +28,11 @@ namespace MediaBrowser.Controller.Channels
return config.BlockUnratedItems.Contains(UnratedItem.ChannelContent);
}
+ public override string GetUserDataKey()
+ {
+ return ExternalId;
+ }
+
public override bool SupportsLocalMetadata
{
get
diff --git a/MediaBrowser.Controller/Channels/ChannelFolderItem.cs b/MediaBrowser.Controller/Channels/ChannelFolderItem.cs
index 5be30d7c3b..afc6493e4a 100644
--- a/MediaBrowser.Controller/Channels/ChannelFolderItem.cs
+++ b/MediaBrowser.Controller/Channels/ChannelFolderItem.cs
@@ -35,5 +35,10 @@ namespace MediaBrowser.Controller.Channels
{
Tags = new List<string>();
}
+
+ public override string GetUserDataKey()
+ {
+ return ExternalId;
+ }
}
}
diff --git a/MediaBrowser.Controller/Channels/ChannelMediaInfo.cs b/MediaBrowser.Controller/Channels/ChannelMediaInfo.cs
index b38ef363a8..2e2f1912a1 100644
--- a/MediaBrowser.Controller/Channels/ChannelMediaInfo.cs
+++ b/MediaBrowser.Controller/Channels/ChannelMediaInfo.cs
@@ -1,4 +1,5 @@
-using System.Collections.Generic;
+using System;
+using System.Collections.Generic;
namespace MediaBrowser.Controller.Channels
{
@@ -27,7 +28,7 @@ namespace MediaBrowser.Controller.Channels
public ChannelMediaInfo()
{
- RequiredHttpHeaders = new Dictionary<string, string>();
+ RequiredHttpHeaders = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
IsRemote = true;
}
}
diff --git a/MediaBrowser.Controller/Channels/ChannelVideoItem.cs b/MediaBrowser.Controller/Channels/ChannelVideoItem.cs
index 572e316a0f..2f207c4201 100644
--- a/MediaBrowser.Controller/Channels/ChannelVideoItem.cs
+++ b/MediaBrowser.Controller/Channels/ChannelVideoItem.cs
@@ -44,7 +44,7 @@ namespace MediaBrowser.Controller.Channels
}
}
- return base.GetUserDataKey();
+ return ExternalId;
}
protected override bool GetBlockUnratedValue(UserConfiguration config)
diff --git a/MediaBrowser.Controller/Channels/IChannel.cs b/MediaBrowser.Controller/Channels/IChannel.cs
index 27334e4b94..1d7c298fab 100644
--- a/MediaBrowser.Controller/Channels/IChannel.cs
+++ b/MediaBrowser.Controller/Channels/IChannel.cs
@@ -50,6 +50,14 @@ namespace MediaBrowser.Controller.Channels
Task<IEnumerable<ChannelItemInfo>> Search(ChannelSearchInfo searchInfo, User user, CancellationToken cancellationToken);
/// <summary>
+ /// Gets all media.
+ /// </summary>
+ /// <param name="query">The query.</param>
+ /// <param name="cancellationToken">The cancellation token.</param>
+ /// <returns>Task{ChannelItemResult}.</returns>
+ Task<ChannelItemResult> GetAllMedia(InternalAllChannelMediaQuery query, CancellationToken cancellationToken);
+
+ /// <summary>
/// Gets the channel items.
/// </summary>
/// <param name="query">The query.</param>
diff --git a/MediaBrowser.Controller/Channels/IChannelManager.cs b/MediaBrowser.Controller/Channels/IChannelManager.cs
index 4c2d665e54..4be38870b8 100644
--- a/MediaBrowser.Controller/Channels/IChannelManager.cs
+++ b/MediaBrowser.Controller/Channels/IChannelManager.cs
@@ -17,6 +17,12 @@ namespace MediaBrowser.Controller.Channels
void AddParts(IEnumerable<IChannel> channels, IEnumerable<IChannelFactory> factories);
/// <summary>
+ /// Gets the channel download path.
+ /// </summary>
+ /// <value>The channel download path.</value>
+ string ChannelDownloadPath { get; }
+
+ /// <summary>
/// Gets the channel features.
/// </summary>
/// <param name="id">The identifier.</param>
@@ -24,6 +30,12 @@ namespace MediaBrowser.Controller.Channels
ChannelFeatures GetChannelFeatures(string id);
/// <summary>
+ /// Gets all channel features.
+ /// </summary>
+ /// <returns>IEnumerable{ChannelFeatures}.</returns>
+ IEnumerable<ChannelFeatures> GetAllChannelFeatures();
+
+ /// <summary>
/// Gets the channel.
/// </summary>
/// <param name="id">The identifier.</param>
@@ -39,6 +51,14 @@ namespace MediaBrowser.Controller.Channels
Task<QueryResult<BaseItemDto>> GetChannels(ChannelQuery query, CancellationToken cancellationToken);
/// <summary>
+ /// Gets all media.
+ /// </summary>
+ /// <param name="query">The query.</param>
+ /// <param name="cancellationToken">The cancellation token.</param>
+ /// <returns>Task{QueryResult{BaseItemDto}}.</returns>
+ Task<QueryResult<BaseItemDto>> GetAllMedia(AllChannelMediaQuery query, CancellationToken cancellationToken);
+
+ /// <summary>
/// Gets the channel items.
/// </summary>
/// <param name="query">The query.</param>
@@ -52,6 +72,6 @@ namespace MediaBrowser.Controller.Channels
/// <param name="id">The identifier.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task{IEnumerable{ChannelMediaInfo}}.</returns>
- Task<IEnumerable<ChannelMediaInfo>> GetChannelItemMediaSources(string id, CancellationToken cancellationToken);
+ Task<IEnumerable<MediaSourceInfo>> GetChannelItemMediaSources(string id, CancellationToken cancellationToken);
}
}
diff --git a/MediaBrowser.Controller/Channels/IChannelMediaItem.cs b/MediaBrowser.Controller/Channels/IChannelMediaItem.cs
index 357856a254..db8e2b2927 100644
--- a/MediaBrowser.Controller/Channels/IChannelMediaItem.cs
+++ b/MediaBrowser.Controller/Channels/IChannelMediaItem.cs
@@ -7,6 +7,9 @@ namespace MediaBrowser.Controller.Channels
{
bool IsInfiniteStream { get; set; }
+ long? RunTimeTicks { get; set; }
+ string MediaType { get; }
+
ChannelMediaContentType ContentType { get; set; }
List<ChannelMediaInfo> ChannelMediaSources { get; set; }
diff --git a/MediaBrowser.Controller/Channels/InternalChannelFeatures.cs b/MediaBrowser.Controller/Channels/InternalChannelFeatures.cs
index 57a1a5129a..44da646d04 100644
--- a/MediaBrowser.Controller/Channels/InternalChannelFeatures.cs
+++ b/MediaBrowser.Controller/Channels/InternalChannelFeatures.cs
@@ -12,6 +12,12 @@ namespace MediaBrowser.Controller.Channels
public bool CanSearch { get; set; }
/// <summary>
+ /// Gets or sets a value indicating whether this instance can get all media.
+ /// </summary>
+ /// <value><c>true</c> if this instance can get all media; otherwise, <c>false</c>.</value>
+ public bool CanGetAllMedia { get; set; }
+
+ /// <summary>
/// Gets or sets the media types.
/// </summary>
/// <value>The media types.</value>
diff --git a/MediaBrowser.Controller/Channels/InternalChannelItemQuery.cs b/MediaBrowser.Controller/Channels/InternalChannelItemQuery.cs
index 1b05e60b61..dceced14c4 100644
--- a/MediaBrowser.Controller/Channels/InternalChannelItemQuery.cs
+++ b/MediaBrowser.Controller/Channels/InternalChannelItemQuery.cs
@@ -17,4 +17,9 @@ namespace MediaBrowser.Controller.Channels
public bool SortDescending { get; set; }
}
+
+ public class InternalAllChannelMediaQuery
+ {
+ public User User { get; set; }
+ }
} \ No newline at end of file