The Free Software Media System - Server Backend & API
live tv updates
Luke Pulverenti594ed864c6a7
diff --git a/MediaBrowser.Api/LiveTv/LiveTvImageService.cs b/MediaBrowser.Api/LiveTv/LiveTvImageService.csindex 84926e164c..f58d4a5334 100644--- a/MediaBrowser.Api/LiveTv/LiveTvImageService.cs+++ b/MediaBrowser.Api/LiveTv/LiveTvImageService.cs@@ -178,7 +178,11 @@ namespace MediaBrowser.Api.LiveTvprivate ImageService GetImageService(){return new ImageService(_userManager, _libraryManager, _appPaths, _providerManager, _itemRepo, _dtoService,- _imageProcessor);+ _imageProcessor)+ {+ ResultFactory = ResultFactory,+ Request = Request+ };}}}diff --git a/MediaBrowser.Controller/LiveTv/ProgramInfo.cs b/MediaBrowser.Controller/LiveTv/ProgramInfo.csindex 959f677403..e1382657d7 100644--- a/MediaBrowser.Controller/LiveTv/ProgramInfo.cs+++ b/MediaBrowser.Controller/LiveTv/ProgramInfo.cs@@ -133,6 +133,30 @@ namespace MediaBrowser.Controller.LiveTv/// <value><c>true</c> if this instance is video; otherwise, <c>false</c>.</value>public bool IsVideo { get; set; }+ /// <summary>+ /// Gets or sets a value indicating whether this instance is live.+ /// </summary>+ /// <value><c>true</c> if this instance is live; otherwise, <c>false</c>.</value>+ public bool IsLive { get; set; }++ /// <summary>+ /// Gets or sets a value indicating whether this instance is news.+ /// </summary>+ /// <value><c>true</c> if this instance is news; otherwise, <c>false</c>.</value>+ public bool IsNews { get; set; }++ /// <summary>+ /// Gets or sets a value indicating whether this instance is kids.+ /// </summary>+ /// <value><c>true</c> if this instance is kids; otherwise, <c>false</c>.</value>+ public bool IsKids { get; set; }++ /// <summary>+ /// Gets or sets a value indicating whether this instance is premiere.+ /// </summary>+ /// <value><c>true</c> if this instance is premiere; otherwise, <c>false</c>.</value>+ public bool IsPremiere { get; set; }+public ProgramInfo(){Genres = new List<string>();diff --git a/MediaBrowser.Controller/LiveTv/RecordingInfo.cs b/MediaBrowser.Controller/LiveTv/RecordingInfo.csindex ee3d945942..afdcec1f9c 100644--- a/MediaBrowser.Controller/LiveTv/RecordingInfo.cs+++ b/MediaBrowser.Controller/LiveTv/RecordingInfo.cs@@ -101,6 +101,48 @@ namespace MediaBrowser.Controller.LiveTv/// <value>The audio.</value>public ProgramAudio? Audio { get; set; }+ /// <summary>+ /// Gets or sets a value indicating whether this instance is movie.+ /// </summary>+ /// <value><c>true</c> if this instance is movie; otherwise, <c>false</c>.</value>+ public bool IsMovie { get; set; }++ /// <summary>+ /// Gets or sets a value indicating whether this instance is sports.+ /// </summary>+ /// <value><c>true</c> if this instance is sports; otherwise, <c>false</c>.</value>+ public bool IsSports { get; set; }++ /// <summary>+ /// Gets or sets a value indicating whether this instance is series.+ /// </summary>+ /// <value><c>true</c> if this instance is series; otherwise, <c>false</c>.</value>+ public bool IsSeries { get; set; }++ /// <summary>+ /// Gets or sets a value indicating whether this instance is live.+ /// </summary>+ /// <value><c>true</c> if this instance is live; otherwise, <c>false</c>.</value>+ public bool IsLive { get; set; }++ /// <summary>+ /// Gets or sets a value indicating whether this instance is news.+ /// </summary>+ /// <value><c>true</c> if this instance is news; otherwise, <c>false</c>.</value>+ public bool IsNews { get; set; }++ /// <summary>+ /// Gets or sets a value indicating whether this instance is kids.+ /// </summary>+ /// <value><c>true</c> if this instance is kids; otherwise, <c>false</c>.</value>+ public bool IsKids { get; set; }++ /// <summary>+ /// Gets or sets a value indicating whether this instance is premiere.+ /// </summary>+ /// <value><c>true</c> if this instance is premiere; otherwise, <c>false</c>.</value>+ public bool IsPremiere { get; set; }+/// <summary>/// Gets or sets the official rating./// </summary>diff --git a/MediaBrowser.Model/LiveTv/ProgramInfoDto.cs b/MediaBrowser.Model/LiveTv/ProgramInfoDto.csindex 7a55282ccc..d48bb40874 100644--- a/MediaBrowser.Model/LiveTv/ProgramInfoDto.cs+++ b/MediaBrowser.Model/LiveTv/ProgramInfoDto.cs@@ -139,12 +139,42 @@ namespace MediaBrowser.Model.LiveTv/// <value><c>true</c> if this instance is series; otherwise, <c>false</c>.</value>public bool IsSeries { get; set; }+ /// <summary>+ /// Gets or sets a value indicating whether this instance is live.+ /// </summary>+ /// <value><c>true</c> if this instance is live; otherwise, <c>false</c>.</value>+ public bool IsLive { get; set; }+/// <summary>/// Gets or sets the type./// </summary>/// <value>The type.</value>public string Type { get; set; }+ /// <summary>+ /// Gets or sets the run time ticks.+ /// </summary>+ /// <value>The run time ticks.</value>+ public long? RunTimeTicks { get; set; }++ /// <summary>+ /// Gets or sets a value indicating whether this instance is news.+ /// </summary>+ /// <value><c>true</c> if this instance is news; otherwise, <c>false</c>.</value>+ public bool IsNews { get; set; }++ /// <summary>+ /// Gets or sets a value indicating whether this instance is kids.+ /// </summary>+ /// <value><c>true</c> if this instance is kids; otherwise, <c>false</c>.</value>+ public bool IsKids { get; set; }++ /// <summary>+ /// Gets or sets a value indicating whether this instance is premiere.+ /// </summary>+ /// <value><c>true</c> if this instance is premiere; otherwise, <c>false</c>.</value>+ public bool IsPremiere { get; set; }+public ProgramInfoDto(){Genres = new List<string>();diff --git a/MediaBrowser.Model/LiveTv/RecordingInfoDto.cs b/MediaBrowser.Model/LiveTv/RecordingInfoDto.csindex 16ced7c2ce..e686fd9c43 100644--- a/MediaBrowser.Model/LiveTv/RecordingInfoDto.cs+++ b/MediaBrowser.Model/LiveTv/RecordingInfoDto.cs@@ -96,10 +96,10 @@ namespace MediaBrowser.Model.LiveTvpublic string EpisodeTitle { get; set; }/// <summary>- /// Gets or sets the duration ms.+ /// Gets or sets the run time ticks./// </summary>- /// <value>The duration ms.</value>- public int DurationMs { get; set; }+ /// <value>The run time ticks.</value>+ public long? RunTimeTicks { get; set; }/// <summary>/// Gets or sets the type of the media.@@ -137,6 +137,48 @@ namespace MediaBrowser.Model.LiveTv/// <value>The audio.</value>public ProgramAudio? Audio { get; set; }+ /// <summary>+ /// Gets or sets a value indicating whether this instance is movie.+ /// </summary>+ /// <value><c>true</c> if this instance is movie; otherwise, <c>false</c>.</value>+ public bool IsMovie { get; set; }++ /// <summary>+ /// Gets or sets a value indicating whether this instance is sports.+ /// </summary>+ /// <value><c>true</c> if this instance is sports; otherwise, <c>false</c>.</value>+ public bool IsSports { get; set; }++ /// <summary>+ /// Gets or sets a value indicating whether this instance is series.+ /// </summary>+ /// <value><c>true</c> if this instance is series; otherwise, <c>false</c>.</value>+ public bool IsSeries { get; set; }++ /// <summary>+ /// Gets or sets a value indicating whether this instance is live.+ /// </summary>+ /// <value><c>true</c> if this instance is live; otherwise, <c>false</c>.</value>+ public bool IsLive { get; set; }++ /// <summary>+ /// Gets or sets a value indicating whether this instance is news.+ /// </summary>+ /// <value><c>true</c> if this instance is news; otherwise, <c>false</c>.</value>+ public bool IsNews { get; set; }++ /// <summary>+ /// Gets or sets a value indicating whether this instance is kids.+ /// </summary>+ /// <value><c>true</c> if this instance is kids; otherwise, <c>false</c>.</value>+ public bool IsKids { get; set; }++ /// <summary>+ /// Gets or sets a value indicating whether this instance is premiere.+ /// </summary>+ /// <value><c>true</c> if this instance is premiere; otherwise, <c>false</c>.</value>+ public bool IsPremiere { get; set; }+/// <summary>/// Gets or sets the image tags./// </summary>diff --git a/MediaBrowser.Model/LiveTv/TimerInfoDto.cs b/MediaBrowser.Model/LiveTv/TimerInfoDto.csindex fc7306a627..dfca78e79a 100644--- a/MediaBrowser.Model/LiveTv/TimerInfoDto.cs+++ b/MediaBrowser.Model/LiveTv/TimerInfoDto.cs@@ -112,10 +112,10 @@ namespace MediaBrowser.Model.LiveTvpublic bool IsPostPaddingRequired { get; set; }/// <summary>- /// Gets or sets the duration ms.+ /// Gets or sets the run time ticks./// </summary>- /// <value>The duration ms.</value>- public int DurationMs { get; set; }+ /// <value>The run time ticks.</value>+ public long? RunTimeTicks { get; set; }/// <summary>/// Gets or sets the priority.diff --git a/MediaBrowser.Server.Implementations/LiveTv/LiveTvDtoService.cs b/MediaBrowser.Server.Implementations/LiveTv/LiveTvDtoService.csindex 3d18e9837f..f8f5d02e97 100644--- a/MediaBrowser.Server.Implementations/LiveTv/LiveTvDtoService.cs+++ b/MediaBrowser.Server.Implementations/LiveTv/LiveTvDtoService.cs@@ -52,12 +52,10 @@ namespace MediaBrowser.Server.Implementations.LiveTvExternalSeriesTimerId = info.SeriesTimerId,ServiceName = service.Name,ExternalProgramId = info.ProgramId,- Priority = info.Priority+ Priority = info.Priority,+ RunTimeTicks = (info.EndDate - info.StartDate).Ticks};- var duration = info.EndDate - info.StartDate;- dto.DurationMs = Convert.ToInt32(duration.TotalMilliseconds);-if (!string.IsNullOrEmpty(info.ProgramId)){dto.ProgramId = GetInternalProgramId(service.Name, info.ProgramId).ToString("N");@@ -177,7 +175,15 @@ namespace MediaBrowser.Server.Implementations.LiveTvAudio = info.Audio,IsHD = info.IsHD,ServiceName = service.Name,- Url = info.Url+ Url = info.Url,+ IsMovie = info.IsMovie,+ IsSeries = info.IsSeries,+ IsSports = info.IsSports,+ IsLive = info.IsLive,+ IsNews = info.IsNews,+ IsKids = info.IsKids,+ IsPremiere = info.IsPremiere,+ RunTimeTicks = (info.EndDate - info.StartDate).Ticks};var imageTag = GetImageTag(recording);@@ -192,9 +198,6 @@ namespace MediaBrowser.Server.Implementations.LiveTvdto.UserData = _dtoService.GetUserItemDataDto(_userDataManager.GetUserData(user.Id, recording.GetUserDataKey()));}- var duration = info.EndDate - info.StartDate;- dto.DurationMs = Convert.ToInt32(duration.TotalMilliseconds);-if (!string.IsNullOrEmpty(info.ProgramId)){dto.ProgramId = GetInternalProgramId(service.Name, info.ProgramId).ToString("N");@@ -264,7 +267,12 @@ namespace MediaBrowser.Server.Implementations.LiveTvChannelName = program.ChannelName,IsMovie = program.IsMovie,IsSeries = program.IsSeries,- IsSports = program.IsSports+ IsSports = program.IsSports,+ IsLive = program.IsLive,+ IsNews = program.IsNews,+ IsKids = program.IsKids,+ IsPremiere = program.IsPremiere,+ RunTimeTicks = (program.EndDate - program.StartDate).Ticks};if (user != null)diff --git a/MediaBrowser.WebDashboard/Api/DashboardService.cs b/MediaBrowser.WebDashboard/Api/DashboardService.csindex b5584b1664..d3850017cd 100644--- a/MediaBrowser.WebDashboard/Api/DashboardService.cs+++ b/MediaBrowser.WebDashboard/Api/DashboardService.cs@@ -496,6 +496,7 @@ namespace MediaBrowser.WebDashboard.Api"livetvchannels.js","livetvguide.js","livetvnewrecording.js",+ "livetvprogram.js","livetvrecording.js","livetvrecordings.js","livetvtimer.js",@@ -595,7 +596,8 @@ namespace MediaBrowser.WebDashboard.Api"search.css","pluginupdates.css","remotecontrol.css",- "userimage.css"+ "userimage.css",+ "livetv.css"};var memoryStream = new MemoryStream();diff --git a/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj b/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csprojindex bb635d1ae1..5d3d8c491c 100644--- a/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj+++ b/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj@@ -91,12 +91,18 @@<Content Include="dashboard-ui\css\images\items\detail\tv.png"><CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory></Content>+ <Content Include="dashboard-ui\css\livetv.css">+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>+ </Content><Content Include="dashboard-ui\livetvchannel.html"><CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory></Content><Content Include="dashboard-ui\livetvnewrecording.html"><CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory></Content>+ <Content Include="dashboard-ui\livetvprogram.html">+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>+ </Content><Content Include="dashboard-ui\livetvrecording.html"><CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory></Content>@@ -370,6 +376,9 @@<Content Include="dashboard-ui\scripts\livetvnewrecording.js"><CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory></Content>+ <Content Include="dashboard-ui\scripts\livetvprogram.js">+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>+ </Content><Content Include="dashboard-ui\scripts\livetvrecording.js"><CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory></Content>diff --git a/Nuget/MediaBrowser.Common.Internal.nuspec b/Nuget/MediaBrowser.Common.Internal.nuspecindex a25a1592c9..e84fb011be 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.281</version>+ <version>3.0.284</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.281" />+ <dependency id="MediaBrowser.Common" version="3.0.284" /><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.nuspecindex 4d773e6cbc..67eedbf585 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.281</version>+ <version>3.0.284</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.nuspecindex 0ac9ce4f20..050e3086c9 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.281</version>+ <version>3.0.284</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.281" />+ <dependency id="MediaBrowser.Common" version="3.0.284" /></dependencies></metadata><files>