mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-11-17 10:58:58 -07:00
Merge pull request #2220 from MediaBrowser/dev
update live stream sharing
This commit is contained in:
commit
2abad94e21
@ -59,6 +59,15 @@ namespace MediaBrowser.Controller.Entities.Audio
|
||||
AlbumArtists = new List<string>();
|
||||
}
|
||||
|
||||
[IgnoreDataMember]
|
||||
public override bool SupportsPlayedStatus
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
[IgnoreDataMember]
|
||||
public override bool SupportsAddingToPlaylist
|
||||
{
|
||||
|
@ -807,18 +807,6 @@ namespace MediaBrowser.Controller.Entities
|
||||
return true;
|
||||
}
|
||||
|
||||
if (query.HasThemeSong.HasValue)
|
||||
{
|
||||
Logger.Debug("Query requires post-filtering due to HasThemeSong");
|
||||
return true;
|
||||
}
|
||||
|
||||
if (query.HasThemeVideo.HasValue)
|
||||
{
|
||||
Logger.Debug("Query requires post-filtering due to HasThemeVideo");
|
||||
return true;
|
||||
}
|
||||
|
||||
// Filter by VideoType
|
||||
if (query.VideoTypes.Length > 0)
|
||||
{
|
||||
|
@ -16,8 +16,6 @@ namespace MediaBrowser.Controller.Entities
|
||||
RemoteTrailers = new List<MediaUrl>();
|
||||
LocalTrailerIds = new List<Guid>();
|
||||
RemoteTrailerIds = new List<Guid>();
|
||||
ThemeSongIds = new List<Guid>();
|
||||
ThemeVideoIds = new List<Guid>();
|
||||
}
|
||||
|
||||
public List<Guid> LocalTrailerIds { get; set; }
|
||||
|
@ -168,6 +168,8 @@ namespace MediaBrowser.Controller.Entities
|
||||
|
||||
switch (name)
|
||||
{
|
||||
case ItemFields.ThemeSongIds:
|
||||
case ItemFields.ThemeVideoIds:
|
||||
case ItemFields.ProductionLocations:
|
||||
case ItemFields.Keywords:
|
||||
case ItemFields.Taglines:
|
||||
|
@ -68,6 +68,15 @@ namespace MediaBrowser.Controller.Entities.Movies
|
||||
set { TmdbCollectionName = value; }
|
||||
}
|
||||
|
||||
[IgnoreDataMember]
|
||||
protected override bool SupportsIsInMixedFolderDetection
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
protected override async Task<bool> RefreshedOwnedItems(MetadataRefreshOptions options, List<FileSystemMetadata> fileSystemChildren, CancellationToken cancellationToken)
|
||||
{
|
||||
var hasChanges = await base.RefreshedOwnedItems(options, fileSystemChildren, cancellationToken).ConfigureAwait(false);
|
||||
|
@ -53,6 +53,15 @@ namespace MediaBrowser.Controller.Entities
|
||||
}
|
||||
}
|
||||
|
||||
[IgnoreDataMember]
|
||||
protected override bool SupportsIsInMixedFolderDetection
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public override string CreatePresentationUniqueKey()
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(PrimaryVersionId))
|
||||
|
@ -54,6 +54,15 @@ namespace MediaBrowser.Controller.LiveTv
|
||||
}
|
||||
}
|
||||
|
||||
[IgnoreDataMember]
|
||||
protected override bool SupportsIsInMixedFolderDetection
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
[IgnoreDataMember]
|
||||
public override bool SupportsPlayedStatus
|
||||
{
|
||||
|
@ -206,8 +206,6 @@ namespace MediaBrowser.Controller.Playlists
|
||||
}
|
||||
|
||||
public override bool IsVisible(User user)
|
||||
{
|
||||
if (base.IsVisible(user))
|
||||
{
|
||||
var userId = user.Id.ToString("N");
|
||||
|
||||
@ -215,7 +213,9 @@ namespace MediaBrowser.Controller.Playlists
|
||||
string.Equals(OwnerUserId, userId, StringComparison.OrdinalIgnoreCase);
|
||||
}
|
||||
|
||||
return false;
|
||||
public override bool IsVisibleStandalone(User user)
|
||||
{
|
||||
return IsVisible(user);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -260,6 +260,8 @@
|
||||
/// <summary>
|
||||
/// The service name
|
||||
/// </summary>
|
||||
ServiceName
|
||||
ServiceName,
|
||||
ThemeSongIds,
|
||||
ThemeVideoIds
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
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 (query.HasField(ItemFields.ThemeSongIds))
|
||||
{
|
||||
if (!reader.IsDBNull(index))
|
||||
{
|
||||
item.ThemeSongIds = reader.GetString(index).Split('|').Where(i => !string.IsNullOrWhiteSpace(i)).Select(i => new Guid(i)).ToList();
|
||||
}
|
||||
index++;
|
||||
}
|
||||
|
||||
if (query.HasField(ItemFields.ThemeVideoIds))
|
||||
{
|
||||
if (!reader.IsDBNull(index))
|
||||
{
|
||||
item.ThemeVideoIds = reader.GetString(index).Split('|').Where(i => !string.IsNullOrWhiteSpace(i)).Select(i => new Guid(i)).ToList();
|
||||
}
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user