aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2013-12-20 15:09:49 -0500
committerLuke Pulverenti <luke.pulverenti@gmail.com>2013-12-20 15:09:49 -0500
commit594ed864c6a752c6f656cee464ede9cf2473ceaf (patch)
tree1c65edc55a83e8583bc5e6ca6ac5c7be6ec37439
parent33e1e5367317c70588373fc5a1c1f619c73c9a80 (diff)
live tv updates
-rw-r--r--MediaBrowser.Api/LiveTv/LiveTvImageService.cs6
-rw-r--r--MediaBrowser.Controller/LiveTv/ProgramInfo.cs24
-rw-r--r--MediaBrowser.Controller/LiveTv/RecordingInfo.cs42
-rw-r--r--MediaBrowser.Model/LiveTv/ProgramInfoDto.cs30
-rw-r--r--MediaBrowser.Model/LiveTv/RecordingInfoDto.cs48
-rw-r--r--MediaBrowser.Model/LiveTv/TimerInfoDto.cs6
-rw-r--r--MediaBrowser.Server.Implementations/LiveTv/LiveTvDtoService.cs26
-rw-r--r--MediaBrowser.WebDashboard/Api/DashboardService.cs4
-rw-r--r--MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj9
-rw-r--r--Nuget/MediaBrowser.Common.Internal.nuspec4
-rw-r--r--Nuget/MediaBrowser.Common.nuspec2
-rw-r--r--Nuget/MediaBrowser.Server.Core.nuspec4
12 files changed, 183 insertions, 22 deletions
diff --git a/MediaBrowser.Api/LiveTv/LiveTvImageService.cs b/MediaBrowser.Api/LiveTv/LiveTvImageService.cs
index 84926e164..f58d4a533 100644
--- a/MediaBrowser.Api/LiveTv/LiveTvImageService.cs
+++ b/MediaBrowser.Api/LiveTv/LiveTvImageService.cs
@@ -178,7 +178,11 @@ namespace MediaBrowser.Api.LiveTv
private 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.cs
index 959f67740..e1382657d 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.cs
index ee3d94594..afdcec1f9 100644
--- a/MediaBrowser.Controller/LiveTv/RecordingInfo.cs
+++ b/MediaBrowser.Controller/LiveTv/RecordingInfo.cs
@@ -102,6 +102,48 @@ namespace MediaBrowser.Controller.LiveTv
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>
/// <value>The official rating.</value>
diff --git a/MediaBrowser.Model/LiveTv/ProgramInfoDto.cs b/MediaBrowser.Model/LiveTv/ProgramInfoDto.cs
index 7a55282cc..d48bb4087 100644
--- a/MediaBrowser.Model/LiveTv/ProgramInfoDto.cs
+++ b/MediaBrowser.Model/LiveTv/ProgramInfoDto.cs
@@ -140,11 +140,41 @@ namespace MediaBrowser.Model.LiveTv
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.cs
index 16ced7c2c..e686fd9c4 100644
--- a/MediaBrowser.Model/LiveTv/RecordingInfoDto.cs
+++ b/MediaBrowser.Model/LiveTv/RecordingInfoDto.cs
@@ -96,10 +96,10 @@ namespace MediaBrowser.Model.LiveTv
public 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.
@@ -138,6 +138,48 @@ namespace MediaBrowser.Model.LiveTv
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>
/// <value>The image tags.</value>
diff --git a/MediaBrowser.Model/LiveTv/TimerInfoDto.cs b/MediaBrowser.Model/LiveTv/TimerInfoDto.cs
index fc7306a62..dfca78e79 100644
--- a/MediaBrowser.Model/LiveTv/TimerInfoDto.cs
+++ b/MediaBrowser.Model/LiveTv/TimerInfoDto.cs
@@ -112,10 +112,10 @@ namespace MediaBrowser.Model.LiveTv
public 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.cs
index 3d18e9837..f8f5d02e9 100644
--- a/MediaBrowser.Server.Implementations/LiveTv/LiveTvDtoService.cs
+++ b/MediaBrowser.Server.Implementations/LiveTv/LiveTvDtoService.cs
@@ -52,12 +52,10 @@ namespace MediaBrowser.Server.Implementations.LiveTv
ExternalSeriesTimerId = 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.LiveTv
Audio = 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.LiveTv
dto.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.LiveTv
ChannelName = 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.cs
index b5584b166..d3850017c 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.csproj
index bb635d1ae..5d3d8c491 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.nuspec
index a25a1592c..e84fb011b 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.nuspec
index 4d773e6cb..67eedbf58 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.nuspec
index 0ac9ce4f2..050e3086c 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>