mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-03-20 09:06:38 +00:00
update live stream sharing
This commit is contained in:
@@ -274,6 +274,10 @@ namespace MediaBrowser.Server.Implementations.Library
|
||||
positionTicks = 0;
|
||||
data.Played = false;
|
||||
}
|
||||
if (item is Audio)
|
||||
{
|
||||
positionTicks = 0;
|
||||
}
|
||||
|
||||
data.PlaybackPositionTicks = positionTicks;
|
||||
|
||||
|
||||
@@ -512,29 +512,14 @@ namespace MediaBrowser.Server.Implementations.LiveTv.TunerHosts.HdHomerun
|
||||
if (EnableLocalBuffer())
|
||||
{
|
||||
var liveStream = new HdHomerunLiveStream(mediaSource, streamId, _fileSystem, _httpClient, Logger, Config.ApplicationPaths, _appHost);
|
||||
if (info.AllowHWTranscoding)
|
||||
{
|
||||
var model = await GetModelInfo(info, cancellationToken).ConfigureAwait(false);
|
||||
|
||||
if ((model ?? string.Empty).IndexOf("hdtc", StringComparison.OrdinalIgnoreCase) != -1)
|
||||
{
|
||||
liveStream.EnableStreamSharing = !info.AllowHWTranscoding;
|
||||
}
|
||||
else
|
||||
{
|
||||
liveStream.EnableStreamSharing = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
liveStream.EnableStreamSharing = true;
|
||||
}
|
||||
liveStream.EnableStreamSharing = true;
|
||||
return liveStream;
|
||||
}
|
||||
else
|
||||
{
|
||||
var liveStream = new LiveStream(mediaSource);
|
||||
liveStream.EnableStreamSharing = false;
|
||||
liveStream.EnableStreamSharing = true;
|
||||
//liveStream.EnableStreamSharing = false;
|
||||
return liveStream;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace MediaBrowser.Server.Implementations.Playlists
|
||||
|
||||
public override bool IsVisible(User user)
|
||||
{
|
||||
return base.IsVisible(user);
|
||||
return base.IsVisible(user) && GetChildren(user, true).Any();
|
||||
}
|
||||
|
||||
protected override IEnumerable<BaseItem> GetEligibleChildrenForRecursiveChildren(User user)
|
||||
|
||||
Reference in New Issue
Block a user