Merge pull request #1739 from MediaBrowser/dev

Dev
This commit is contained in:
Luke 2016-05-16 01:48:30 -04:00
commit b2d9fe2676
3 changed files with 9 additions and 13 deletions

View file

@ -1385,6 +1385,11 @@ namespace MediaBrowser.Server.Implementations.LiveTv
private QueryResult<BaseItem> GetEmbyRecordings(RecordingQuery query, User user)
{
if (user == null || (query.IsInProgress ?? false))
{
return new QueryResult<BaseItem>();
}
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<BaseItem>();
}
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);

View file

@ -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",

View file

@ -140,12 +140,6 @@
<Content Include="dashboard-ui\components\metadataeditor\personeditor.template.html">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="dashboard-ui\components\recordingeditor\recordingeditor.js">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="dashboard-ui\components\recordingeditor\recordingeditor.template.html">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="dashboard-ui\components\remotecontrol.js">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>