aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2014-06-30 15:24:35 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2014-06-30 15:24:35 -0400
commitc273f5fd9c33415a1fa985222e43c9c02f3d36e5 (patch)
tree80986b09bfc12a5018c9335df9ee0f07e7ba55e0 /MediaBrowser.Server.Implementations
parent8ae316a2f3333106921e7bc587bc990a8899c613 (diff)
fixes #860 - Add options to display channels directly within user views
Diffstat (limited to 'MediaBrowser.Server.Implementations')
-rw-r--r--MediaBrowser.Server.Implementations/Library/UserViewManager.cs11
-rw-r--r--MediaBrowser.Server.Implementations/Localization/Server/server.json4
2 files changed, 12 insertions, 3 deletions
diff --git a/MediaBrowser.Server.Implementations/Library/UserViewManager.cs b/MediaBrowser.Server.Implementations/Library/UserViewManager.cs
index fc4b9eb4c..9ac82690b 100644
--- a/MediaBrowser.Server.Implementations/Library/UserViewManager.cs
+++ b/MediaBrowser.Server.Implementations/Library/UserViewManager.cs
@@ -90,12 +90,19 @@ namespace MediaBrowser.Server.Implementations.Library
{
var channelResult = await _channelManager.GetChannels(new ChannelQuery
{
- Limit = 0,
UserId = query.UserId
}, cancellationToken).ConfigureAwait(false);
- if (channelResult.TotalRecordCount > 0)
+ var channels = channelResult.Items;
+
+ var embeddedChannels = channels
+ .Where(i => user.Configuration.DisplayChannelsWithinViews.Contains(i.Id))
+ .ToList();
+
+ list.AddRange(embeddedChannels.Select(i => _channelManager.GetChannel(i.Id)));
+
+ if (channels.Length > embeddedChannels.Count)
{
list.Add(await _channelManager.GetInternalChannelFolder(query.UserId, cancellationToken).ConfigureAwait(false));
}
diff --git a/MediaBrowser.Server.Implementations/Localization/Server/server.json b/MediaBrowser.Server.Implementations/Localization/Server/server.json
index 9063ebc4b..4a3d93d1e 100644
--- a/MediaBrowser.Server.Implementations/Localization/Server/server.json
+++ b/MediaBrowser.Server.Implementations/Localization/Server/server.json
@@ -846,5 +846,7 @@
"LabelXbmcMetadataSaveImagePathsHelp": "This is recommended if you have image file names that don't conform to Xbmc guidelines.",
"LabelXbmcMetadataEnablePathSubstitution": "Enable path substitution",
"LabelXbmcMetadataEnablePathSubstitutionHelp": "Enables path substitution of image paths using the server's path substitution settings.",
- "LabelXbmcMetadataEnablePathSubstitutionHelp2": "See path substitution."
+ "LabelXbmcMetadataEnablePathSubstitutionHelp2": "See path substitution.",
+ "LabelGroupChannelsIntoViews": "Display the following channels within my views:",
+ "LabelGroupChannelsIntoViewsHelp": "If enabled, these channels will be displayed directly alongside other views. If disabled, they'll be displayed within a separate Channels view."
} \ No newline at end of file