diff options
| -rw-r--r-- | MediaBrowser.Api/LiveTv/LiveTvService.cs | 14 | ||||
| -rw-r--r-- | MediaBrowser.Api/Playback/BaseStreamingService.cs | 16 | ||||
| -rw-r--r-- | MediaBrowser.Controller/LiveTv/ILiveTvManager.cs | 8 | ||||
| -rw-r--r-- | MediaBrowser.Controller/LiveTv/ILiveTvService.cs | 4 | ||||
| -rw-r--r-- | MediaBrowser.Mono.userprefs | 2 | ||||
| -rw-r--r-- | MediaBrowser.Providers/Movies/MovieDbProvider.cs | 38 | ||||
| -rw-r--r-- | MediaBrowser.Providers/TV/SeriesPostScanTask.cs | 2 | ||||
| -rw-r--r-- | MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs | 9 | ||||
| -rw-r--r-- | Nuget/MediaBrowser.Common.Internal.nuspec | 4 | ||||
| -rw-r--r-- | Nuget/MediaBrowser.Common.nuspec | 2 | ||||
| -rw-r--r-- | Nuget/MediaBrowser.Server.Core.nuspec | 4 |
11 files changed, 61 insertions, 42 deletions
diff --git a/MediaBrowser.Api/LiveTv/LiveTvService.cs b/MediaBrowser.Api/LiveTv/LiveTvService.cs index 588fad8bd..61883ddaa 100644 --- a/MediaBrowser.Api/LiveTv/LiveTvService.cs +++ b/MediaBrowser.Api/LiveTv/LiveTvService.cs @@ -198,6 +198,13 @@ namespace MediaBrowser.Api.LiveTv public string Id { get; set; } } + [Route("/LiveTv/Channels/{Id}/Stream", "GET")] + public class GetInternalChannelStream + { + [ApiMember(Name = "Id", Description = "Channel Id", IsRequired = true, DataType = "string", ParameterType = "path", Verb = "GET")] + public string Id { get; set; } + } + public class LiveTvService : BaseApiService { private readonly ILiveTvManager _liveTvManager; @@ -399,6 +406,13 @@ namespace MediaBrowser.Api.LiveTv return ToStreamResult(stream.Stream, stream.MimeType); } + public object Get(GetInternalChannelStream request) + { + var stream = _liveTvManager.GetChannelStream(request.Id, CancellationToken.None).Result; + + return ToStreamResult(stream.Stream, stream.MimeType); + } + public object Get(GetRecordingGroups request) { var result = _liveTvManager.GetRecordingGroups(new RecordingGroupQuery diff --git a/MediaBrowser.Api/Playback/BaseStreamingService.cs b/MediaBrowser.Api/Playback/BaseStreamingService.cs index 34ec15a70..1e2ae58b2 100644 --- a/MediaBrowser.Api/Playback/BaseStreamingService.cs +++ b/MediaBrowser.Api/Playback/BaseStreamingService.cs @@ -902,6 +902,22 @@ namespace MediaBrowser.Api.Playback item = recording; } + else if (string.Equals(request.Type, "Channel", StringComparison.OrdinalIgnoreCase)) + { + var channel = LiveTvManager.GetInternalChannel(request.Id); + + state.VideoType = VideoType.VideoFile; + state.IsInputVideo = string.Equals(channel.MediaType, MediaType.Video, StringComparison.OrdinalIgnoreCase); + state.PlayableStreamFileNames = new List<string>(); + + state.MediaPath = string.Format("http://localhost:{0}/mediabrowser/LiveTv/Channels/{1}/Stream", + ServerConfigurationManager.Configuration.HttpServerPortNumber, + request.Id); + + state.IsRemote = true; + + item = channel; + } else { item = DtoService.GetItemByDtoId(request.Id); diff --git a/MediaBrowser.Controller/LiveTv/ILiveTvManager.cs b/MediaBrowser.Controller/LiveTv/ILiveTvManager.cs index 2458d4db4..c26e29d94 100644 --- a/MediaBrowser.Controller/LiveTv/ILiveTvManager.cs +++ b/MediaBrowser.Controller/LiveTv/ILiveTvManager.cs @@ -162,6 +162,14 @@ namespace MediaBrowser.Controller.LiveTv /// <param name="cancellationToken">The cancellation token.</param> /// <returns>Task{Stream}.</returns> Task<StreamResponseInfo> GetRecordingStream(string id, CancellationToken cancellationToken); + + /// <summary> + /// Gets the channel stream. + /// </summary> + /// <param name="id">The identifier.</param> + /// <param name="cancellationToken">The cancellation token.</param> + /// <returns>Task{StreamResponseInfo}.</returns> + Task<StreamResponseInfo> GetChannelStream(string id, CancellationToken cancellationToken); /// <summary> /// Gets the program. diff --git a/MediaBrowser.Controller/LiveTv/ILiveTvService.cs b/MediaBrowser.Controller/LiveTv/ILiveTvService.cs index 31dbd8e99..f8efbce63 100644 --- a/MediaBrowser.Controller/LiveTv/ILiveTvService.cs +++ b/MediaBrowser.Controller/LiveTv/ILiveTvService.cs @@ -150,9 +150,9 @@ namespace MediaBrowser.Controller.LiveTv /// <summary> /// Gets the channel stream. /// </summary> - /// <param name="recordingId">The recording identifier.</param> + /// <param name="channelId">The channel identifier.</param> /// <param name="cancellationToken">The cancellation token.</param> /// <returns>Task{Stream}.</returns> - Task<StreamResponseInfo> GetChannelStream(string recordingId, CancellationToken cancellationToken); + Task<StreamResponseInfo> GetChannelStream(string channelId, CancellationToken cancellationToken); } } diff --git a/MediaBrowser.Mono.userprefs b/MediaBrowser.Mono.userprefs index 3ca97e6bd..d303a7993 100644 --- a/MediaBrowser.Mono.userprefs +++ b/MediaBrowser.Mono.userprefs @@ -2,7 +2,7 @@ <MonoDevelop.Ide.Workspace ActiveConfiguration="Release Mono" /> <MonoDevelop.Ide.Workbench ActiveDocument="MediaBrowser.Server.Mono\app.config"> <Files> - <File FileName="MediaBrowser.Server.Mono\app.config" Line="1" Column="39" /> + <File FileName="MediaBrowser.Server.Mono\app.config" Line="11" Column="68" /> </Files> </MonoDevelop.Ide.Workbench> <MonoDevelop.Ide.DebuggingService.Breakpoints> diff --git a/MediaBrowser.Providers/Movies/MovieDbProvider.cs b/MediaBrowser.Providers/Movies/MovieDbProvider.cs index c6c9df6f7..dc267b37c 100644 --- a/MediaBrowser.Providers/Movies/MovieDbProvider.cs +++ b/MediaBrowser.Providers/Movies/MovieDbProvider.cs @@ -751,41 +751,13 @@ namespace MediaBrowser.Providers.Movies ? minimunRelease.iso_3166_1 + "-" + minimunRelease.certification : null; } - - if (ourRelease.release_date != default(DateTime)) - { - if (ourRelease.release_date.Year != 1) - { - movie.PremiereDate = ourRelease.release_date.ToUniversalTime(); - movie.ProductionYear = ourRelease.release_date.Year; - } - } - else if (usRelease.release_date != default(DateTime)) - { - if (usRelease.release_date.Year != 1) - { - movie.PremiereDate = usRelease.release_date.ToUniversalTime(); - movie.ProductionYear = usRelease.release_date.Year; - } - } - else if (minimunRelease.release_date != default(DateTime)) - { - if (minimunRelease.release_date.Year != 1) - { - - movie.PremiereDate = minimunRelease.release_date.ToUniversalTime(); - movie.ProductionYear = minimunRelease.release_date.Year; - } - } } - else + + if (movieData.release_date.Year != 1) { - if (movieData.release_date.Year != 1) - { - //no specific country release info at all - movie.PremiereDate = movieData.release_date.ToUniversalTime(); - movie.ProductionYear = movieData.release_date.Year; - } + //no specific country release info at all + movie.PremiereDate = movieData.release_date.ToUniversalTime(); + movie.ProductionYear = movieData.release_date.Year; } // If that didn't find a rating and we are a boxset, use the one from our first child diff --git a/MediaBrowser.Providers/TV/SeriesPostScanTask.cs b/MediaBrowser.Providers/TV/SeriesPostScanTask.cs index b889b991e..8663c0b4c 100644 --- a/MediaBrowser.Providers/TV/SeriesPostScanTask.cs +++ b/MediaBrowser.Providers/TV/SeriesPostScanTask.cs @@ -441,7 +441,7 @@ namespace MediaBrowser.Providers.TV { _logger.Info("Creating Season {0} entry for {1}", seasonNumber, series.Name); - var name = string.Format("Season {0}", seasonNumber.ToString(UsCulture)); + var name = seasonNumber == 0 ? _config.Configuration.SeasonZeroDisplayName : string.Format("Season {0}", seasonNumber.ToString(UsCulture)); var season = new Season { diff --git a/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs b/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs index 2ef68c239..a3790b097 100644 --- a/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs +++ b/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs @@ -166,6 +166,15 @@ namespace MediaBrowser.Server.Implementations.LiveTv return await service.GetRecordingStream(recording.Id, cancellationToken).ConfigureAwait(false); } + public async Task<StreamResponseInfo> GetChannelStream(string id, CancellationToken cancellationToken) + { + var service = ActiveService; + + var channel = GetInternalChannel(id); + + return await service.GetRecordingStream(channel.ChannelInfo.Id, cancellationToken).ConfigureAwait(false); + } + private async Task<LiveTvChannel> GetChannel(ChannelInfo channelInfo, string serviceName, CancellationToken cancellationToken) { var path = Path.Combine(_appPaths.ItemsByNamePath, "channels", _fileSystem.GetValidFilename(serviceName), _fileSystem.GetValidFilename(channelInfo.Name)); diff --git a/Nuget/MediaBrowser.Common.Internal.nuspec b/Nuget/MediaBrowser.Common.Internal.nuspec index 1df7b17bf..cdbd51d84 100644 --- a/Nuget/MediaBrowser.Common.Internal.nuspec +++ b/Nuget/MediaBrowser.Common.Internal.nuspec @@ -2,7 +2,7 @@ <package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd"> <metadata> <id>MediaBrowser.Common.Internal</id> - <version>3.0.292</version> + <version>3.0.293</version> <title>MediaBrowser.Common.Internal</title> <authors>Luke</authors> <owners>ebr,Luke,scottisafool</owners> @@ -12,7 +12,7 @@ <description>Contains common components shared by Media Browser Theater and Media Browser Server. Not intended for plugin developer consumption.</description> <copyright>Copyright © Media Browser 2013</copyright> <dependencies> - <dependency id="MediaBrowser.Common" version="3.0.292" /> + <dependency id="MediaBrowser.Common" version="3.0.293" /> <dependency id="NLog" version="2.1.0" /> <dependency id="SimpleInjector" version="2.4.0" /> <dependency id="sharpcompress" version="0.10.2" /> diff --git a/Nuget/MediaBrowser.Common.nuspec b/Nuget/MediaBrowser.Common.nuspec index 14e09d90c..20bdf1300 100644 --- a/Nuget/MediaBrowser.Common.nuspec +++ b/Nuget/MediaBrowser.Common.nuspec @@ -2,7 +2,7 @@ <package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd"> <metadata> <id>MediaBrowser.Common</id> - <version>3.0.292</version> + <version>3.0.293</version> <title>MediaBrowser.Common</title> <authors>Media Browser Team</authors> <owners>ebr,Luke,scottisafool</owners> diff --git a/Nuget/MediaBrowser.Server.Core.nuspec b/Nuget/MediaBrowser.Server.Core.nuspec index d49dfb85d..8f040c00f 100644 --- a/Nuget/MediaBrowser.Server.Core.nuspec +++ b/Nuget/MediaBrowser.Server.Core.nuspec @@ -2,7 +2,7 @@ <package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"> <metadata> <id>MediaBrowser.Server.Core</id> - <version>3.0.292</version> + <version>3.0.293</version> <title>Media Browser.Server.Core</title> <authors>Media Browser Team</authors> <owners>ebr,Luke,scottisafool</owners> @@ -12,7 +12,7 @@ <description>Contains core components required to build plugins for Media Browser Server.</description> <copyright>Copyright © Media Browser 2013</copyright> <dependencies> - <dependency id="MediaBrowser.Common" version="3.0.292" /> + <dependency id="MediaBrowser.Common" version="3.0.293" /> </dependencies> </metadata> <files> |
