mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
support theme songs in the web client
This commit is contained in:
parent
b8c3e8c777
commit
b7235c797f
22 changed files with 603 additions and 272 deletions
|
@ -1,7 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Auto-Organize</title>
|
||||
<title>${TitleAutoOrganize}</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="libraryFileOrganizerLogPage" data-role="page" class="page type-interior adminPage organizePage">
|
||||
|
@ -10,8 +10,8 @@
|
|||
<div class="content-primary">
|
||||
|
||||
<div data-role="controlgroup" data-type="horizontal" class="localnav" data-mini="true">
|
||||
<a href="#" data-role="button" class="ui-btn-active">Activity Log</a>
|
||||
<a href="autoorganizetv.html" data-role="button">TV Settings</a>
|
||||
<a href="#" data-role="button" class="ui-btn-active">${TabActivityLog}</a>
|
||||
<a href="autoorganizetv.html" data-role="button">${TabTV}</a>
|
||||
</div>
|
||||
|
||||
<div style="margin: -25px 0 1em; text-align: right;">
|
||||
|
@ -25,9 +25,9 @@
|
|||
<thead>
|
||||
<tr>
|
||||
<th data-priority="1"></th>
|
||||
<th data-priority="2">Date</th>
|
||||
<th data-priority="1">Source</th>
|
||||
<th data-priority="3">Destination</th>
|
||||
<th data-priority="2">${HeaderDate}</th>
|
||||
<th data-priority="1">${HeaderSource}</th>
|
||||
<th data-priority="3">${HeaderDestination}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="resultBody">
|
||||
|
@ -36,11 +36,11 @@
|
|||
<br />
|
||||
<div style="text-align: right;" class="legend">
|
||||
<div style="display: inline-block; height: 10px; width: 10px; background: green;"></div>
|
||||
<span>Completed</span>
|
||||
<span>${LabelCompleted}</span>
|
||||
<div style="display: inline-block; height: 10px; width: 10px; background: red; margin-left: 1em;"></div>
|
||||
<span>Failed</span>
|
||||
<span>${LabelFailed}</span>
|
||||
<div style="display: inline-block; height: 10px; width: 10px; background: blue; margin-left: 1em;"></div>
|
||||
<span>Skipped</span>
|
||||
<span>${LabelSkipped}</span>
|
||||
</div>
|
||||
<div class="listBottomPaging">
|
||||
</div>
|
||||
|
@ -50,7 +50,7 @@
|
|||
<div data-role="popup" data-transition="slidefade" class="popup episodeCorrectionPopup">
|
||||
|
||||
<div class="ui-bar-a" style="text-align: center; padding: 0 20px;">
|
||||
<h3>Episode Organization</h3>
|
||||
<h3>${HeaderEpisodeOrganization}</h3>
|
||||
</div>
|
||||
|
||||
<div data-role="content">
|
||||
|
@ -59,33 +59,29 @@
|
|||
<p><span class="inputFile"></span></p>
|
||||
|
||||
<div style="margin: 1em 0 1em; min-width: 250px;">
|
||||
<label for="selectSeries">Series:</label>
|
||||
<label for="selectSeries">${LabelSeries}</label>
|
||||
<select id="selectSeries" data-mini="true" required="required"></select>
|
||||
</div>
|
||||
<div style="margin: 1em 0;">
|
||||
<label for="txtSeason">Season number:</label>
|
||||
<label for="txtSeason">${LabelSeasonNumber}</label>
|
||||
<input id="txtSeason" type="number" data-mini="true" pattern="[0-9]*" required="required" min="0" />
|
||||
</div>
|
||||
<div style="margin: 1em 0;">
|
||||
<label for="txtEpisode">Episode number:</label>
|
||||
<label for="txtEpisode">${LabelEpisodeNumber}</label>
|
||||
<input id="txtEpisode" type="number" data-mini="true" pattern="[0-9]*" required="required" min="0" />
|
||||
</div>
|
||||
<div style="margin: 1em 0;">
|
||||
<label for="txtEndingEpisode">Ending episode number:</label>
|
||||
<label for="txtEndingEpisode">${LabelEndingEpisodeNumber}</label>
|
||||
<input id="txtEndingEpisode" type="number" data-mini="true" pattern="[0-9]*" min="0" />
|
||||
<div class="fieldDescription">Only required for multi-episode files</div>
|
||||
<div class="fieldDescription">${LabelEndingEpisodeNumberHelp}</div>
|
||||
</div>
|
||||
|
||||
<div style="margin: 1em 0;" id="fldRememberCorrection">
|
||||
<label for="chkRememberEpisodeCorrection">Remember this correction future episodes of the same series.</label>
|
||||
<input id="chkRememberEpisodeCorrection" type="checkbox" data-mini="true" />
|
||||
</div>
|
||||
<p>
|
||||
<button type="submit" data-theme="b" data-icon="check" data-mini="true">
|
||||
Ok
|
||||
${ButtonOk}
|
||||
</button>
|
||||
<button type="button" data-icon="delete" onclick="$(this).parents('.popup').popup('close');" data-mini="true">
|
||||
Cancel
|
||||
${ButtonCancel}
|
||||
</button>
|
||||
</p>
|
||||
<input id="hfResultId" type="hidden" />
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Auto-Organize</title>
|
||||
<title>${TitleAutoOrganize}</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="libraryFileOrganizerPage" data-role="page" class="page type-interior organizePage">
|
||||
|
@ -9,70 +9,70 @@
|
|||
<div data-role="content">
|
||||
<div class="content-primary">
|
||||
<div data-role="controlgroup" data-type="horizontal" class="localnav" data-mini="true">
|
||||
<a href="autoorganizelog.html" data-role="button">Activity Log</a>
|
||||
<a href="#" data-role="button" class="ui-btn-active">TV Settings</a>
|
||||
<a href="autoorganizelog.html" data-role="button">${TabActivityLog}</a>
|
||||
<a href="#" data-role="button" class="ui-btn-active">${TabTV}</a>
|
||||
</div>
|
||||
|
||||
<form class="libraryFileOrganizerForm">
|
||||
|
||||
<p>Auto-organize monitors your download folders for new files and moves them to your media directories.</p>
|
||||
<p>${AutoOrganizeHelp}</p>
|
||||
|
||||
<p>TV file organizing will only add episodes to existing series. It will not create new series folders.</p>
|
||||
<p>${AutoOrganizeTvHelp}</p>
|
||||
<ul data-role="listview" class="ulForm" style="margin-bottom: 0!important;">
|
||||
<li>
|
||||
<input type="checkbox" id="chkEnableTvSorting" name="chkEnableTvSorting" />
|
||||
<label for="chkEnableTvSorting">Enable new episode organization</label>
|
||||
<label for="chkEnableTvSorting">${OptionEnableEpisodeOrganization}</label>
|
||||
</li>
|
||||
<li>
|
||||
<label for="txtWatchFolder">Watch folder: </label>
|
||||
<label for="txtWatchFolder">${LabelWatchFolder}</label>
|
||||
<div style="display: inline-block; width: 92%;">
|
||||
<input type="text" id="txtWatchFolder" name="txtWatchFolder" />
|
||||
</div>
|
||||
<button id="btnSelectWatchFolder" type="button" data-icon="search" data-iconpos="notext" data-inline="true">${ButtonSelectDirectory}</button>
|
||||
<div class="fieldDescription">
|
||||
The server will poll this folder during the "Organize new media files" <a href="scheduledtasks.html">scheduled task</a>.
|
||||
<div>${LabelWatchFolderHelp}</div>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<label for="txtMinFileSize">Minimum file size (MB): </label>
|
||||
<label for="txtMinFileSize">${LabelMinFileSizeForOrganize}</label>
|
||||
<input type="number" id="txtMinFileSize" name="txtMinFileSize" pattern="[0-9]*" required="required" min="0" data-mini="true" />
|
||||
<div class="fieldDescription">Files under this size will be ignored.</div>
|
||||
<div class="fieldDescription">${LabelMinFileSizeForOrganizeHelp}</div>
|
||||
</li>
|
||||
<li>
|
||||
<label for="txtSeasonFolderPattern">Season folder pattern: </label>
|
||||
<label for="txtSeasonFolderPattern">${LabelSeasonFolderPattern}</label>
|
||||
<input type="text" id="txtSeasonFolderPattern" name="txtSeasonFolderPattern" required="required" data-mini="true" />
|
||||
<div class="fieldDescription seasonFolderFieldDescription"></div>
|
||||
</li>
|
||||
<li>
|
||||
<label for="txtSeasonZeroName">Season zero folder name: </label>
|
||||
<label for="txtSeasonZeroName">${LabelSeasonZeroFolderName}</label>
|
||||
<input type="text" id="txtSeasonZeroName" name="txtSeasonZeroName" required="required" data-mini="true" />
|
||||
</li>
|
||||
</ul>
|
||||
<div data-role="collapsible">
|
||||
<h3>Episode file pattern</h3>
|
||||
<h3>${HeaderEpisodeFilePattern}</h3>
|
||||
<div>
|
||||
<br />
|
||||
<div>
|
||||
<label for="txtEpisodePattern">Episode pattern: </label>
|
||||
<label for="txtEpisodePattern">${LabelEpisodePattern}</label>
|
||||
<input type="text" id="txtEpisodePattern" name="txtEpisodePattern" required="required" data-mini="true" />
|
||||
<div class="fieldDescription episodePatternDescription"></div>
|
||||
</div>
|
||||
<br />
|
||||
<div>
|
||||
<label for="txtMultiEpisodePattern">Multi-Episode pattern: </label>
|
||||
<label for="txtMultiEpisodePattern">${LabelMultiEpisodePattern}</label>
|
||||
<input type="text" id="txtMultiEpisodePattern" name="txtMultiEpisodePattern" required="required" data-mini="true" />
|
||||
<div class="fieldDescription multiEpisodePatternDescription"></div>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
<p>Supported Patterns</p>
|
||||
<p>${HeaderSupportedPatterns}</p>
|
||||
|
||||
<table data-role="table" id="movie-table" data-mode="reflow" class="ui-responsive">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Term</th>
|
||||
<th>Pattern</th>
|
||||
<th>Result</th>
|
||||
<th>${HeaderTerm}</th>
|
||||
<th>${HeaderPattern}</th>
|
||||
<th>${HeaderResult}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
@ -144,36 +144,36 @@
|
|||
<br />
|
||||
<ul data-role="listview" class="ulForm">
|
||||
<li>
|
||||
<label for="copyOrMoveFile">Transfer Method</label>
|
||||
<label for="copyOrMoveFile">${LabelTransferMethod}</label>
|
||||
<select id="copyOrMoveFile" data-mini="true">
|
||||
<option value="true">Copy</option>
|
||||
<option value="false">Move</option>
|
||||
<option value="true">${OptionCopy}</option>
|
||||
<option value="false">${OptionMove}</option>
|
||||
</select>
|
||||
<div class="fieldDescription">Copy or move files from the watch folder</div>
|
||||
<div class="fieldDescription">${LabelTransferMethodHelp}</div>
|
||||
</li>
|
||||
<li>
|
||||
<input type="checkbox" id="chkOverwriteExistingEpisodes" name="chkOverwriteExistingEpisodes" />
|
||||
<label for="chkOverwriteExistingEpisodes">Overwrite existing episodes</label>
|
||||
<label for="chkOverwriteExistingEpisodes">${OptionOverwriteExistingEpisodes}</label>
|
||||
</li>
|
||||
<li>
|
||||
<label for="txtDeleteLeftOverFiles">Delete left over files with the following extensions: </label>
|
||||
<label for="txtDeleteLeftOverFiles">${LabelDeleteLeftOverFiles}</label>
|
||||
<input type="text" id="txtDeleteLeftOverFiles" name="txtDeleteLeftOverFiles" data-mini="true" />
|
||||
<div class="fieldDescription">Separate with ;. For example: .nfo;.txt</div>
|
||||
<div class="fieldDescription">${LabelDeleteLeftOverFilesHelp}</div>
|
||||
</li>
|
||||
<li>
|
||||
<input type="checkbox" id="chkDeleteEmptyFolders" name="chkDeleteEmptyFolders" data-mini="true" />
|
||||
<label for="chkDeleteEmptyFolders">Delete empty folders after organizing</label>
|
||||
<div class="fieldDescription">Enable this to keep the download directory clean.</div>
|
||||
<label for="chkDeleteEmptyFolders">${LabelDeleteEmptyFolders}</label>
|
||||
<div class="fieldDescription">${LabelDeleteEmptyFoldersHelp}</div>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul data-role="listview" class="ulForm">
|
||||
<li>
|
||||
<button type="submit" data-theme="b" data-icon="check" data-mini="true">
|
||||
Save
|
||||
${ButtonSave}
|
||||
</button>
|
||||
<button type="button" onclick="Dashboard.navigate('dashboard.html');" data-icon="delete" data-mini="true">
|
||||
Cancel
|
||||
${ButtonCancel}
|
||||
</button>
|
||||
</li>
|
||||
|
||||
|
|
BIN
dashboard-ui/css/images/nowplayingdefault.jpg
Normal file
BIN
dashboard-ui/css/images/nowplayingdefault.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 464 KiB |
|
@ -655,24 +655,6 @@ h1 .imageLink {
|
|||
top: -3px;
|
||||
}
|
||||
|
||||
/* Dashboard home */
|
||||
.tblConnections td {
|
||||
padding: 1em 0 1em .75em;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.tblConnections td:first-child {
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.tblConnections img:not(.clientNowPlayingImage) {
|
||||
height: 28px;
|
||||
}
|
||||
|
||||
.clientNowPlayingImage {
|
||||
height: 52px;
|
||||
}
|
||||
|
||||
/* Footer */
|
||||
#footer {
|
||||
position: fixed;
|
||||
|
@ -870,3 +852,142 @@ progress {
|
|||
.btnShowStatusMessage:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.activeSession {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
margin: 5px;
|
||||
width: 250px;
|
||||
height: 140.625px;
|
||||
}
|
||||
|
||||
.sessionNowPlayingContent {
|
||||
background-size: cover;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center center;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.sessionNowPlayingInnerContent {
|
||||
background-color: rgba(0, 0, 0, .6);
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
color: #fff;
|
||||
font-weight: 400;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.sessionAppInfo {
|
||||
padding: .5em;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.sessionAppName {
|
||||
vertical-align: top;
|
||||
max-width: 200px;
|
||||
}
|
||||
|
||||
.sessionUserInfo {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
bottom: 7px;
|
||||
padding: .5em;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.sessionUserInfo img {
|
||||
height: 24px;
|
||||
}
|
||||
|
||||
.sessionNowPlayingInfo {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: 7px;
|
||||
padding: .5em;
|
||||
max-width: 150px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.sessionAppInfo img {
|
||||
max-width: 32px;
|
||||
max-height: 32px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.activeSession progress {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
height: 7px;
|
||||
width: 100%;
|
||||
opacity: .95;
|
||||
}
|
||||
|
||||
.notPlayingSession .sessionNowPlayingContent {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.notPlayingSession .sessionNowPlayingInnerContent {
|
||||
background-color: #f0f0f0;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.notPlayingSession .sessionUserInfo, .notPlayingSession .sessionNowPlayingInfo {
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
.activeSession:hover {
|
||||
-moz-box-shadow: 0 0 20px 1px #38c;
|
||||
-webkit-box-shadow: 0 0 20px 1px #38c;
|
||||
box-shadow: 0 0 20px 1px #38c;
|
||||
}
|
||||
|
||||
@media all and (max-width: 1000px) {
|
||||
|
||||
.activeSession {
|
||||
width: 230px;
|
||||
height: 129.375px;
|
||||
}
|
||||
}
|
||||
|
||||
@media all and (max-width: 550px) {
|
||||
|
||||
.activeSession {
|
||||
width: 210px;
|
||||
height: 118.125px;
|
||||
}
|
||||
|
||||
.sessionAppName {
|
||||
max-width: 160px;
|
||||
}
|
||||
}
|
||||
|
||||
@media all and (max-width: 500px) {
|
||||
|
||||
.activeSession {
|
||||
width: 200px;
|
||||
height: 112.5px;
|
||||
}
|
||||
|
||||
.sessionAppName {
|
||||
max-width: 150px;
|
||||
}
|
||||
}
|
||||
|
||||
@media all and (max-width: 400px) {
|
||||
|
||||
.activeSession {
|
||||
width: 250px;
|
||||
height: 140.625px;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,67 +19,63 @@
|
|||
<div class="readOnlyContent dashboardHomeLeftColumn">
|
||||
|
||||
<div data-role="collapsible" data-collapsed="false">
|
||||
<h3>Server Information</h3>
|
||||
<h3>${HeaerServerInformation}</h3>
|
||||
<div>
|
||||
<p>
|
||||
Version <span id="appVersionNumber"></span>
|
||||
<p id="appVersionNumber">
|
||||
</p>
|
||||
<p id="pUpToDate" style="display: none;">
|
||||
<img src="css/images/checkmarkgreen.png" style="height: 20px; margin-right: 3px; position: relative; top: 5px; border-radius: 3px;" />
|
||||
Media Browser Server is up to date
|
||||
${ServerUpToDate}
|
||||
</p>
|
||||
<div id="pUpdateNow" style="display: none;">
|
||||
<p><strong>A new version of Media Browser Server is available!</strong></p>
|
||||
<p><strong>${NewServerVersionAvailable}</strong></p>
|
||||
<p id="newVersionNumber"></p>
|
||||
<div id="btnUpdateApplicationContainer">
|
||||
<button id="btnUpdateApplication" type="button" data-icon="arrow-d" data-theme="b" onclick="DashboardPage.updateApplication();">Update Now</button>
|
||||
<button id="btnUpdateApplication" type="button" data-icon="arrow-d" data-theme="b" onclick="DashboardPage.updateApplication();">${ButtonUpdateNow}</button>
|
||||
</div>
|
||||
<div id="btnManualUpdateContainer">
|
||||
Please shutdown the server and <a href="http://www.mediabrowser3.com/download" target="_blank">update manually.</a>
|
||||
<a href="http://www.mediabrowser3.com/download" target="_blank">${PleaseUpdateManually}</a>
|
||||
</div>
|
||||
</div>
|
||||
<div id="updateFail" style="color: #cc0000; display: none;">There was an error connecting to the remote Media Browser repository.</div>
|
||||
<div id="updateFail" style="color: #cc0000; display: none;">${ErrorConnectingToMediaBrowserRepository}</div>
|
||||
<p id="ports"></p>
|
||||
<div id="pPluginUpdates"></div>
|
||||
|
||||
<p class="externalUrl"></p>
|
||||
<div style="margin-top: 1em;">
|
||||
<button class="btnRestartContainer hide" id="btnRestartServer" type="button" data-icon="refresh" data-mini="true" data-inline="true" onclick="DashboardPage.restart();">Restart</button>
|
||||
<button id="btnShutdown" type="button" data-icon="delete" data-mini="true" data-inline="true" onclick="DashboardPage.shutdown();">Shutdown</button>
|
||||
<button class="btnRestartContainer hide" id="btnRestartServer" type="button" data-icon="refresh" data-mini="true" data-inline="true" onclick="DashboardPage.restart();">${ButtonRestart}</button>
|
||||
<button id="btnShutdown" type="button" data-icon="delete" data-mini="true" data-inline="true" onclick="DashboardPage.shutdown();">${ButtonShutdown}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="collapsiblePendingInstallations" data-role="collapsible" data-collapsed="false" style="margin-top: 2em; display: none;">
|
||||
<h3>Pending Installations</h3>
|
||||
<p>The following components have been installed or updated:</p>
|
||||
<h3>${HeaderPendingInstallations}</h3>
|
||||
<p>${LabelComponentsUpdated}</p>
|
||||
<div id="pendingInstallations">
|
||||
</div>
|
||||
<p>Please restart the server to finish applying updates.</p>
|
||||
<p>${MessagePleaseRestartServerToFinishUpdating}</p>
|
||||
<div class="btnRestartContainer hide">
|
||||
<button type="button" data-icon="refresh" data-theme="b" onclick="Dashboard.restartServer();" data-mini="true" data-inline="true">Restart Now</button>
|
||||
<button type="button" data-icon="refresh" data-theme="b" onclick="Dashboard.restartServer();" data-mini="true" data-inline="true">${ButtonRestartNow}</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div data-role="collapsible" data-collapsed="false" style="margin-top: 2em;">
|
||||
<h3>Active Devices</h3>
|
||||
<div>
|
||||
<table class="tblConnections" style="border-collapse: collapse;">
|
||||
</table>
|
||||
<h3>${HeaderActiveDevices}</h3>
|
||||
<div class="activeDevices">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="runningTasksCollapsible" data-role="collapsible" data-collapsed="false" style="margin-top: 2em; display: none;">
|
||||
<h3>Running Tasks</h3>
|
||||
<h3>${HeaderRunningTasks}</h3>
|
||||
<div>
|
||||
<div id="divRunningTasks">
|
||||
</div>
|
||||
<p><a href="scheduledtasks.html">Manage Scheduled Tasks</a></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="contribute" style="margin-top: 4em; display: none;">
|
||||
<h2 style="margin: 0 0 .35em;">Help Improve Media Browser</h2>
|
||||
<h2 style="margin: 0 0 .35em;">${HeaderHelpImproveMediaBrowser}</h2>
|
||||
<div>
|
||||
<a data-role="button" data-icon="mail" data-mini="true" href="supporter.html">
|
||||
<img src="css/images/supporter/donatepaypal.png" /></a>
|
||||
|
@ -113,7 +109,7 @@
|
|||
|
||||
<div class="readOnlyContent dashboardHomeRightColumn">
|
||||
<div data-role="collapsible" data-collapsed="false">
|
||||
<h3>Latest News</h3>
|
||||
<h3>${HeaderLatestNews}</h3>
|
||||
<div class="latestNewsItems">
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -37,11 +37,11 @@
|
|||
<table data-role="table" data-mode="reflow" class="tblTuners stripedTable ui-responsive table-stroke">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Source</th>
|
||||
<th>Status</th>
|
||||
<th>Program</th>
|
||||
<th>Clients</th>
|
||||
<th>${HeaderName}</th>
|
||||
<th>${HeaderSource}</th>
|
||||
<th>${HeaderStatus}</th>
|
||||
<th>${HeaderProgram}</th>
|
||||
<th>${HeaderClients}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
|
13
dashboard-ui/nowplaying.html
Normal file
13
dashboard-ui/nowplaying.html
Normal file
|
@ -0,0 +1,13 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>${TitleMediaBrowser}</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="nowPlayingPage" data-role="page" class="page libraryPage" data-theme="b">
|
||||
|
||||
<div data-role="content">
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,7 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<title>${TitleMediaBrowser}</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="playlistPage" data-role="page" class="page libraryPage" data-theme="b">
|
||||
|
|
|
@ -80,14 +80,6 @@
|
|||
|
||||
$('#hfResultId', popup).val(item.Id);
|
||||
|
||||
if (item.ExtractedName) {
|
||||
$('#fldRememberCorrection', popup).hide();
|
||||
} else {
|
||||
$('#fldRememberCorrection', popup).hide();
|
||||
}
|
||||
|
||||
$('#chkRememberEpisodeCorrection', popup).checked(false).checkboxradio('refresh');
|
||||
|
||||
var seriesHtml = allSeries.map(function (s) {
|
||||
|
||||
return '<option value="' + s.Id + '">' + s.Name + '</option>';
|
||||
|
@ -157,8 +149,7 @@
|
|||
SeriesId: $('#selectSeries', form).val(),
|
||||
SeasonNumber: $('#txtSeason', form).val(),
|
||||
EpisodeNumber: $('#txtEpisode', form).val(),
|
||||
EndingEpisodeNumber: $('#txtEndingEpisode', form).val(),
|
||||
RememberCorrection: $('#chkRememberEpisodeCorrection', form).checked()
|
||||
EndingEpisodeNumber: $('#txtEndingEpisode', form).val()
|
||||
};
|
||||
|
||||
ApiClient.performEpisodeOrganization(resultId, options).done(function () {
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
|
||||
Dashboard.updateSystemInfo(systemInfo);
|
||||
|
||||
$('#appVersionNumber', page).html(systemInfo.Version);
|
||||
$('#appVersionNumber', page).html('Version ' + systemInfo.Version);
|
||||
|
||||
var port = systemInfo.HttpServerPortNumber;
|
||||
|
||||
|
@ -190,17 +190,15 @@
|
|||
|
||||
var html = '';
|
||||
|
||||
var table = $('.tblConnections', page);
|
||||
var parentElement = $('.activeDevices', page);
|
||||
|
||||
$('.trSession', table).addClass('deadSession');
|
||||
|
||||
var deviceId = ApiClient.deviceId();
|
||||
$('.activeSession', parentElement).addClass('deadSession');
|
||||
|
||||
for (var i = 0, length = sessions.length; i < length; i++) {
|
||||
|
||||
var connection = sessions[i];
|
||||
|
||||
var rowId = 'trSession' + connection.Id;
|
||||
var rowId = 'session' + connection.Id;
|
||||
|
||||
var elem = $('#' + rowId, page);
|
||||
|
||||
|
@ -209,93 +207,184 @@
|
|||
continue;
|
||||
}
|
||||
|
||||
html += '<tr class="trSession" id="' + rowId + '">';
|
||||
var nowPlayingItem = connection.NowPlayingItem;
|
||||
|
||||
html += '<td class="clientType" style="text-align:center;">';
|
||||
html += DashboardPage.getClientType(connection);
|
||||
html += '</td>';
|
||||
var className = nowPlayingItem ? 'activeSession' : 'notPlayingSession activeSession';
|
||||
|
||||
html += '<td>';
|
||||
html += '<a class="' + className + '" id="' + rowId + '" href="nowplaying.html">';
|
||||
|
||||
html += '<div style="max-width:200px;">';
|
||||
if (deviceId == connection.DeviceId) {
|
||||
html += connection.DeviceName;
|
||||
html += '<div class="sessionNowPlayingContent"';
|
||||
|
||||
var imgUrl = DashboardPage.getNowPlayingImageUrl(nowPlayingItem);
|
||||
|
||||
if (imgUrl) {
|
||||
html += ' data-src="' + imgUrl + '" style="display:inline-block;background-image:url(\'' + imgUrl + '\');"';
|
||||
}
|
||||
|
||||
html += '></div>';
|
||||
|
||||
html += '<div class="sessionNowPlayingInnerContent">';
|
||||
|
||||
html += '<div class="sessionAppInfo">';
|
||||
|
||||
var clientImage = DashboardPage.getClientImage(connection);
|
||||
|
||||
if (clientImage) {
|
||||
html += clientImage;
|
||||
}
|
||||
|
||||
html += '<div class="sessionAppName" style="display:inline-block;">' + connection.DeviceName;
|
||||
html += '<br/>' + connection.ApplicationVersion;
|
||||
html += '</div>';
|
||||
|
||||
html += '</div>';
|
||||
|
||||
html += '<div class="sessionUserInfo">';
|
||||
|
||||
var userImage = DashboardPage.getUserImage(connection);
|
||||
if (userImage) {
|
||||
html += '<div class="sessionUserImage" data-src="' + userImage + '">';
|
||||
html += '<img src="' + userImage + '" />';
|
||||
} else {
|
||||
html += '<a href="#" onclick="RemoteControl.showMenu({sessionId:\'' + connection.Id + '\'});">' + connection.DeviceName + '</a>';
|
||||
html += '<div class="sessionUserImage">';
|
||||
}
|
||||
html += '</div>';
|
||||
|
||||
html += '<div>' + connection.ApplicationVersion + '</div>';
|
||||
|
||||
html += '<div class="username">';
|
||||
html += '<div class="sessionUserName">';
|
||||
html += DashboardPage.getUsersHtml(connection);
|
||||
html += '</div>';
|
||||
|
||||
html += '</td>';
|
||||
|
||||
var nowPlayingItem = connection.NowPlayingItem;
|
||||
|
||||
html += '<td>';
|
||||
|
||||
html += '<div class="nowPlayingImage">';
|
||||
html += DashboardPage.getNowPlayingImage(nowPlayingItem);
|
||||
html += '</div>';
|
||||
|
||||
html += '<div class="clientNowPlayingText">';
|
||||
html += DashboardPage.getNowPlayingText(connection, nowPlayingItem);
|
||||
html += '<div class="sessionNowPlayingInfo">';
|
||||
if (nowPlayingItem) {
|
||||
html += DashboardPage.getNowPlayingName(connection);
|
||||
}
|
||||
html += '</div>';
|
||||
|
||||
html += '</td>';
|
||||
if (nowPlayingItem) {
|
||||
|
||||
var value = (100 * connection.NowPlayingPositionTicks) / nowPlayingItem.RunTimeTicks;
|
||||
|
||||
html += '</tr>';
|
||||
html += '<progress class="itemProgressBar" min="0" max="100" value="' + value + '"></progress>';
|
||||
} else {
|
||||
html += '<progress class="itemProgressBar" min="0" max="100" style="display:none;"></progress>';
|
||||
}
|
||||
|
||||
html += '</div>';
|
||||
html += '</a>';
|
||||
|
||||
}
|
||||
|
||||
table.append(html).trigger('create');
|
||||
parentElement.append(html).trigger('create');
|
||||
|
||||
$('.deadSession', parentElement).remove();
|
||||
},
|
||||
|
||||
getNowPlayingName: function (session) {
|
||||
|
||||
var nowPlayingItem = session.NowPlayingItem;
|
||||
|
||||
if (!nowPlayingItem) {
|
||||
|
||||
return 'Last seen ' + humane_date(session.LastActivityDate);
|
||||
}
|
||||
|
||||
var topText = nowPlayingItem.Name;
|
||||
|
||||
if (nowPlayingItem.MediaType == 'Video') {
|
||||
if (nowPlayingItem.IndexNumber != null) {
|
||||
topText = nowPlayingItem.IndexNumber + " - " + topText;
|
||||
}
|
||||
if (nowPlayingItem.ParentIndexNumber != null) {
|
||||
topText = nowPlayingItem.ParentIndexNumber + "." + topText;
|
||||
}
|
||||
}
|
||||
|
||||
var bottomText = '';
|
||||
|
||||
if (nowPlayingItem.Artists && nowPlayingItem.Artists.length) {
|
||||
bottomText = topText;
|
||||
topText = nowPlayingItem.Artists[0];
|
||||
}
|
||||
else if (nowPlayingItem.SeriesName || nowPlayingItem.Album) {
|
||||
bottomText = topText;
|
||||
topText = nowPlayingItem.SeriesName || nowPlayingItem.Album;
|
||||
}
|
||||
else if (nowPlayingItem.ProductionYear) {
|
||||
bottomText = nowPlayingItem.ProductionYear;
|
||||
}
|
||||
|
||||
return bottomText ? topText + '<br/>' + bottomText : topText;
|
||||
|
||||
$('.deadSession', table).remove();
|
||||
},
|
||||
|
||||
getUsersHtml: function (session) {
|
||||
|
||||
var html = '';
|
||||
var html = [];
|
||||
|
||||
if (session.UserId) {
|
||||
html += '<div>' + session.UserName + '</div>';
|
||||
html.push(session.UserName);
|
||||
}
|
||||
|
||||
html += session.AdditionalUsers.map(function (currentSession) {
|
||||
for (var i = 0, length = session.AdditionalUsers.length; i < length; i++) {
|
||||
|
||||
html.push(session.AdditionalUsers[i].UserName);
|
||||
}
|
||||
|
||||
return html.join(', ');
|
||||
},
|
||||
|
||||
getUserImage: function (session) {
|
||||
|
||||
if (session.UserId && session.UserPrimaryImageTag) {
|
||||
return ApiClient.getUserImageUrl(session.UserId, {
|
||||
|
||||
tag: session.UserPrimaryImageTag,
|
||||
height: 24,
|
||||
type: 'Primary'
|
||||
|
||||
return '<div>' + currentSession.UserName + '</div>';
|
||||
});
|
||||
}
|
||||
|
||||
return html;
|
||||
return null;
|
||||
},
|
||||
|
||||
updateSession: function (row, session) {
|
||||
|
||||
row.removeClass('deadSession');
|
||||
|
||||
$('.username', row).html(DashboardPage.getUsersHtml(session));
|
||||
|
||||
var nowPlayingItem = session.NowPlayingItem;
|
||||
|
||||
$('.clientNowPlayingText', row).html(DashboardPage.getNowPlayingText(session, nowPlayingItem)).trigger('create');
|
||||
if (nowPlayingItem) {
|
||||
row.removeClass('notPlayingSession');
|
||||
} else {
|
||||
row.addClass('notPlayingSession');
|
||||
}
|
||||
|
||||
var imageRow = $('.nowPlayingImage', row);
|
||||
$('.sessionUserName', row).html(DashboardPage.getUsersHtml(session));
|
||||
|
||||
var image = $('img', imageRow)[0];
|
||||
$('.sessionNowPlayingInfo', row).html(DashboardPage.getNowPlayingName(session));
|
||||
|
||||
var nowPlayingItemId = nowPlayingItem ? nowPlayingItem.Id : null;
|
||||
var nowPlayingItemImageTag = nowPlayingItem ? nowPlayingItem.PrimaryImageTag : null;
|
||||
if (nowPlayingItem && nowPlayingItem.RunTimeTicks) {
|
||||
|
||||
if (!image || image.getAttribute('data-itemid') != nowPlayingItemId || image.getAttribute('data-tag') != nowPlayingItemImageTag) {
|
||||
imageRow.html(DashboardPage.getNowPlayingImage(nowPlayingItem));
|
||||
var value = (100 * session.NowPlayingPositionTicks) / nowPlayingItem.RunTimeTicks;
|
||||
|
||||
$('progress', row).show().val(value);
|
||||
} else {
|
||||
$('progress', row).hide();
|
||||
}
|
||||
|
||||
var imgUrl = DashboardPage.getNowPlayingImageUrl(nowPlayingItem) || '';
|
||||
var imgElem = $('.sessionNowPlayingContent', row)[0];
|
||||
|
||||
if (imgUrl != imgElem.getAttribute('data-src')) {
|
||||
imgElem.style.backgroundImage = imgUrl ? 'url(\'' + imgUrl + '\')' : '';
|
||||
imgElem.setAttribute('data-src', imgUrl);
|
||||
}
|
||||
},
|
||||
|
||||
getClientType: function (connection) {
|
||||
getClientImage: function (connection) {
|
||||
|
||||
var clientLowered = connection.Client.toLowerCase();
|
||||
|
||||
|
@ -325,89 +414,81 @@
|
|||
}
|
||||
if (clientLowered == "mb-classic") {
|
||||
|
||||
return "<img src='css/images/clients/mbc.png' alt='Media Browser Classic' />";
|
||||
return "<img src='css/images/clients/mbc.png' />";
|
||||
}
|
||||
if (clientLowered == "media browser theater") {
|
||||
|
||||
return "<img src='css/images/clients/mb.png' alt='Media Browser Theater' />";
|
||||
return "<img src='css/images/clients/mb.png' />";
|
||||
}
|
||||
if (clientLowered == "android") {
|
||||
|
||||
return "<img src='css/images/clients/android.png' alt='Android' />";
|
||||
return "<img src='css/images/clients/android.png' />";
|
||||
}
|
||||
if (clientLowered == "roku") {
|
||||
|
||||
return "<img src='css/images/clients/roku.jpg' alt='Roku' />";
|
||||
return "<img src='css/images/clients/roku.jpg' />";
|
||||
}
|
||||
if (clientLowered == "ios") {
|
||||
|
||||
return "<img src='css/images/clients/ios.png' alt='iOS' />";
|
||||
return "<img src='css/images/clients/ios.png' />";
|
||||
}
|
||||
if (clientLowered == "windows rt") {
|
||||
|
||||
return "<img src='css/images/clients/windowsrt.png' alt='Windows RT' />";
|
||||
return "<img src='css/images/clients/windowsrt.png' />";
|
||||
}
|
||||
if (clientLowered == "windows phone") {
|
||||
|
||||
return "<img src='css/images/clients/windowsphone.png' alt='Windows Phone' />";
|
||||
return "<img src='css/images/clients/windowsphone.png' />";
|
||||
}
|
||||
if (clientLowered == "dlna") {
|
||||
|
||||
return "<img src='css/images/clients/dlna.png' alt='Dlna' />";
|
||||
return "<img src='css/images/clients/dlna.png' />";
|
||||
}
|
||||
if (clientLowered == "mbkinect") {
|
||||
|
||||
return "<img src='css/images/clients/mbkinect.png' alt='MB Kinect' />";
|
||||
return "<img src='css/images/clients/mbkinect.png' />";
|
||||
}
|
||||
if (clientLowered == "xbmc") {
|
||||
return "<img src='css/images/clients/xbmc.png' alt='Xbmc' />";
|
||||
return "<img src='css/images/clients/xbmc.png' />";
|
||||
}
|
||||
if (clientLowered == "chromecast") {
|
||||
|
||||
return "<img src='css/images/chromecast/ic_media_route_on_holo_light.png' alt='Chromecast' />";
|
||||
return "<img src='css/images/chromecast/ic_media_route_on_holo_light.png' />";
|
||||
}
|
||||
|
||||
|
||||
return connection.Client;
|
||||
return null;
|
||||
},
|
||||
|
||||
getNowPlayingImage: function (item) {
|
||||
getNowPlayingImageUrl: function (item) {
|
||||
|
||||
if (item && item.BackdropImageTag) {
|
||||
|
||||
return ApiClient.getImageUrl(item.BackdropItemId, {
|
||||
type: "Backdrop",
|
||||
width: 810,
|
||||
tag: item.BackdropImageTag
|
||||
});
|
||||
}
|
||||
|
||||
if (item && item.ThumbImageTag) {
|
||||
|
||||
return ApiClient.getImageUrl(item.ThumbItemId, {
|
||||
type: "Thumb",
|
||||
width: 810,
|
||||
tag: item.ThumbImageTag
|
||||
});
|
||||
}
|
||||
|
||||
if (item && item.PrimaryImageTag) {
|
||||
var url = ApiClient.getImageUrl(item.Id, {
|
||||
|
||||
return ApiClient.getImageUrl(item.PrimaryImageItemId, {
|
||||
type: "Primary",
|
||||
height: 100,
|
||||
width: 810,
|
||||
tag: item.PrimaryImageTag
|
||||
});
|
||||
|
||||
url += "&xxx=" + new Date().getTime();
|
||||
|
||||
return "<img data-itemid='" + item.Id + "' data-tag='" + item.PrimaryImageTag + "' class='clientNowPlayingImage' src='" + url + "' alt='" + item.Name + "' title='" + item.Name + "' />";
|
||||
}
|
||||
|
||||
return "";
|
||||
},
|
||||
|
||||
getNowPlayingText: function (connection, item) {
|
||||
|
||||
var html = "";
|
||||
|
||||
if (item) {
|
||||
|
||||
html += "<div><a href='itemdetails.html?id=" + item.Id + "'>" + item.Name + "</a></div>";
|
||||
|
||||
html += "<div>";
|
||||
|
||||
if (item.RunTimeTicks) {
|
||||
html += Dashboard.getDisplayTime(connection.NowPlayingPositionTicks || 0) + " / ";
|
||||
|
||||
html += Dashboard.getDisplayTime(item.RunTimeTicks);
|
||||
}
|
||||
|
||||
html += "</div>";
|
||||
}
|
||||
|
||||
return html;
|
||||
return null;
|
||||
},
|
||||
|
||||
systemUpdateTaskKey: "SystemUpdateTask",
|
||||
|
|
|
@ -267,8 +267,7 @@
|
|||
$('#musicVideosCollapsible', page).hide();
|
||||
}
|
||||
|
||||
renderThemeSongs(page, item, user);
|
||||
renderThemeVideos(page, item, user);
|
||||
renderThemeMedia(page, item, user);
|
||||
renderCriticReviews(page, item, 1);
|
||||
}
|
||||
|
||||
|
@ -907,19 +906,48 @@
|
|||
$('#criticReviewsContent', page).html(html).trigger('create');
|
||||
}
|
||||
|
||||
function renderThemeSongs(page, item) {
|
||||
function renderThemeMedia(page, item) {
|
||||
|
||||
ApiClient.getThemeSongs(Dashboard.getCurrentUserId(), item.Id).done(function (result) {
|
||||
if (result.Items.length) {
|
||||
ApiClient.getThemeMedia(Dashboard.getCurrentUserId(), item.Id, true).done(function (result) {
|
||||
|
||||
var themeSongs = result.ThemeSongsResult.OwnerId == item.Id ?
|
||||
result.ThemeSongsResult.Items :
|
||||
[];
|
||||
|
||||
var themeVideos = result.ThemeVideosResult.OwnerId == item.Id ?
|
||||
result.ThemeVideosResult.Items :
|
||||
[];
|
||||
|
||||
renderThemeSongs(page, themeSongs);
|
||||
renderThemeVideos(page, themeVideos);
|
||||
|
||||
$(page).trigger('thememediadownload', [result]);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function renderThemeSongs(page, items) {
|
||||
|
||||
if (items.length) {
|
||||
|
||||
$('#themeSongsCollapsible', page).show();
|
||||
|
||||
$('#themeSongsContent', page).html(LibraryBrowser.getSongTableHtml(result.Items, { showArtist: true, showAlbum: true, showAlbumArtist: true })).trigger('create');
|
||||
$('#themeSongsContent', page).html(LibraryBrowser.getSongTableHtml(items, { showArtist: true, showAlbum: true, showAlbumArtist: true })).trigger('create');
|
||||
} else {
|
||||
$('#themeSongsCollapsible', page).hide();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function renderThemeVideos(page, items, user) {
|
||||
|
||||
if (items.length) {
|
||||
|
||||
$('#themeVideosCollapsible', page).show();
|
||||
|
||||
$('#themeVideosContent', page).html(getVideosHtml(items, user)).trigger('create');
|
||||
} else {
|
||||
$('#themeVideosCollapsible', page).hide();
|
||||
}
|
||||
}
|
||||
|
||||
function renderMusicVideos(page, item, user) {
|
||||
|
@ -946,21 +974,6 @@
|
|||
|
||||
}
|
||||
|
||||
function renderThemeVideos(page, item, user) {
|
||||
|
||||
ApiClient.getThemeVideos(user.Id, item.Id).done(function (result) {
|
||||
if (result.Items.length) {
|
||||
|
||||
$('#themeVideosCollapsible', page).show();
|
||||
|
||||
$('#themeVideosContent', page).html(getVideosHtml(result.Items, user)).trigger('create');
|
||||
} else {
|
||||
$('#themeVideosCollapsible', page).hide();
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function renderAdditionalParts(page, item, user) {
|
||||
|
||||
ApiClient.getAdditionalVideoParts(user.Id, item.Id).done(function (result) {
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
html += '<a class="desktopHomeLink" href="index.html"><img src="css/images/mblogoicon.png" /></a>';
|
||||
|
||||
html += '<button class="viewMenuRemoteControlButton" onclick="RemoteControl.showMenu();" type="button" data-icon="wireless" data-inline="true" data-iconpos="notext" title="Remote Control">Remote Control</button>';
|
||||
html += '<a class="viewMenuRemoteControlButton" href="nowplaying.html" data-role="button" data-icon="wireless" 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>';
|
||||
|
|
|
@ -36,7 +36,8 @@
|
|||
isLocalPlayer: currentPlayer.isLocalPlayer,
|
||||
id: currentTargetInfo.id,
|
||||
deviceName: currentTargetInfo.deviceName,
|
||||
playableMediaTypes: currentTargetInfo.playableMediaTypes
|
||||
playableMediaTypes: currentTargetInfo.playableMediaTypes,
|
||||
supportedCommands: currentTargetInfo.supportedCommands
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -355,7 +356,7 @@
|
|||
|
||||
var mirror = (!target.isLocalPlayer && target.supportedCommands.indexOf('DisplayContent') != -1) ? 'true' : 'false';
|
||||
|
||||
html += '<input type="radio" class="radioSelectPlayerTarget" name="radioSelectPlayerTarget" data-mirror="' + mirror + '" data-mediatypes="' + target.playableMediaTypes.join(',') + '" data-playername="' + target.playerName + '" data-targetid="' + target.id + '" data-targetname="' + target.name + '" id="' + id + '" value="' + target.id + '"' + checkedHtml + '>';
|
||||
html += '<input type="radio" class="radioSelectPlayerTarget" name="radioSelectPlayerTarget" data-mirror="' + mirror + '" data-commands="' + target.supportedCommands.join(',') + '" data-mediatypes="' + target.playableMediaTypes.join(',') + '" data-playername="' + target.playerName + '" data-targetid="' + target.id + '" data-targetname="' + target.name + '" id="' + id + '" value="' + target.id + '"' + checkedHtml + '>';
|
||||
html += '<label for="' + id + '" style="font-weight:normal;">' + target.name;
|
||||
|
||||
if (target.appName) {
|
||||
|
@ -432,11 +433,13 @@
|
|||
var targetId = this.getAttribute('data-targetid');
|
||||
var targetName = this.getAttribute('data-targetname');
|
||||
var playableMediaTypes = this.getAttribute('data-mediatypes').split(',');
|
||||
var supportedCommands = this.getAttribute('data-commands').split(',');
|
||||
|
||||
MediaController.setActivePlayer(playerName, {
|
||||
id: targetId,
|
||||
name: targetName,
|
||||
playableMediaTypes: playableMediaTypes
|
||||
playableMediaTypes: playableMediaTypes,
|
||||
supportedCommands: supportedCommands
|
||||
|
||||
});
|
||||
});
|
||||
|
|
|
@ -862,9 +862,13 @@
|
|||
|
||||
// Can't autoplay in these browsers so we need to use the full controls
|
||||
if (requiresControls) {
|
||||
html += '<video class="itemVideo" id="itemVideo" autoplay controls>';
|
||||
|
||||
|
||||
html += '<video class="itemVideo" id="itemVideo" preload="none" autoplay controls>';
|
||||
} else {
|
||||
html += '<video class="itemVideo" id="itemVideo" autoplay>';
|
||||
|
||||
// Chrome 35 won't play with preload none
|
||||
html += '<video class="itemVideo" id="itemVideo" preload="metadata" autoplay>';
|
||||
}
|
||||
|
||||
if (!isStatic) {
|
||||
|
|
|
@ -934,7 +934,7 @@
|
|||
};
|
||||
|
||||
self.isPlaying = function () {
|
||||
return currentMediaElement;
|
||||
return currentMediaElement != null;
|
||||
};
|
||||
|
||||
self.getPlayerState = function () {
|
||||
|
@ -1121,6 +1121,15 @@
|
|||
return testableVideoElement.canPlayType('video/webm').replace(/no/, '');
|
||||
}
|
||||
|
||||
self.canAutoPlayAudio = function () {
|
||||
|
||||
if ($.browser.android || ($.browser.webkit && !$.browser.chrome)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
};
|
||||
|
||||
function getAudioElement() {
|
||||
|
||||
var elem = $('.mediaPlayerAudio');
|
||||
|
@ -1131,7 +1140,7 @@
|
|||
|
||||
var html = '';
|
||||
|
||||
var requiresControls = $.browser.android || ($.browser.webkit && !$.browser.chrome);
|
||||
var requiresControls = !self.canAutoPlayAudio();
|
||||
|
||||
if (requiresControls) {
|
||||
html += '<div class="mediaPlayerAudioContainer"><div class="mediaPlayerAudioContainerInner">';;
|
||||
|
|
|
@ -167,6 +167,28 @@
|
|||
getNowPlayingBar();
|
||||
}
|
||||
|
||||
var playerInfo = MediaController.getPlayerInfo();
|
||||
|
||||
var supportedCommands = playerInfo.supportedCommands;
|
||||
|
||||
if (supportedCommands.indexOf('SetVolume') == -1) {
|
||||
volumeSlider.prop('disabled', 'disabled');
|
||||
} else {
|
||||
volumeSlider.prop('disabled', '');
|
||||
}
|
||||
|
||||
if (supportedCommands.indexOf('Mute') == -1) {
|
||||
muteButton.prop('disabled', 'disabled');
|
||||
} else {
|
||||
muteButton.prop('disabled', '');
|
||||
}
|
||||
|
||||
if (supportedCommands.indexOf('Unmute') == -1) {
|
||||
unmuteButton.prop('disabled', 'disabled');
|
||||
} else {
|
||||
unmuteButton.prop('disabled', '');
|
||||
}
|
||||
|
||||
if (state.isMuted) {
|
||||
|
||||
muteButton.hide();
|
||||
|
@ -190,9 +212,11 @@
|
|||
}
|
||||
|
||||
if (!isVolumeSliderActive) {
|
||||
volumeSlider.val(state.volumeLevel || 0).slider('refresh');
|
||||
volumeSlider.val(state.volumeLevel || 0);
|
||||
}
|
||||
|
||||
volumeSlider.slider('refresh');
|
||||
|
||||
if (!isPositionSliderActive) {
|
||||
if (state.canSeek) {
|
||||
|
||||
|
|
|
@ -80,7 +80,7 @@
|
|||
|
||||
var page = this;
|
||||
|
||||
reloadPlaylist(page);
|
||||
//reloadPlaylist(page);
|
||||
});
|
||||
|
||||
|
||||
|
|
|
@ -477,7 +477,7 @@ var Dashboard = {
|
|||
|
||||
Dashboard.getCurrentUser().done(function (user) {
|
||||
|
||||
var html = '<div data-role="panel" data-position="right" data-display="overlay" id="userFlyout" data-position-fixed="true" data-theme="a">';
|
||||
var html = '<div data-role="panel" data-position="right" data-display="overlay" id="userFlyout" data-position-fixed="true" data-theme="b">';
|
||||
|
||||
html += '<h3>';
|
||||
|
||||
|
@ -496,17 +496,24 @@ var Dashboard = {
|
|||
html += user.Name;
|
||||
html += '</h3>';
|
||||
|
||||
html += '<form>';
|
||||
|
||||
html += '<p><label for="chkEnableThemeSongs">Play theme songs</label><input onchange="ThemeSongManager.enabled(this.checked);" type="checkbox" id="chkEnableThemeSongs" data-mini="true" /></a>';
|
||||
|
||||
html += '<p><a data-mini="true" data-role="button" href="useredit.html?userId=' + user.Id + '" data-icon="user">Preferences</button></a>';
|
||||
html += '<p><button data-mini="true" type="button" onclick="Dashboard.logout();" data-icon="lock">Sign Out</button></p>';
|
||||
|
||||
html += '</form>';
|
||||
html += '</div>';
|
||||
|
||||
$(document.body).append(html);
|
||||
|
||||
$('#userFlyout').panel({}).trigger('create').panel("open").on("panelafterclose", function () {
|
||||
var elem = $('#userFlyout').panel({}).trigger('create').panel("open").on("panelafterclose", function () {
|
||||
|
||||
$(this).off("panelafterclose").remove();
|
||||
});
|
||||
|
||||
$('#chkEnableThemeSongs', elem).checked(ThemeSongManager.enabled()).checkboxradio('refresh');
|
||||
});
|
||||
},
|
||||
|
||||
|
|
81
dashboard-ui/scripts/thememediaplayer.js
Normal file
81
dashboard-ui/scripts/thememediaplayer.js
Normal file
|
@ -0,0 +1,81 @@
|
|||
(function (document, $) {
|
||||
|
||||
var currentOwnerId;
|
||||
var currentThemeIds = [];
|
||||
|
||||
function playThemeSongs(items, ownerId) {
|
||||
|
||||
var player = getPlayer();
|
||||
|
||||
if (items.length && player.isDefaultPlayer && player.canAutoPlayAudio()) {
|
||||
|
||||
// Stop if a theme song from another ownerId
|
||||
// Leave it alone if anything else (e.g user playing a movie)
|
||||
if (!currentOwnerId && player.isPlaying()) {
|
||||
return;
|
||||
}
|
||||
|
||||
currentThemeIds = items.map(function (i) {
|
||||
return i.Id;
|
||||
});
|
||||
|
||||
currentOwnerId = ownerId;
|
||||
|
||||
player.play({
|
||||
items: items
|
||||
});
|
||||
|
||||
} else {
|
||||
currentOwnerId = null;
|
||||
}
|
||||
}
|
||||
|
||||
function onPlayItem(item) {
|
||||
|
||||
// User played something manually
|
||||
if (currentThemeIds.indexOf(item.Id) == -1) {
|
||||
|
||||
currentOwnerId = null;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
function enabled(isEnabled) {
|
||||
|
||||
var userId = Dashboard.getCurrentUserId();
|
||||
|
||||
var key = userId + '-themesongs';
|
||||
|
||||
if (isEnabled != null) {
|
||||
|
||||
var val = isEnabled ? '1' : '0';
|
||||
|
||||
localStorage.setItem(key, val);
|
||||
|
||||
return;
|
||||
}
|
||||
return localStorage.getItem(key);
|
||||
}
|
||||
|
||||
function getPlayer() {
|
||||
return MediaController.getCurrentPlayer();
|
||||
}
|
||||
|
||||
$(document).on('thememediadownload', ".libraryPage", function (e, themeMediaResult) {
|
||||
|
||||
if (!enabled()) {
|
||||
return;
|
||||
}
|
||||
|
||||
var ownerId = themeMediaResult.ThemeSongsResult.OwnerId;
|
||||
|
||||
if (ownerId != currentOwnerId) {
|
||||
playThemeSongs(themeMediaResult.ThemeSongsResult.Items, ownerId);
|
||||
}
|
||||
});
|
||||
|
||||
window.ThemeSongManager = {
|
||||
enabled: enabled
|
||||
};
|
||||
|
||||
})(document, jQuery);
|
|
@ -1,13 +1,29 @@
|
|||
(function ($, window, document) {
|
||||
|
||||
function populateLanguages(select, languages) {
|
||||
|
||||
var html = "";
|
||||
|
||||
html += "<option value=''></option>";
|
||||
|
||||
for (var i = 0, length = languages.length; i < length; i++) {
|
||||
|
||||
var culture = languages[i];
|
||||
|
||||
html += "<option value='" + culture.ThreeLetterISOLanguageName + "'>" + culture.DisplayName + "</option>";
|
||||
}
|
||||
|
||||
$(select).html(html).selectmenu("refresh");
|
||||
}
|
||||
|
||||
function loadUser(page, user, loggedInUser, allCulturesPromise) {
|
||||
|
||||
Dashboard.setPageTitle(user.Name);
|
||||
|
||||
allCulturesPromise.done(function (allCultures) {
|
||||
|
||||
Dashboard.populateLanguages($('#selectAudioLanguage', page), allCultures);
|
||||
Dashboard.populateLanguages($('#selectSubtitleLanguage', page), allCultures);
|
||||
populateLanguages($('#selectAudioLanguage', page), allCultures);
|
||||
populateLanguages($('#selectSubtitleLanguage', page), allCultures);
|
||||
|
||||
$('#selectAudioLanguage', page).val(user.Configuration.AudioLanguagePreference || "").selectmenu("refresh");
|
||||
$('#selectSubtitleLanguage', page).val(user.Configuration.SubtitleLanguagePreference || "").selectmenu("refresh");
|
||||
|
|
|
@ -16,17 +16,14 @@
|
|||
<a href="supporterkey.html" data-role="button">${TabSupporterKey}</a>
|
||||
<a href="about.html" data-role="button">${TabAbout}</a>
|
||||
</div>
|
||||
<h3>Support the Media Browser Team</h3>
|
||||
<p>
|
||||
Help ensure the continued development of this project by donating. A portion of all donations will be contributed to other <a href="about.html">free tools</a> we depend on.
|
||||
</p>
|
||||
<h3>${HeaderSupportTheTeam}</h3>
|
||||
<p>${HeaderSupportTheTeamHelp}</p>
|
||||
|
||||
<br />
|
||||
<form name="_xclick" action="https://www.paypal.com/cgi-bin/webscr"
|
||||
method="post">
|
||||
<label for="donateAmt">Amount (USD)</label>
|
||||
<label for="donateAmt">${LabelSupportAmount}</label>
|
||||
<select id="donateAmt" name="amount">
|
||||
<option value="10">$10</option>
|
||||
<option value="15" selected="selected">$15</option>
|
||||
<option value="20">$20</option>
|
||||
<option value="30">$30</option>
|
||||
|
@ -40,10 +37,11 @@
|
|||
<input type="hidden" name="item_number" value="MBSupporter">
|
||||
<input type="hidden" name="notify_url" value="http://mb3admin.com/admin/service/services/ppipn.php">
|
||||
<input type="hidden" name="return" id="paypalReturnUrl" value="#">
|
||||
<a data-role="button" onclick="$(this).parents('form')[0].submit();">
|
||||
<a data-role="button" data-icon="arrow-r" data-iconpos="right" onclick="$(this).parents('form')[0].submit();">
|
||||
<img src="css/images/supporter/donatepaypal.png" /></a>
|
||||
</form>
|
||||
<p>Once complete, please return and <a href="supporterkey.html">enter your supporter key</a>, which you will receive by email.</p>
|
||||
<p>${DonationNextStep}</p>
|
||||
<p><a href="supporterkey.html">Enter supporter key</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -3007,10 +3007,7 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout, wi
|
|||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Gets theme songs for an item
|
||||
*/
|
||||
self.getThemeSongs = function (userId, itemId) {
|
||||
self.getThemeMedia = function (userId, itemId, inherit) {
|
||||
|
||||
if (!itemId) {
|
||||
throw new Error("null itemId");
|
||||
|
@ -3022,28 +3019,9 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout, wi
|
|||
options.userId = userId;
|
||||
}
|
||||
|
||||
var url = self.getUrl("Items/" + itemId + "/ThemeSongs", options);
|
||||
options.InheritFromParent = inherit || false;
|
||||
|
||||
return self.ajax({
|
||||
type: "GET",
|
||||
url: url,
|
||||
dataType: "json"
|
||||
});
|
||||
};
|
||||
|
||||
self.getThemeVideos = function (userId, itemId) {
|
||||
|
||||
if (!itemId) {
|
||||
throw new Error("null itemId");
|
||||
}
|
||||
|
||||
var options = {};
|
||||
|
||||
if (userId) {
|
||||
options.userId = userId;
|
||||
}
|
||||
|
||||
var url = self.getUrl("Items/" + itemId + "/ThemeVideos", options);
|
||||
var url = self.getUrl("Items/" + itemId + "/ThemeMedia", options);
|
||||
|
||||
return self.ajax({
|
||||
type: "GET",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue