change IsRecording filter to IsInProgress

This commit is contained in:
Luke Pulverenti
2014-01-15 10:18:31 -05:00
parent ca831ae88a
commit 98b6046f04
6 changed files with 28 additions and 25 deletions

View File

@@ -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

View File

@@ -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);