diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-01-14 15:03:35 -0500 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-01-14 15:03:35 -0500 |
| commit | f4b890f163cd3be5b399ef03be409106ab8ff60b (patch) | |
| tree | 5142c6f6772b39582922d637a94f5953db9b0158 /MediaBrowser.Api/Playback/BaseStreamingService.cs | |
| parent | 3cde2011904de6a874b17cab97fbc984ce62c228 (diff) | |
added new item by name filters
Diffstat (limited to 'MediaBrowser.Api/Playback/BaseStreamingService.cs')
| -rw-r--r-- | MediaBrowser.Api/Playback/BaseStreamingService.cs | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/MediaBrowser.Api/Playback/BaseStreamingService.cs b/MediaBrowser.Api/Playback/BaseStreamingService.cs index a39e4cf58..7ad15c9ee 100644 --- a/MediaBrowser.Api/Playback/BaseStreamingService.cs +++ b/MediaBrowser.Api/Playback/BaseStreamingService.cs @@ -1004,9 +1004,9 @@ namespace MediaBrowser.Api.Playback RequestedUrl = url }; - Guid itemId; + var item = DtoService.GetItemByDtoId(request.Id); - if (string.Equals(request.Type, "Recording", StringComparison.OrdinalIgnoreCase)) + if (item is ILiveTvRecording) { var recording = await LiveTvManager.GetInternalRecording(request.Id, cancellationToken).ConfigureAwait(false); @@ -1042,11 +1042,10 @@ namespace MediaBrowser.Api.Playback } } - itemId = recording.Id; //state.RunTimeTicks = recording.RunTimeTicks; state.SendInputOverStandardInput = recording.RecordingInfo.Status == RecordingStatus.InProgress; } - else if (string.Equals(request.Type, "Channel", StringComparison.OrdinalIgnoreCase)) + else if (item is LiveTvChannel) { var channel = LiveTvManager.GetInternalChannel(request.Id); @@ -1069,13 +1068,10 @@ namespace MediaBrowser.Api.Playback state.IsRemote = true; } - itemId = channel.Id; state.SendInputOverStandardInput = true; } else { - var item = DtoService.GetItemByDtoId(request.Id); - state.MediaPath = item.Path; state.IsRemote = item.LocationType == LocationType.Remote; @@ -1093,14 +1089,13 @@ namespace MediaBrowser.Api.Playback } state.RunTimeTicks = item.RunTimeTicks; - itemId = item.Id; } var videoRequest = request as VideoStreamRequest; var mediaStreams = ItemRepository.GetMediaStreams(new MediaStreamQuery { - ItemId = itemId + ItemId = item.Id }).ToList(); |
