change IsRecording filter to IsInProgress
This commit is contained in:
parent
ca831ae88a
commit
98b6046f04
|
@ -78,9 +78,12 @@ namespace MediaBrowser.Api.LiveTv
|
|||
[ApiMember(Name = "Limit", Description = "Optional. The maximum number of records to return", IsRequired = false, DataType = "int", ParameterType = "query", Verb = "GET")]
|
||||
public int? Limit { get; set; }
|
||||
|
||||
[ApiMember(Name = "IsRecording", Description = "Optional filter by recordings that are currently active, or not.", IsRequired = false, DataType = "bool", ParameterType = "query", Verb = "GET")]
|
||||
public bool? IsRecording { get; set; }
|
||||
[ApiMember(Name = "Status", Description = "Optional filter by recording status.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET")]
|
||||
public RecordingStatus? Status { get; set; }
|
||||
|
||||
[ApiMember(Name = "Status", Description = "Optional filter by recordings that are in progress, or not.", IsRequired = false, DataType = "bool", ParameterType = "query", Verb = "GET")]
|
||||
public bool? IsInProgress { get; set; }
|
||||
|
||||
[ApiMember(Name = "SeriesTimerId", Description = "Optional filter by recordings belonging to a series timer", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET")]
|
||||
public string SeriesTimerId { get; set; }
|
||||
}
|
||||
|
@ -398,8 +401,9 @@ namespace MediaBrowser.Api.LiveTv
|
|||
GroupId = request.GroupId,
|
||||
StartIndex = request.StartIndex,
|
||||
Limit = request.Limit,
|
||||
IsRecording = request.IsRecording,
|
||||
SeriesTimerId = request.SeriesTimerId
|
||||
Status = request.Status,
|
||||
SeriesTimerId = request.SeriesTimerId,
|
||||
IsInProgress = request.IsInProgress
|
||||
|
||||
}, CancellationToken.None).Result;
|
||||
|
||||
|
|
|
@ -51,12 +51,6 @@ namespace MediaBrowser.Model.LiveTv
|
|||
/// </summary>
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the type of the location.
|
||||
/// </summary>
|
||||
/// <value>The type of the location.</value>
|
||||
public LocationType LocationType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the media streams.
|
||||
/// </summary>
|
||||
|
@ -69,12 +63,6 @@ namespace MediaBrowser.Model.LiveTv
|
|||
/// <value>The path.</value>
|
||||
public string Path { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the URL.
|
||||
/// </summary>
|
||||
/// <value>The URL.</value>
|
||||
public string Url { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Overview of the recording.
|
||||
/// </summary>
|
||||
|
|
|
@ -44,10 +44,16 @@ namespace MediaBrowser.Model.LiveTv
|
|||
public int? Limit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether this instance is recording.
|
||||
/// Gets or sets the status.
|
||||
/// </summary>
|
||||
/// <value><c>null</c> if [is recording] contains no value, <c>true</c> if [is recording]; otherwise, <c>false</c>.</value>
|
||||
public bool? IsRecording { get; set; }
|
||||
/// <value>The status.</value>
|
||||
public RecordingStatus? Status { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether this instance is in progress.
|
||||
/// </summary>
|
||||
/// <value><c>null</c> if [is in progress] contains no value, <c>true</c> if [is in progress]; otherwise, <c>false</c>.</value>
|
||||
public bool? IsInProgress { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the series timer identifier.
|
||||
|
|
|
@ -212,7 +212,6 @@ namespace MediaBrowser.Server.Implementations.LiveTv
|
|||
Audio = info.Audio,
|
||||
IsHD = info.IsHD,
|
||||
ServiceName = service.Name,
|
||||
Url = info.Url,
|
||||
IsMovie = info.IsMovie,
|
||||
IsSeries = info.IsSeries,
|
||||
IsSports = info.IsSports,
|
||||
|
@ -221,7 +220,6 @@ namespace MediaBrowser.Server.Implementations.LiveTv
|
|||
IsKids = info.IsKids,
|
||||
IsPremiere = info.IsPremiere,
|
||||
RunTimeTicks = (info.EndDate - info.StartDate).Ticks,
|
||||
LocationType = recording.LocationType,
|
||||
OriginalAirDate = info.OriginalAirDate,
|
||||
|
||||
MediaStreams = _itemRepo.GetMediaStreams(new MediaStreamQuery
|
||||
|
|
|
@ -50,7 +50,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv
|
|||
private List<Guid> _channelIdList = new List<Guid>();
|
||||
private Dictionary<Guid, LiveTvProgram> _programs = new Dictionary<Guid, LiveTvProgram>();
|
||||
|
||||
public LiveTvManager(IServerConfigurationManager config, IFileSystem fileSystem, ILogger logger, IItemRepository itemRepo, IImageProcessor imageProcessor, IUserDataManager userDataManager, IDtoService dtoService, IUserManager userManager, ILibraryManager libraryManager, IMediaEncoder mediaEncoder)
|
||||
public LiveTvManager(IServerConfigurationManager config, IFileSystem fileSystem, ILogger logger, IItemRepository itemRepo, IImageProcessor imageProcessor, IUserDataManager userDataManager, IDtoService dtoService, IUserManager userManager, ILibraryManager libraryManager, IMediaEncoder mediaEncoder, ITaskManager taskManager)
|
||||
{
|
||||
_config = config;
|
||||
_fileSystem = fileSystem;
|
||||
|
@ -59,6 +59,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv
|
|||
_userManager = userManager;
|
||||
_libraryManager = libraryManager;
|
||||
_mediaEncoder = mediaEncoder;
|
||||
_taskManager = taskManager;
|
||||
_userDataManager = userDataManager;
|
||||
|
||||
_tvDtoService = new LiveTvDtoService(dtoService, userDataManager, imageProcessor, logger, _itemRepo);
|
||||
|
@ -780,12 +781,18 @@ namespace MediaBrowser.Server.Implementations.LiveTv
|
|||
recordings = recordings.Where(i => GetRecordingGroupIds(i).Contains(guid));
|
||||
}
|
||||
|
||||
if (query.IsRecording.HasValue)
|
||||
if (query.IsInProgress.HasValue)
|
||||
{
|
||||
var val = query.IsRecording.Value;
|
||||
var val = query.IsInProgress.Value;
|
||||
recordings = recordings.Where(i => (i.Status == RecordingStatus.InProgress) == val);
|
||||
}
|
||||
|
||||
if (query.Status.HasValue)
|
||||
{
|
||||
var val = query.Status.Value;
|
||||
recordings = recordings.Where(i => (i.Status == val));
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(query.SeriesTimerId))
|
||||
{
|
||||
var guid = new Guid(query.SeriesTimerId);
|
||||
|
|
|
@ -291,7 +291,7 @@ namespace MediaBrowser.ServerApplication
|
|||
await RegisterMediaEncoder(innerProgress).ConfigureAwait(false);
|
||||
progress.Report(90);
|
||||
|
||||
LiveTvManager = new LiveTvManager(ServerConfigurationManager, FileSystemManager, Logger, ItemRepository, ImageProcessor, UserDataManager, DtoService, UserManager, LibraryManager, MediaEncoder);
|
||||
LiveTvManager = new LiveTvManager(ServerConfigurationManager, FileSystemManager, Logger, ItemRepository, ImageProcessor, UserDataManager, DtoService, UserManager, LibraryManager, MediaEncoder, TaskManager);
|
||||
RegisterSingleInstance(LiveTvManager);
|
||||
|
||||
var displayPreferencesTask = Task.Run(async () => await ConfigureDisplayPreferencesRepositories().ConfigureAwait(false));
|
||||
|
|
Loading…
Reference in New Issue
Block a user