aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MediaBrowser.Controller/LiveTv/ILiveTvManager.cs3
-rw-r--r--MediaBrowser.Model/Configuration/UserConfiguration.cs1
-rw-r--r--MediaBrowser.Server.Implementations/Library/LibraryManager.cs2
-rw-r--r--MediaBrowser.Server.Implementations/Library/UserViewManager.cs5
-rw-r--r--MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs6
5 files changed, 8 insertions, 9 deletions
diff --git a/MediaBrowser.Controller/LiveTv/ILiveTvManager.cs b/MediaBrowser.Controller/LiveTv/ILiveTvManager.cs
index e568b2eae..df09d39b2 100644
--- a/MediaBrowser.Controller/LiveTv/ILiveTvManager.cs
+++ b/MediaBrowser.Controller/LiveTv/ILiveTvManager.cs
@@ -273,10 +273,9 @@ namespace MediaBrowser.Controller.LiveTv
/// <summary>
/// Gets the live tv folder.
/// </summary>
- /// <param name="userId">The user identifier.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>BaseItemDto.</returns>
- Task<Folder> GetInternalLiveTvFolder(string userId, CancellationToken cancellationToken);
+ Task<Folder> GetInternalLiveTvFolder(CancellationToken cancellationToken);
/// <summary>
/// Gets the live tv folder.
diff --git a/MediaBrowser.Model/Configuration/UserConfiguration.cs b/MediaBrowser.Model/Configuration/UserConfiguration.cs
index 9dd84bc7d..349780958 100644
--- a/MediaBrowser.Model/Configuration/UserConfiguration.cs
+++ b/MediaBrowser.Model/Configuration/UserConfiguration.cs
@@ -50,6 +50,7 @@ namespace MediaBrowser.Model.Configuration
public string[] PlainFolderViews { get; set; }
public bool HidePlayedInLatest { get; set; }
+ public bool DisplayChannelsInline { get; set; }
/// <summary>
/// Initializes a new instance of the <see cref="UserConfiguration" /> class.
diff --git a/MediaBrowser.Server.Implementations/Library/LibraryManager.cs b/MediaBrowser.Server.Implementations/Library/LibraryManager.cs
index c316aab25..0cfd38479 100644
--- a/MediaBrowser.Server.Implementations/Library/LibraryManager.cs
+++ b/MediaBrowser.Server.Implementations/Library/LibraryManager.cs
@@ -1824,7 +1824,7 @@ namespace MediaBrowser.Server.Implementations.Library
throw new ArgumentNullException("name");
}
- var idValues = "37_namedview_" + name + (parentId ?? string.Empty);
+ var idValues = "37_namedview_" + name + (parentId ?? string.Empty) + (viewType ?? string.Empty);
if (!string.IsNullOrWhiteSpace(uniqueId))
{
idValues += uniqueId;
diff --git a/MediaBrowser.Server.Implementations/Library/UserViewManager.cs b/MediaBrowser.Server.Implementations/Library/UserViewManager.cs
index 5d753826a..a609c53ab 100644
--- a/MediaBrowser.Server.Implementations/Library/UserViewManager.cs
+++ b/MediaBrowser.Server.Implementations/Library/UserViewManager.cs
@@ -156,7 +156,7 @@ namespace MediaBrowser.Server.Implementations.Library
var channels = channelResult.Items;
var embeddedChannels = channels
- .Where(i => user.Configuration.DisplayChannelsWithinViews.Contains(i.Id.ToString("N")))
+ .Where(i => user.Configuration.DisplayChannelsInline || user.Configuration.DisplayChannelsWithinViews.Contains(i.Id.ToString("N")))
.ToList();
list.AddRange(embeddedChannels);
@@ -168,8 +168,7 @@ namespace MediaBrowser.Server.Implementations.Library
if (_liveTvManager.GetEnabledUsers().Select(i => i.Id.ToString("N")).Contains(query.UserId))
{
- var name = _localizationManager.GetLocalizedString("ViewType" + CollectionType.LiveTv);
- list.Add(await _libraryManager.GetNamedView(name, CollectionType.LiveTv, string.Empty, cancellationToken).ConfigureAwait(false));
+ list.Add(await _liveTvManager.GetInternalLiveTvFolder(CancellationToken.None).ConfigureAwait(false));
}
}
diff --git a/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs b/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs
index cc3c06dd4..782473bea 100644
--- a/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs
+++ b/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs
@@ -2196,15 +2196,15 @@ namespace MediaBrowser.Server.Implementations.LiveTv
{
var user = string.IsNullOrEmpty(userId) ? null : _userManager.GetUserById(userId);
- var folder = await GetInternalLiveTvFolder(userId, cancellationToken).ConfigureAwait(false);
+ var folder = await GetInternalLiveTvFolder(cancellationToken).ConfigureAwait(false);
return _dtoService.GetBaseItemDto(folder, new DtoOptions(), user);
}
- public async Task<Folder> GetInternalLiveTvFolder(string userId, CancellationToken cancellationToken)
+ public async Task<Folder> GetInternalLiveTvFolder(CancellationToken cancellationToken)
{
var name = _localization.GetLocalizedString("ViewTypeLiveTV");
- return await _libraryManager.GetNamedView(name, "livetv", "zz_" + name, cancellationToken).ConfigureAwait(false);
+ return await _libraryManager.GetNamedView(name, "livetv", name, cancellationToken).ConfigureAwait(false);
}
public async Task<TunerHostInfo> SaveTunerHost(TunerHostInfo info)