aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2015-09-15 23:55:26 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2015-09-15 23:55:26 -0400
commita2c371ec60f8da649887f72d9ee38a8f3a85365a (patch)
tree52812007bf486540179fbd75734a68c64b66af3f /MediaBrowser.Server.Implementations
parenta0fa1b5f8f2a67c0a3f8cafce20540cb5349f89d (diff)
rework collection editor
Diffstat (limited to 'MediaBrowser.Server.Implementations')
-rw-r--r--MediaBrowser.Server.Implementations/Channels/ChannelManager.cs21
-rw-r--r--MediaBrowser.Server.Implementations/HttpServer/Security/AuthorizationContext.cs41
-rw-r--r--MediaBrowser.Server.Implementations/Sync/SyncManager.cs2
3 files changed, 3 insertions, 61 deletions
diff --git a/MediaBrowser.Server.Implementations/Channels/ChannelManager.cs b/MediaBrowser.Server.Implementations/Channels/ChannelManager.cs
index 9edfc0c35..d7209fbdf 100644
--- a/MediaBrowser.Server.Implementations/Channels/ChannelManager.cs
+++ b/MediaBrowser.Server.Implementations/Channels/ChannelManager.cs
@@ -31,7 +31,6 @@ namespace MediaBrowser.Server.Implementations.Channels
public class ChannelManager : IChannelManager, IDisposable
{
private IChannel[] _channels;
- private IChannelFactory[] _factories;
private readonly IUserManager _userManager;
private readonly IUserDataManager _userDataManager;
@@ -76,10 +75,9 @@ namespace MediaBrowser.Server.Implementations.Channels
}
}
- public void AddParts(IEnumerable<IChannel> channels, IEnumerable<IChannelFactory> factories)
+ public void AddParts(IEnumerable<IChannel> channels)
{
- _channels = channels.Where(i => !(i is IFactoryChannel)).ToArray();
- _factories = factories.ToArray();
+ _channels = channels.ToArray();
}
public string ChannelDownloadPath
@@ -99,20 +97,7 @@ namespace MediaBrowser.Server.Implementations.Channels
private IEnumerable<IChannel> GetAllChannels()
{
- return _factories
- .SelectMany(i =>
- {
- try
- {
- return i.GetChannels().ToList();
- }
- catch (Exception ex)
- {
- _logger.ErrorException("Error getting channel list", ex);
- return new List<IChannel>();
- }
- })
- .Concat(_channels)
+ return _channels
.OrderBy(i => i.Name);
}
diff --git a/MediaBrowser.Server.Implementations/HttpServer/Security/AuthorizationContext.cs b/MediaBrowser.Server.Implementations/HttpServer/Security/AuthorizationContext.cs
index 80892b96c..ae5ce796e 100644
--- a/MediaBrowser.Server.Implementations/HttpServer/Security/AuthorizationContext.cs
+++ b/MediaBrowser.Server.Implementations/HttpServer/Security/AuthorizationContext.cs
@@ -69,47 +69,6 @@ namespace MediaBrowser.Server.Implementations.HttpServer.Security
token = httpReq.QueryString["api_key"];
}
- // Hack until iOS is updated
- // TODO: Remove
- if (string.IsNullOrWhiteSpace(client))
- {
- var userAgent = httpReq.Headers["User-Agent"] ?? string.Empty;
-
- if (userAgent.IndexOf("mediabrowserios", StringComparison.OrdinalIgnoreCase) != -1 ||
- userAgent.IndexOf("iphone", StringComparison.OrdinalIgnoreCase) != -1 ||
- userAgent.IndexOf("ipad", StringComparison.OrdinalIgnoreCase) != -1)
- {
- client = "iOS";
- }
-
- else if (userAgent.IndexOf("crKey", StringComparison.OrdinalIgnoreCase) != -1)
- {
- client = "Chromecast";
- }
- }
-
- // Hack until iOS is updated
- // TODO: Remove
- if (string.IsNullOrWhiteSpace(device))
- {
- var userAgent = httpReq.Headers["User-Agent"] ?? string.Empty;
-
- if (userAgent.IndexOf("iPhone", StringComparison.OrdinalIgnoreCase) != -1)
- {
- device = "iPhone";
- }
-
- else if (userAgent.IndexOf("iPad", StringComparison.OrdinalIgnoreCase) != -1)
- {
- device = "iPad";
- }
-
- else if (userAgent.IndexOf("crKey", StringComparison.OrdinalIgnoreCase) != -1)
- {
- device = "Chromecast";
- }
- }
-
var info = new AuthorizationInfo
{
Client = client,
diff --git a/MediaBrowser.Server.Implementations/Sync/SyncManager.cs b/MediaBrowser.Server.Implementations/Sync/SyncManager.cs
index 428ba5e20..15d196877 100644
--- a/MediaBrowser.Server.Implementations/Sync/SyncManager.cs
+++ b/MediaBrowser.Server.Implementations/Sync/SyncManager.cs
@@ -962,8 +962,6 @@ namespace MediaBrowser.Server.Implementations.Sync
return false;
}
- // TODO: Make sure it hasn't been deleted
-
return true;
}