update live stream sharing

This commit is contained in:
Luke Pulverenti
2016-10-11 17:33:38 -04:00
parent d54f03514d
commit 2c6fc11dcf
13 changed files with 90 additions and 47 deletions

View File

@@ -1875,17 +1875,23 @@ namespace MediaBrowser.Server.Implementations.Persistence
index++;
}
if (!reader.IsDBNull(index))
if (query.HasField(ItemFields.ThemeSongIds))
{
item.ThemeSongIds = reader.GetString(index).Split('|').Where(i => !string.IsNullOrWhiteSpace(i)).Select(i => new Guid(i)).ToList();
if (!reader.IsDBNull(index))
{
item.ThemeSongIds = reader.GetString(index).Split('|').Where(i => !string.IsNullOrWhiteSpace(i)).Select(i => new Guid(i)).ToList();
}
index++;
}
index++;
if (!reader.IsDBNull(index))
if (query.HasField(ItemFields.ThemeVideoIds))
{
item.ThemeVideoIds = reader.GetString(index).Split('|').Where(i => !string.IsNullOrWhiteSpace(i)).Select(i => new Guid(i)).ToList();
if (!reader.IsDBNull(index))
{
item.ThemeVideoIds = reader.GetString(index).Split('|').Where(i => !string.IsNullOrWhiteSpace(i)).Select(i => new Guid(i)).ToList();
}
index++;
}
index++;
if (string.IsNullOrWhiteSpace(item.Tagline))
{
@@ -3826,6 +3832,28 @@ namespace MediaBrowser.Server.Implementations.Persistence
clause += ")";
whereClauses.Add(clause);
}
if (query.HasThemeSong.HasValue)
{
if (query.HasThemeSong.Value)
{
whereClauses.Add("ThemeSongIds not null");
}
else
{
whereClauses.Add("ThemeSongIds is null");
}
}
if (query.HasThemeVideo.HasValue)
{
if (query.HasThemeVideo.Value)
{
whereClauses.Add("ThemeVideoIds not null");
}
else
{
whereClauses.Add("ThemeVideoIds is null");
}
}
//var enableItemsByName = query.IncludeItemsByName ?? query.IncludeItemTypes.Length > 0;
var enableItemsByName = query.IncludeItemsByName ?? false;