mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-18 03:18:19 -07:00
updated mono build
This commit is contained in:
parent
f7b3f46413
commit
c93de38f39
@ -35,6 +35,8 @@
|
||||
padding: 0;
|
||||
border-spacing: 0;
|
||||
border-collapse: collapse;
|
||||
margin: 0 auto;
|
||||
max-width: 1540px;
|
||||
}
|
||||
|
||||
.ehsContent td {
|
||||
@ -42,6 +44,10 @@
|
||||
border-spacing: 0;
|
||||
}
|
||||
|
||||
.squareEhsContent {
|
||||
max-width: 1420px;
|
||||
}
|
||||
|
||||
.detailPageContent {
|
||||
margin: 0 auto;
|
||||
padding: 0;
|
||||
@ -330,7 +336,7 @@ a.itemTag:hover {
|
||||
}
|
||||
|
||||
.lnkPreviousItem {
|
||||
left: 210px;
|
||||
left: 10px;
|
||||
}
|
||||
|
||||
.lnkNextItem {
|
||||
@ -474,7 +480,6 @@ a.itemTag:hover {
|
||||
.libraryPanelHeader span {
|
||||
color: #fff;
|
||||
vertical-align: middle;
|
||||
font-size: 16px;
|
||||
font-weight: 300;
|
||||
}
|
||||
|
||||
@ -498,12 +503,6 @@ a.itemTag:hover {
|
||||
font-family: 'Open Sans', Arial, Helvetica, sans-serif;
|
||||
}
|
||||
|
||||
.desktopHomeLink img {
|
||||
height: 24px;
|
||||
vertical-align: middle;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.detailImageProgressContainer {
|
||||
position: absolute;
|
||||
bottom: 10px;
|
||||
@ -856,6 +855,7 @@ a.itemTag:hover {
|
||||
}
|
||||
|
||||
.itemsContainer {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.timelineItemsContainer {
|
||||
@ -1130,11 +1130,11 @@ a.itemTag:hover {
|
||||
padding: 1em 1em 1em 170px;
|
||||
}
|
||||
|
||||
.spotlightContentInner p {
|
||||
max-height: 130px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.spotlightContentInner p {
|
||||
max-height: 130px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.rightSpotlightContent .spotlightContentInner {
|
||||
padding: 195px 1em 1em 1em;
|
||||
|
@ -6,22 +6,6 @@
|
||||
padding-top: 102px !important;
|
||||
}
|
||||
|
||||
.desktopLibraryMenu {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
z-index: 1001;
|
||||
top: 53px;
|
||||
width: 200px;
|
||||
min-height: 100px;
|
||||
border-bottom-right-radius: 5px;
|
||||
padding-bottom: 10px;
|
||||
background-color: rgba(0,0,0,.6);
|
||||
}
|
||||
|
||||
.metadataEditorPage .desktopLibraryMenu {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.libraryMenuDivider {
|
||||
height: 1px;
|
||||
background: #333;
|
||||
@ -52,7 +36,8 @@
|
||||
}
|
||||
|
||||
.viewMenuLink:hover {
|
||||
background-color: #555;
|
||||
background-color: #52B54B;
|
||||
color: #fff!important;
|
||||
}
|
||||
|
||||
.viewMenuBar .btnCurrentUser {
|
||||
@ -142,10 +127,6 @@
|
||||
background-color: rgba(51,136,204,.8)!important;
|
||||
}
|
||||
|
||||
.ui-panel.ui-body-b {
|
||||
background-color: #181818;
|
||||
}
|
||||
|
||||
.libraryViewNav {
|
||||
height: 48px;
|
||||
overflow: hidden;
|
||||
@ -158,6 +139,10 @@
|
||||
background-color: #181818;
|
||||
}
|
||||
|
||||
.ui-panel.ui-body-b {
|
||||
background-color: #181818;
|
||||
}
|
||||
|
||||
.libraryViewNavInner {
|
||||
text-align: center;
|
||||
font-size: 14px;
|
||||
@ -206,38 +191,22 @@
|
||||
|
||||
@media all and (min-width: 1099px) {
|
||||
|
||||
.libraryMenuButton {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.libraryPage:not(.itemDetailPage):not(.metadataEditorPage) {
|
||||
/*.type-home {
|
||||
left: 215px !important;
|
||||
width: auto !important;
|
||||
right: 0 !important;
|
||||
}
|
||||
}*/
|
||||
|
||||
.viewSettings {
|
||||
padding-left: .4em;
|
||||
}
|
||||
}
|
||||
|
||||
@media all and (max-width: 1099px) {
|
||||
@media all and (max-width: 459px) {
|
||||
|
||||
.desktopHomeLink {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.desktopLibraryMenu {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.viewSettings {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.itemsContainer {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
@media all and (min-width: 750px) {
|
||||
|
@ -27,16 +27,16 @@
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div style="position: relative; display: inline-block; text-align: left; max-width:100%;">
|
||||
<div style="position: relative; margin: 0 auto; display: inline-block; text-align: left; max-width: 100%;">
|
||||
|
||||
<div style="white-space:nowrap;">
|
||||
<div style="white-space: nowrap;">
|
||||
<div class="channelTimeslotHeader"> </div>
|
||||
<div class="timeslotHeaders"></div>
|
||||
</div>
|
||||
|
||||
<div style="white-space:nowrap;">
|
||||
<div class="channelList"></div>
|
||||
<div class="programGrid"></div>
|
||||
<div style="white-space: nowrap;">
|
||||
<div class="channelList"></div>
|
||||
<div class="programGrid"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -14,8 +14,10 @@
|
||||
<a href="livetvseriestimers.html">${TabSeries}</a>
|
||||
</div>
|
||||
<div data-role="content">
|
||||
<h1 class="listName" style="text-align: center;"></h1>
|
||||
<div class="viewSettings">
|
||||
|
||||
<h1 class="listName" style="margin: 0 1em 0 0; display: inline-block; vertical-align: middle;"></h1>
|
||||
|
||||
<div class="viewControls">
|
||||
</div>
|
||||
<div class="listTopPaging">
|
||||
|
@ -14,7 +14,7 @@
|
||||
<a href="livetvseriestimers.html">${TabSeries}</a>
|
||||
</div>
|
||||
<div data-role="content">
|
||||
<table class="ehsContent">
|
||||
<table class="ehsContent squareEhsContent">
|
||||
<tr>
|
||||
<td>
|
||||
<div id="activePrograms">
|
||||
|
@ -15,7 +15,7 @@
|
||||
<a href="musicvideos.html">${TabMusicVideos}</a>
|
||||
</div>
|
||||
<div data-role="content">
|
||||
<table class="ehsContent">
|
||||
<table class="ehsContent squareEhsContent">
|
||||
<tr>
|
||||
<td>
|
||||
<h1 class="listHeader">${HeaderLatestAlbums}</h1>
|
||||
|
@ -36,7 +36,7 @@
|
||||
<div data-role="controlgroup" data-type="horizontal">
|
||||
<button data-icon="volume-up" data-inline="true" data-iconpos="notext" title="${ButtonVolumeUp}" class="btnCommand" data-command="VolumeUp">${ButtonVolumeUp}</button>
|
||||
<button data-icon="volume-off" data-inline="true" data-iconpos="notext" title="${ButtonMute}" class="btnCommand" data-command="ToggleMute">${ButtonMute}</button>
|
||||
<button data-icon="grid" data-inline="true" data-iconpos="notext" title="${ButtonOsd}" class="btnCommand" data-command="ToggleOsdMenu">${ButtonOsd}</button>
|
||||
<button data-icon="grid" data-inline="true" data-iconpos="notext" title="${ButtonOsd}" class="btnCommand videoButton" data-command="ToggleOsdMenu">${ButtonOsd}</button>
|
||||
<button data-icon="expand" data-inline="true" data-iconpos="notext" title="${ButtonFullscreen}" class="btnToggleFullscreen videoButton btnPlayStateCommand" data-command="ToggleFullscreen">${ButtonFullscreen}</button>
|
||||
</div>
|
||||
<div data-role="controlgroup" data-type="horizontal">
|
||||
|
@ -128,7 +128,7 @@
|
||||
|
||||
if (ApiClient.isWebSocketOpen()) {
|
||||
ApiClient.sendWebSocketMessage("SessionsStart", "0,1500");
|
||||
ApiClient.sendWebSocketMessage("ScheduledTasksInfoStart", "0,1500");
|
||||
ApiClient.sendWebSocketMessage("ScheduledTasksInfoStart", "0,1000");
|
||||
}
|
||||
},
|
||||
|
||||
@ -257,15 +257,10 @@
|
||||
|
||||
html += '</div>';
|
||||
|
||||
if (nowPlayingItem) {
|
||||
var nowPlayingName = DashboardPage.getNowPlayingName(connection);
|
||||
|
||||
var nowPlayingName = DashboardPage.getNowPlayingName(connection);
|
||||
|
||||
html += '<div class="sessionNowPlayingInfo" data-imgsrc="' + nowPlayingName.image + '">';
|
||||
html += nowPlayingName.html;
|
||||
} else {
|
||||
html += '<div class="sessionNowPlayingInfo">';
|
||||
}
|
||||
html += '<div class="sessionNowPlayingInfo" data-imgsrc="' + nowPlayingName.image + '">';
|
||||
html += nowPlayingName.html;
|
||||
html += '</div>';
|
||||
|
||||
if (nowPlayingItem && nowPlayingItem.RunTimeTicks) {
|
||||
|
@ -782,51 +782,39 @@
|
||||
|
||||
cssClass = options.centerText ? "posterItemText posterItemTextCentered" : "posterItemText";
|
||||
|
||||
var lines = [];
|
||||
|
||||
if (options.showParentTitle) {
|
||||
|
||||
html += "<div class='" + cssClass + "'>";
|
||||
html += item.EpisodeTitle ? item.Name : (item.SeriesName || item.Album || item.AlbumArtist || item.GameSystem || " ");
|
||||
html += "</div>";
|
||||
lines.push(item.EpisodeTitle ? item.Name : (item.SeriesName || item.Album || item.AlbumArtist || item.GameSystem || ""));
|
||||
}
|
||||
|
||||
if (options.showTitle || forceName) {
|
||||
|
||||
html += "<div class='" + cssClass + " posterItemName'>";
|
||||
html += name;
|
||||
html += "</div>";
|
||||
lines.push(name);
|
||||
}
|
||||
|
||||
if (options.showItemCounts) {
|
||||
|
||||
var itemCountHtml = LibraryBrowser.getItemCountsHtml(options, item);
|
||||
|
||||
if (item.Type == "Person" && !itemCountHtml) {
|
||||
itemCountHtml = " ";
|
||||
}
|
||||
|
||||
if (itemCountHtml) {
|
||||
html += "<div class='" + cssClass + "'>";
|
||||
html += itemCountHtml;
|
||||
html += "</div>";
|
||||
}
|
||||
lines.push(itemCountHtml);
|
||||
}
|
||||
|
||||
if (options.showPremiereDate && item.PremiereDate) {
|
||||
|
||||
try {
|
||||
|
||||
//var date = parseISO8601Date(item.PremiereDate, { toLocal: true });
|
||||
|
||||
html += "<div class='posterItemText'>";
|
||||
html += LibraryBrowser.getPremiereDateText(item);
|
||||
html += "</div>";
|
||||
lines.push(LibraryBrowser.getPremiereDateText(item));
|
||||
|
||||
} catch (err) {
|
||||
lines.push('');
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
html += LibraryBrowser.getPosterItemTextLines(lines, cssClass, !options.overlayText);
|
||||
|
||||
if (options.overlayText) {
|
||||
|
||||
if (progressHtml) {
|
||||
@ -847,6 +835,35 @@
|
||||
return html;
|
||||
},
|
||||
|
||||
getPosterItemTextLines: function (lines, cssClass, forceLines) {
|
||||
|
||||
var html = '';
|
||||
|
||||
var valid = 0;
|
||||
var i, length;
|
||||
|
||||
for (i = 0, length = lines.length; i < length; i++) {
|
||||
|
||||
var text = lines[i];
|
||||
|
||||
if (text) {
|
||||
html += "<div class='" + cssClass + "'>";
|
||||
html += text;
|
||||
html += "</div>";
|
||||
valid++;
|
||||
}
|
||||
}
|
||||
|
||||
if (forceLines) {
|
||||
while (valid < length) {
|
||||
html += "<div class='" + cssClass + "'> </div>";
|
||||
valid++;
|
||||
}
|
||||
}
|
||||
|
||||
return html;
|
||||
},
|
||||
|
||||
isYesterday: function (date1) {
|
||||
|
||||
var today = new Date();
|
||||
|
@ -18,16 +18,12 @@
|
||||
|
||||
var html = '<div class="viewMenuBar ui-bar-b">';
|
||||
|
||||
html += '<button type="button" data-icon="bars" data-iconpos="notext" data-inline="true" title="Menu" class="libraryMenuButton" onclick="LibraryMenu.showLibraryMenu();">Menu</button>';
|
||||
html += '<button type="button" data-icon="bars" data-iconpos="notext" data-inline="true" title="Menu" class="libraryMenuButton" onclick="LibraryMenu.showLibraryMenu();" data-corners="false">Menu</button>';
|
||||
|
||||
html += '<a class="desktopHomeLink" href="index.html"><img src="css/images/mblogoicon.png" /><span>MEDIA</span><span class="mediaBrowserAccent">BROWSER</span></a>';
|
||||
html += '<a class="desktopHomeLink" href="index.html"><span>MEDIA</span><span class="mediaBrowserAccent">BROWSER</span></a>';
|
||||
|
||||
html += '<a class="viewMenuRemoteControlButton" href="nowplaying.html" data-role="button" data-icon="play" data-inline="true" data-iconpos="notext" title="Now Playing">Remote Control</a>';
|
||||
|
||||
if (user.Configuration.IsAdministrator) {
|
||||
html += '<a class="editorMenuLink" href="edititemmetadata.html" data-role="button" data-icon="edit" data-inline="true" data-iconpos="notext" title="Metadata Manager">Metadata Manager</a>';
|
||||
}
|
||||
|
||||
html += '<div class="viewMenuSecondary">';
|
||||
|
||||
html += '<button id="btnCast" class="btnCast btnDefaultCast" type="button" data-role="none"></button>';
|
||||
@ -59,14 +55,11 @@
|
||||
|
||||
html += '</div>';
|
||||
|
||||
html += '<div class="desktopLibraryMenu">';
|
||||
html += '</div>';
|
||||
|
||||
var $page = $(page);
|
||||
|
||||
$page.prepend(html);
|
||||
|
||||
$('.viewMenuBar,.desktopLibraryMenu', page).trigger('create');
|
||||
$('.viewMenuBar', page).trigger('create');
|
||||
|
||||
$page.trigger('headercreated');
|
||||
}
|
||||
@ -76,7 +69,7 @@
|
||||
return LibraryBrowser.getHref(item);
|
||||
}
|
||||
|
||||
function getViewsHtml(userId, counts, items, liveTvInfo) {
|
||||
function getViewsHtml(user, counts, items, liveTvInfo) {
|
||||
|
||||
var html = '';
|
||||
|
||||
@ -89,7 +82,7 @@
|
||||
}).join('');
|
||||
|
||||
var showChannels = counts.ChannelCount;
|
||||
var showLiveTv = liveTvInfo.EnabledUsers.indexOf(userId) != -1;
|
||||
var showLiveTv = liveTvInfo.EnabledUsers.indexOf(user.Id) != -1;
|
||||
|
||||
if (showChannels || showLiveTv) {
|
||||
html += '<div class="libraryMenuDivider"></div>';
|
||||
@ -103,6 +96,11 @@
|
||||
html += '<a class="viewMenuLink viewMenuTextLink lnkMediaFolder tvshowsViewMenu" data-itemid="livetv" href="livetvsuggested.html">Live TV</a>';
|
||||
}
|
||||
|
||||
if (user.Configuration.IsAdministrator) {
|
||||
html += '<div class="libraryMenuDivider"></div>';
|
||||
html += '<a class="viewMenuLink viewMenuTextLink lnkMediaFolder tvshowsViewMenu" data-itemid="editor" href="edititemmetadata.html">Metadata Manager</a>';
|
||||
}
|
||||
|
||||
return html;
|
||||
}
|
||||
|
||||
@ -110,21 +108,24 @@
|
||||
|
||||
ensurePromises();
|
||||
|
||||
$.when(itemCountsPromise, itemsPromise, liveTvInfoPromise).done(function (response1, response2, response3) {
|
||||
var userPromise = Dashboard.getCurrentUser();
|
||||
|
||||
$.when(itemCountsPromise, itemsPromise, liveTvInfoPromise, userPromise).done(function (response1, response2, response3, response4) {
|
||||
|
||||
var counts = response1[0];
|
||||
var items = response2[0].Items;
|
||||
var liveTvInfo = response3[0];
|
||||
var user = response4[0];
|
||||
|
||||
var page = $.mobile.activePage;
|
||||
|
||||
var panel = getLibraryMenu(page, counts, items, liveTvInfo);
|
||||
var panel = getLibraryMenu(page, user, counts, items, liveTvInfo);
|
||||
|
||||
$(panel).panel('toggle');
|
||||
});
|
||||
}
|
||||
|
||||
function getLibraryMenu(page, counts, items, liveTvInfo) {
|
||||
function getLibraryMenu(page, user, counts, items, liveTvInfo) {
|
||||
|
||||
var panel = $('#libraryPanel', page);
|
||||
|
||||
@ -137,7 +138,7 @@
|
||||
html += '<p class="libraryPanelHeader"><a href="index.html" class="imageLink"><img src="css/images/mblogoicon.png" /><span>MEDIA</span><span class="mediaBrowserAccent">BROWSER</span></a></p>';
|
||||
|
||||
html += '<div style="margin: 0 -1em;">';
|
||||
html += getViewsHtml(Dashboard.getCurrentUserId(), counts, items, liveTvInfo);
|
||||
html += getViewsHtml(user, counts, items, liveTvInfo);
|
||||
html += '</div>';
|
||||
|
||||
html += '</div>';
|
||||
@ -247,20 +248,7 @@
|
||||
|
||||
renderHeader(page, user);
|
||||
|
||||
ensurePromises();
|
||||
|
||||
$.when(itemCountsPromise, itemsPromise, liveTvInfoPromise).done(function (response1, response2, response3) {
|
||||
|
||||
var counts = response1[0];
|
||||
var items = response2[0].Items;
|
||||
var liveTvInfo = response3[0];
|
||||
|
||||
var html = getViewsHtml(user.Id, counts, items, liveTvInfo);
|
||||
$('.desktopLibraryMenu', page).html(html);
|
||||
|
||||
updateLibraryNavLinks(page);
|
||||
|
||||
});
|
||||
updateLibraryNavLinks(page);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -241,13 +241,13 @@
|
||||
pollTasks(page);
|
||||
|
||||
if (ApiClient.isWebSocketOpen()) {
|
||||
ApiClient.sendWebSocketMessage("ScheduledTasksInfoStart", "1500,1500");
|
||||
ApiClient.sendWebSocketMessage("ScheduledTasksInfoStart", "1000,1000");
|
||||
}
|
||||
|
||||
$(ApiClient).on("websocketmessage", onWebSocketMessage).on('websocketopen', function () {
|
||||
|
||||
if (ApiClient.isWebSocketOpen()) {
|
||||
ApiClient.sendWebSocketMessage("ScheduledTasksInfoStart", "1500,1500");
|
||||
ApiClient.sendWebSocketMessage("ScheduledTasksInfoStart", "1000,1000");
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -411,13 +411,13 @@ $(document).on('pageshow', ".mediaLibraryPage", MediaLibraryPage.onPageShow);
|
||||
pollTasks(page);
|
||||
|
||||
if (ApiClient.isWebSocketOpen()) {
|
||||
ApiClient.sendWebSocketMessage("ScheduledTasksInfoStart", "1500,1500");
|
||||
ApiClient.sendWebSocketMessage("ScheduledTasksInfoStart", "1000,1000");
|
||||
}
|
||||
|
||||
$(ApiClient).on("websocketmessage", onWebSocketMessage).on('websocketopen', function () {
|
||||
|
||||
if (ApiClient.isWebSocketOpen()) {
|
||||
ApiClient.sendWebSocketMessage("ScheduledTasksInfoStart", "1500,1500");
|
||||
ApiClient.sendWebSocketMessage("ScheduledTasksInfoStart", "1000,1000");
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
var lastPlayerState;
|
||||
var isPositionSliderActive;
|
||||
|
||||
function showAudioMenu(page, item) {
|
||||
function showAudioMenu(page, item, currentIndex) {
|
||||
|
||||
var streams = (item.MediaStreams || []).filter(function (i) {
|
||||
|
||||
@ -17,7 +17,13 @@
|
||||
|
||||
html += streams.map(function (s) {
|
||||
|
||||
var streamHtml = '<li><a data-index="' + s.Index + '" href="#" style="font-size:15px;" class="lnkTrackOption"><h3>';
|
||||
var streamHtml = '<li><a data-index="' + s.Index + '" href="#" class="lnkTrackOption">';
|
||||
|
||||
streamHtml += '<h3>';
|
||||
|
||||
if (s.Index == currentIndex) {
|
||||
streamHtml += '<img src="css/images/checkmarkgreen.png" style="width:18px;border-radius:3px;margin-right:.5em;vertical-align:top;" />';
|
||||
}
|
||||
|
||||
streamHtml += (s.Codec || '').toUpperCase();
|
||||
|
||||
@ -53,12 +59,14 @@
|
||||
|
||||
html += '</ul>';
|
||||
|
||||
$('.trackList', elem).html(html).listview('refresh').trigger('create');
|
||||
$('.trackList', elem).html(html).trigger('create');
|
||||
|
||||
elem.popup('open');
|
||||
}
|
||||
|
||||
function showSubtitleMenu(page, item) {
|
||||
function showSubtitleMenu(page, item, currentIndex) {
|
||||
|
||||
var currentStreamImage = '<img src="css/images/checkmarkgreen.png" style="width:18px;border-radius:3px;margin-right:.5em;vertical-align:top;" />';
|
||||
|
||||
var streams = (item.MediaStreams || []).filter(function (i) {
|
||||
|
||||
@ -67,13 +75,26 @@
|
||||
|
||||
var elem = $('#popupSubtitleTrackMenu', page);
|
||||
|
||||
var html = '<li data-role="list-divider">Select Subtitles</li>';
|
||||
var html = '<ul data-role="listview" data-inset="true" style="min-width: 210px;"><li data-role="list-divider">Select Subtitles</li>';
|
||||
|
||||
html += '<li><a href="#" style="font-size:15px;" data-index="-1" class="lnkTrackOption"><h3>Off</h3></a></li>';
|
||||
html += '<li><a href="#" data-index="-1" class="lnkTrackOption"><h3>';
|
||||
|
||||
if (currentIndex == null) {
|
||||
html += currentStreamImage;
|
||||
}
|
||||
|
||||
html += 'Off';
|
||||
html += '</h3></a></li>';
|
||||
|
||||
html += streams.map(function (s) {
|
||||
|
||||
var streamHtml = '<li><a data-index="' + s.Index + '" href="#" style="font-size:15px;" class="lnkTrackOption"><h3>';
|
||||
var streamHtml = '<li><a data-index="' + s.Index + '" href="#" class="lnkTrackOption">';
|
||||
|
||||
streamHtml += '<h3>';
|
||||
|
||||
if (s.Index == currentIndex) {
|
||||
streamHtml += currentStreamImage;
|
||||
}
|
||||
|
||||
streamHtml += (s.Language || 'Unknown language');
|
||||
|
||||
@ -97,7 +118,9 @@
|
||||
|
||||
}).join('');
|
||||
|
||||
$('.trackList', elem).html(html).listview('refresh').trigger('create');
|
||||
html += '</ul>';
|
||||
|
||||
$('.trackList', elem).html(html).trigger('create');
|
||||
|
||||
elem.popup('open');
|
||||
}
|
||||
@ -150,15 +173,19 @@
|
||||
|
||||
$('.btnAudioTracks', page).on('click', function () {
|
||||
|
||||
if (currentPlayer && lastPlayerState) {
|
||||
showAudioMenu(page, lastPlayerState.NowPlayingItem);
|
||||
if (currentPlayer && lastPlayerState && lastPlayerState.PlayState) {
|
||||
|
||||
var currentIndex = lastPlayerState.PlayState.AudioStreamIndex;
|
||||
showAudioMenu(page, lastPlayerState.NowPlayingItem, currentIndex);
|
||||
}
|
||||
});
|
||||
|
||||
$('.btnSubtitles', page).on('click', function () {
|
||||
|
||||
if (currentPlayer && lastPlayerState) {
|
||||
showSubtitleMenu(page, lastPlayerState.NowPlayingItem);
|
||||
if (currentPlayer && lastPlayerState && lastPlayerState.PlayState) {
|
||||
|
||||
var currentIndex = lastPlayerState.PlayState.SubtitleStreamIndex;
|
||||
showSubtitleMenu(page, lastPlayerState.NowPlayingItem, currentIndex);
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -1,25 +1,12 @@
|
||||
(function ($, document, window) {
|
||||
|
||||
function reloadList(page, updateInterval) {
|
||||
|
||||
if (updateInterval) {
|
||||
stopInterval();
|
||||
}
|
||||
function reloadList(page) {
|
||||
|
||||
ApiClient.getScheduledTasks({isHidden: false}).done(function (tasks) {
|
||||
|
||||
if (updateInterval) {
|
||||
populateList(page, tasks);
|
||||
} else {
|
||||
updateTasks(page, tasks);
|
||||
}
|
||||
populateList(page, tasks);
|
||||
|
||||
Dashboard.hideLoadingMsg();
|
||||
|
||||
if (updateInterval) {
|
||||
startInterval();
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
@ -173,13 +160,15 @@
|
||||
}
|
||||
}
|
||||
|
||||
function onWebSocketConnectionChange() {
|
||||
reloadList($.mobile.activePage, true);
|
||||
function onWebSocketConnectionOpen() {
|
||||
|
||||
startInterval();
|
||||
reloadList($.mobile.activePage);
|
||||
}
|
||||
|
||||
function startInterval() {
|
||||
if (ApiClient.isWebSocketOpen()) {
|
||||
ApiClient.sendWebSocketMessage("ScheduledTasksInfoStart", "1500,1500");
|
||||
ApiClient.sendWebSocketMessage("ScheduledTasksInfoStart", "1000,1000");
|
||||
}
|
||||
}
|
||||
|
||||
@ -195,9 +184,10 @@
|
||||
|
||||
Dashboard.showLoadingMsg();
|
||||
|
||||
reloadList(page, true);
|
||||
startInterval();
|
||||
reloadList(page);
|
||||
|
||||
$(ApiClient).on("websocketmessage", onWebSocketMessage).on("websocketopen", onWebSocketConnectionChange);
|
||||
$(ApiClient).on("websocketmessage", onWebSocketMessage).on("websocketopen", onWebSocketConnectionOpen);
|
||||
|
||||
$('#divScheduledTasks', page).on('click', '.btnStartTask', function () {
|
||||
|
||||
@ -224,7 +214,7 @@
|
||||
|
||||
var page = this;
|
||||
|
||||
$(ApiClient).off("websocketmessage", onWebSocketMessage).off("websocketopen", onWebSocketConnectionChange).off("websocketerror", onWebSocketConnectionChange).off("websocketclose", onWebSocketConnectionChange);
|
||||
$(ApiClient).off("websocketmessage", onWebSocketMessage).off("websocketopen", onWebSocketConnectionOpen);
|
||||
stopInterval();
|
||||
|
||||
$('#divScheduledTasks', page).off('click', '.btnStartTask').off('click', '.btnStopTask');
|
||||
|
@ -221,7 +221,7 @@ var Dashboard = {
|
||||
if (!Dashboard.installRefreshInterval) {
|
||||
|
||||
if (ApiClient.isWebSocketOpen()) {
|
||||
ApiClient.sendWebSocketMessage("SystemInfoStart", "0,350");
|
||||
ApiClient.sendWebSocketMessage("SystemInfoStart", "0,500");
|
||||
}
|
||||
Dashboard.installRefreshInterval = 1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user