diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2015-03-14 16:56:50 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2015-03-14 16:56:50 -0400 |
| commit | cde1df51ec093b1d35fd5fa5e89c528ff079a887 (patch) | |
| tree | 5a21b89fb75bae5d55cc5d61fc47a25d9c905115 | |
| parent | b1d2841583079cdfbb9c3c3c63a1f0a15d5259d3 (diff) | |
added live tv items page
6 files changed, 27 insertions, 9 deletions
diff --git a/MediaBrowser.Model/LiveTv/ProgramInfoDto.cs b/MediaBrowser.Model/LiveTv/ProgramInfoDto.cs index f511a7a17..06136459f 100644 --- a/MediaBrowser.Model/LiveTv/ProgramInfoDto.cs +++ b/MediaBrowser.Model/LiveTv/ProgramInfoDto.cs @@ -95,7 +95,13 @@ namespace MediaBrowser.Model.LiveTv /// </summary> /// <value>The official rating.</value> public string OfficialRating { get; set; } - + + /// <summary> + /// Gets or sets the production year. + /// </summary> + /// <value>The production year.</value> + public int? ProductionYear { get; set; } + /// <summary> /// Gets or sets the name of the service. /// </summary> diff --git a/MediaBrowser.Server.Implementations/LiveTv/LiveTvDtoService.cs b/MediaBrowser.Server.Implementations/LiveTv/LiveTvDtoService.cs index 6473d10d6..7f4440fbc 100644 --- a/MediaBrowser.Server.Implementations/LiveTv/LiveTvDtoService.cs +++ b/MediaBrowser.Server.Implementations/LiveTv/LiveTvDtoService.cs @@ -387,7 +387,8 @@ namespace MediaBrowser.Server.Implementations.LiveTv IsPremiere = item.IsPremiere, Type = "Program", MediaType = item.MediaType, - ServerId = _appHost.SystemId + ServerId = _appHost.SystemId, + ProductionYear = item.ProductionYear }; if (item.EndDate.HasValue) diff --git a/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs b/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs index acff25e96..6b66ed9b8 100644 --- a/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs +++ b/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs @@ -685,19 +685,20 @@ namespace MediaBrowser.Server.Implementations.LiveTv programs = _libraryManager.Sort(programs, user, query.SortBy, query.SortOrder ?? SortOrder.Ascending) .Cast<LiveTvProgram>(); + var programList = programs.ToList(); + IEnumerable<LiveTvProgram> returnPrograms = programList; + if (query.StartIndex.HasValue) { - programs = programs.Skip(query.StartIndex.Value); + returnPrograms = returnPrograms.Skip(query.StartIndex.Value); } if (query.Limit.HasValue) { - programs = programs.Take(query.Limit.Value); + returnPrograms = returnPrograms.Take(query.Limit.Value); } - var programList = programs.ToList(); - - var returnArray = programList + var returnArray = returnPrograms .Select(i => { var channel = GetChannel(i); @@ -713,7 +714,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv var result = new QueryResult<ProgramInfoDto> { Items = returnArray, - TotalRecordCount = returnArray.Length + TotalRecordCount = programList.Count }; return result; diff --git a/MediaBrowser.Server.Implementations/Localization/Server/server.json b/MediaBrowser.Server.Implementations/Localization/Server/server.json index e5b1e5a8b..24bccaf1d 100644 --- a/MediaBrowser.Server.Implementations/Localization/Server/server.json +++ b/MediaBrowser.Server.Implementations/Localization/Server/server.json @@ -1391,5 +1391,8 @@ "HeaderThisUserIsCurrentlyDisabled": "This user is currently disabled", "MessageReenableUser": "See below to reenable", "LabelEnableInternetMetadataForTvPrograms": "Download internet metadata for:", - "OptionTVMovies": "TV Movies" + "OptionTVMovies": "TV Movies", + "HeaderUpcomingMovies": "Upcoming Movies", + "HeaderUpcomingPrograms": "Upcoming Programs", + "ButtonMoreItems": "More..." } diff --git a/MediaBrowser.WebDashboard/Api/PackageCreator.cs b/MediaBrowser.WebDashboard/Api/PackageCreator.cs index 2807b631c..ac94f680b 100644 --- a/MediaBrowser.WebDashboard/Api/PackageCreator.cs +++ b/MediaBrowser.WebDashboard/Api/PackageCreator.cs @@ -429,6 +429,7 @@ namespace MediaBrowser.WebDashboard.Api "livetvchannel.js", "livetvchannels.js", "livetvguide.js", + "livetvitems.js", "livetvnewrecording.js", "livetvprogram.js", "livetvrecording.js", diff --git a/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj b/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj index c02eb5848..d7c354da3 100644 --- a/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj +++ b/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj @@ -120,6 +120,9 @@ <Content Include="dashboard-ui\kids.html">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
+ <Content Include="dashboard-ui\livetvitems.html">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </Content>
<Content Include="dashboard-ui\mysync.html">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
@@ -138,6 +141,9 @@ <Content Include="dashboard-ui\scripts\kids.js">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
+ <Content Include="dashboard-ui\scripts\livetvitems.js">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </Content>
<Content Include="dashboard-ui\scripts\selectserver.js">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
|
