1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

added suggested live tv page

This commit is contained in:
Luke Pulverenti 2014-01-12 10:58:47 -05:00
parent 90806d583b
commit e36d514368
7 changed files with 93 additions and 26 deletions

View file

@ -438,7 +438,7 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout, wi
options = options || {};
if (options.channelIds) {
if (options.channelIds && options.channelIds.length > 1800) {
return self.ajax({
type: "POST",
@ -458,6 +458,17 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout, wi
}
};
self.getLiveTvRecommendedPrograms = function (options) {
options = options || {};
return self.ajax({
type: "GET",
url: self.getUrl("LiveTv/Programs/Recommended", options),
dataType: "json"
});
};
self.getLiveTvRecordings = function (options) {
var url = self.getUrl("LiveTv/Recordings", options || {});

View file

@ -76,7 +76,6 @@
height: auto;
width: 270px;
bottom: 45px;
left: -290px;
border: 1px solid #444;
background: #000;
}
@ -173,10 +172,6 @@ input[type="range"]::-ms-fill-upper {
.positionSliderContainer {
width: 50px;
}
.itemVideo:not(.fullscreenVideo) {
left: -250px;
}
}
@media all and (max-width: 750px) {
@ -291,28 +286,16 @@ input[type="range"]::-ms-fill-upper {
.positionSliderContainer {
width: 300px;
}
.itemVideo {
left: -420px;
}
}
@media (min-width: 1700px) {
.itemVideo:not(.fullscreenVideo) {
width: 500px;
}
.itemVideo {
left: -420px;
}
}
@media (min-width: 2400px) {
.itemVideo:not(.fullscreenVideo) {
width: 550px;
}
.itemVideo {
left: -400px;
}
}

View file

@ -14,6 +14,22 @@
<a href="livetvseriestimers.html">Series</a>
</div>
<div data-role="content">
<table class="ehsContent">
<tr>
<td>
<div id="activePrograms">
<h1 class="listHeader">What's On</h1>
<div class="activeProgramItems"></div>
<br />
</div>
<div id="upcomingPrograms">
<h1 class="listHeader">Upcoming TV</h1>
<div class="upcomingProgramItems"></div>
<br />
</div>
</td>
</tr>
</table>
</div>
</div>
</body>

View file

@ -105,11 +105,6 @@
reload(page);
}).on('pagehide', "#liveTvRecordingsPage", function () {
var page = this;
$('.recordingGroupCollapsible', page).off('collapsibleexpand.lazyload');
});
})(jQuery, document, ApiClient);

View file

@ -1 +1,61 @@

(function ($, document, apiClient) {
function reload(page) {
Dashboard.showLoadingMsg();
apiClient.getLiveTvRecommendedPrograms({
userId: Dashboard.getCurrentUserId(),
IsAiring: true,
limit: 10
}).done(function (result) {
var html = LibraryBrowser.getPosterViewHtml({
items: result.Items,
shape: "square",
showTitle: true,
showParentTitle: true,
overlayText: true,
coverImage: true
});
$('.activeProgramItems', page).html(html);
});
apiClient.getLiveTvRecommendedPrograms({
userId: Dashboard.getCurrentUserId(),
IsAiring: false,
HasAired: false,
limit: 10
}).done(function (result) {
var html = LibraryBrowser.getPosterViewHtml({
items: result.Items,
shape: "square",
showTitle: true,
showParentTitle: true,
overlayText: true,
coverImage: true
});
$('.upcomingProgramItems', page).html(html);
});
}
$(document).on('pagebeforeshow', "#liveTvSuggestedPage", function () {
var page = this;
reload(page);
});
})(jQuery, document, ApiClient);

View file

@ -1319,6 +1319,9 @@ $(function () {
footerHtml += '<button id="previousTrackButton" class="mediaButton" title="Previous Track" type="button" onclick="MediaPlayer.previousTrack();" data-icon="previous-track" data-iconpos="notext" data-inline="true">Previous Track</button>';
footerHtml += '<button id="playButton" class="mediaButton" title="Play" type="button" onclick="MediaPlayer.unpause();" data-icon="play" data-iconpos="notext" data-inline="true">Play</button>';
footerHtml += '<button id="pauseButton" class="mediaButton" title="Pause" type="button" onclick="MediaPlayer.pause();" data-icon="pause" data-iconpos="notext" data-inline="true">Pause</button>';
footerHtml += '<div id="mediaElement"></div>';
footerHtml += '<button id="stopButton" class="mediaButton" title="Stop" type="button" onclick="MediaPlayer.stop();" data-icon="stop" data-iconpos="notext" data-inline="true">Stop</button>';
footerHtml += '<button id="nextTrackButton" class="mediaButton" title="Next Track" type="button" onclick="MediaPlayer.nextTrack();" data-icon="next-track" data-iconpos="notext" data-inline="true">Next Track</button>';
@ -1327,7 +1330,6 @@ $(function () {
footerHtml += '</div>';
footerHtml += '<div class="currentTime"></div>';
footerHtml += '<div id="mediaElement"></div>';
footerHtml += '<div class="nowPlayingMediaInfo"></div>';
footerHtml += '<button id="muteButton" class="mediaButton" title="Mute" type="button" onclick="MediaPlayer.mute();" data-icon="audio" data-iconpos="notext" data-inline="true">Mute</button>';

View file

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="MediaBrowser.ApiClient.Javascript" version="3.0.224" targetFramework="net45" />
<package id="MediaBrowser.ApiClient.Javascript" version="3.0.226" targetFramework="net45" />
</packages>