From 233f9cb238201c7dfdb060b718ff635947161f30 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sun, 15 May 2016 21:22:22 -0400 Subject: [PATCH 1/2] update shared components --- .../LiveTv/LiveTvManager.cs | 13 +++++++------ .../Notifications/SqliteNotificationsRepository.cs | 3 ++- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs b/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs index 99ab07648..9251ccb9e 100644 --- a/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs +++ b/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs @@ -1385,6 +1385,11 @@ namespace MediaBrowser.Server.Implementations.LiveTv private QueryResult GetEmbyRecordings(RecordingQuery query, User user) { + if (user == null || (query.IsInProgress ?? false)) + { + return new QueryResult(); + } + var folders = EmbyTV.EmbyTV.Current.GetRecordingFolders() .SelectMany(i => i.Locations) .Distinct(StringComparer.OrdinalIgnoreCase) @@ -1413,13 +1418,9 @@ namespace MediaBrowser.Server.Implementations.LiveTv return new QueryResult(); } - if (user != null && !(query.IsInProgress ?? false)) + if (_services.Count == 1) { - var initialResult = GetEmbyRecordings(query, user); - if (initialResult.TotalRecordCount > 0) - { - return initialResult; - } + return GetEmbyRecordings(query, user); } await RefreshRecordings(cancellationToken).ConfigureAwait(false); diff --git a/MediaBrowser.Server.Implementations/Notifications/SqliteNotificationsRepository.cs b/MediaBrowser.Server.Implementations/Notifications/SqliteNotificationsRepository.cs index cecf03ddf..10e8c5699 100644 --- a/MediaBrowser.Server.Implementations/Notifications/SqliteNotificationsRepository.cs +++ b/MediaBrowser.Server.Implementations/Notifications/SqliteNotificationsRepository.cs @@ -41,7 +41,8 @@ namespace MediaBrowser.Server.Implementations.Notifications string[] queries = { "create table if not exists Notifications (Id GUID NOT NULL, UserId GUID NOT NULL, Date DATETIME NOT NULL, Name TEXT NOT NULL, Description TEXT, Url TEXT, Level TEXT NOT NULL, IsRead BOOLEAN NOT NULL, Category TEXT NOT NULL, RelatedId TEXT, PRIMARY KEY (Id, UserId))", - "create index if not exists idx_Notifications on Notifications(Id, UserId)", + "create index if not exists idx_Notifications1 on Notifications(Id)", + "create index if not exists idx_Notifications2 on Notifications(UserId)", //pragmas "pragma temp_store = memory", From 82ad4941894b3535e773c11cbef08986c4274a02 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Mon, 16 May 2016 01:47:40 -0400 Subject: [PATCH 2/2] fix project --- MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj | 6 ------ 1 file changed, 6 deletions(-) diff --git a/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj b/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj index e6d690f27..0061ec5de 100644 --- a/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj +++ b/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj @@ -140,12 +140,6 @@ PreserveNewest - - PreserveNewest - - - PreserveNewest - PreserveNewest