mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-03 14:28:46 +01:00
update program queries
This commit is contained in:
@@ -3,6 +3,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using MediaBrowser.Model.Configuration;
|
||||
using System.Linq;
|
||||
using MediaBrowser.Controller.Dto;
|
||||
using MediaBrowser.Model.Querying;
|
||||
|
||||
namespace MediaBrowser.Controller.Entities
|
||||
@@ -159,10 +160,12 @@ namespace MediaBrowser.Controller.Entities
|
||||
public DateTime? MinDateCreated { get; set; }
|
||||
public DateTime? MinDateLastSaved { get; set; }
|
||||
|
||||
public List<ItemFields> Fields { get; set; }
|
||||
public DtoOptions DtoOptions { get; set; }
|
||||
|
||||
public bool HasField(ItemFields name)
|
||||
{
|
||||
var fields = DtoOptions.Fields;
|
||||
|
||||
switch (name)
|
||||
{
|
||||
case ItemFields.ProductionLocations:
|
||||
@@ -185,7 +188,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
case ItemFields.Tags:
|
||||
case ItemFields.DateLastMediaAdded:
|
||||
case ItemFields.CriticRatingSummary:
|
||||
return Fields.Count == 0 || Fields.Contains(name);
|
||||
return fields.Count == 0 || fields.Contains(name);
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
@@ -196,7 +199,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
GroupByPresentationUniqueKey = true;
|
||||
EnableTotalRecordCount = true;
|
||||
|
||||
Fields = new List<ItemFields>();
|
||||
DtoOptions = new DtoOptions();
|
||||
AlbumNames = new string[] { };
|
||||
ArtistNames = new string[] { };
|
||||
ExcludeArtistIds = new string[] { };
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using MediaBrowser.Model.Dto;
|
||||
@@ -9,13 +10,16 @@ namespace MediaBrowser.Controller.LiveTv
|
||||
{
|
||||
public MediaSourceInfo OriginalMediaSource { get; set; }
|
||||
public MediaSourceInfo OpenedMediaSource { get; set; }
|
||||
public DateTime DateOpened { get; set; }
|
||||
public int ConsumerCount { get; set; }
|
||||
public int ConsumerCount {
|
||||
get { return SharedStreamIds.Count; }
|
||||
}
|
||||
public ITunerHost TunerHost { get; set; }
|
||||
public string OriginalStreamId { get; set; }
|
||||
public bool EnableStreamSharing { get; set; }
|
||||
public string UniqueId = Guid.NewGuid().ToString("N");
|
||||
|
||||
public List<string> SharedStreamIds = new List<string>();
|
||||
|
||||
public LiveStream(MediaSourceInfo mediaSource)
|
||||
{
|
||||
OriginalMediaSource = mediaSource;
|
||||
@@ -23,12 +27,9 @@ namespace MediaBrowser.Controller.LiveTv
|
||||
EnableStreamSharing = true;
|
||||
}
|
||||
|
||||
public async Task Open(CancellationToken cancellationToken)
|
||||
public Task Open(CancellationToken cancellationToken)
|
||||
{
|
||||
await OpenInternal(cancellationToken).ConfigureAwait(false);
|
||||
DateOpened = DateTime.UtcNow;
|
||||
|
||||
OpenedMediaSource.DateLiveStreamOpened = DateOpened;
|
||||
return OpenInternal(cancellationToken);
|
||||
}
|
||||
|
||||
protected virtual Task OpenInternal(CancellationToken cancellationToken)
|
||||
|
||||
Reference in New Issue
Block a user