mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update playlist
This commit is contained in:
parent
b5883925e7
commit
619cad7f41
3 changed files with 17 additions and 45 deletions
|
@ -413,24 +413,17 @@
|
||||||
// $(".playlist", page).html(html).lazyChildren();
|
// $(".playlist", page).html(html).lazyChildren();
|
||||||
//});
|
//});
|
||||||
|
|
||||||
var playlistOpen = isPlaylistOpen(context);
|
html += libraryBrowser.getListViewHtml({
|
||||||
|
items: MediaController.playlist(),
|
||||||
|
smallIcon: true
|
||||||
|
});
|
||||||
|
|
||||||
if (playlistOpen) {
|
playlistNeedsRefresh = false;
|
||||||
|
|
||||||
html += libraryBrowser.getListViewHtml({
|
|
||||||
items: MediaController.playlist(),
|
|
||||||
smallIcon: true
|
|
||||||
});
|
|
||||||
|
|
||||||
playlistNeedsRefresh = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
var deps = [];
|
var deps = [];
|
||||||
|
|
||||||
if (playlistOpen) {
|
deps.push('paper-icon-item');
|
||||||
deps.push('paper-icon-item');
|
deps.push('paper-item-body');
|
||||||
deps.push('paper-item-body');
|
|
||||||
}
|
|
||||||
|
|
||||||
require(deps, function () {
|
require(deps, function () {
|
||||||
|
|
||||||
|
@ -438,19 +431,16 @@
|
||||||
|
|
||||||
itemsContainer.innerHTML = html;
|
itemsContainer.innerHTML = html;
|
||||||
|
|
||||||
if (playlistOpen) {
|
var index = MediaController.currentPlaylistIndex();
|
||||||
|
|
||||||
var index = MediaController.currentPlaylistIndex();
|
if (index != -1) {
|
||||||
|
|
||||||
if (index != -1) {
|
var item = itemsContainer.querySelectorAll('.listItem')[index];
|
||||||
|
if (item) {
|
||||||
|
var img = item.querySelector('.listviewImage');
|
||||||
|
|
||||||
var item = itemsContainer.querySelectorAll('.listItem')[index];
|
img.classList.remove('lazy');
|
||||||
if (item) {
|
img.classList.add('playlistIndexIndicatorImage');
|
||||||
var img = item.querySelector('.listviewImage');
|
|
||||||
|
|
||||||
img.classList.remove('lazy');
|
|
||||||
img.classList.add('playlistIndexIndicatorImage');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -458,10 +448,6 @@
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function isPlaylistOpen(context) {
|
|
||||||
return libraryBrowser.selectedTab(context.querySelector('.libraryViewNav')) == 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
function onStateChanged(e, state) {
|
function onStateChanged(e, state) {
|
||||||
|
|
||||||
if (e.type == 'positionchange') {
|
if (e.type == 'positionchange') {
|
||||||
|
@ -485,11 +471,7 @@
|
||||||
|
|
||||||
onStateChanged.call(player, e, state);
|
onStateChanged.call(player, e, state);
|
||||||
|
|
||||||
if (isPlaylistOpen(dlg)) {
|
loadPlaylist(dlg);
|
||||||
loadPlaylist(dlg);
|
|
||||||
} else {
|
|
||||||
playlistNeedsRefresh = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function onPlaybackStopped(e, state) {
|
function onPlaybackStopped(e, state) {
|
||||||
|
@ -500,11 +482,7 @@
|
||||||
|
|
||||||
onStateChanged.call(player, e, {});
|
onStateChanged.call(player, e, {});
|
||||||
|
|
||||||
if (isPlaylistOpen(dlg)) {
|
loadPlaylist(dlg);
|
||||||
loadPlaylist(dlg);
|
|
||||||
} else {
|
|
||||||
playlistNeedsRefresh = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function releaseCurrentPlayer() {
|
function releaseCurrentPlayer() {
|
||||||
|
@ -824,6 +802,7 @@
|
||||||
libraryBrowser.configurePaperLibraryTabs(ownerView, mdlTabs, ownerView.querySelectorAll('.pageTabContent'));
|
libraryBrowser.configurePaperLibraryTabs(ownerView, mdlTabs, ownerView.querySelectorAll('.pageTabContent'));
|
||||||
|
|
||||||
mdlTabs.addEventListener('tabchange', function (e) {
|
mdlTabs.addEventListener('tabchange', function (e) {
|
||||||
|
|
||||||
if (e.detail.selectedTabIndex == 2 && playlistNeedsRefresh) {
|
if (e.detail.selectedTabIndex == 2 && playlistNeedsRefresh) {
|
||||||
loadPlaylist(context);
|
loadPlaylist(context);
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,12 +28,7 @@
|
||||||
<div class="fieldDescription">${LabelNumberOfGuideDaysHelp}</div>
|
<div class="fieldDescription">${LabelNumberOfGuideDaysHelp}</div>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<div class="paperCheckboxList">
|
|
||||||
<label>${LabelEnableInternetMetadataForTvPrograms}</label>
|
|
||||||
<paper-checkbox id="chkMovies">${OptionTVMovies}</paper-checkbox>
|
|
||||||
</div>
|
|
||||||
<div>
|
<div>
|
||||||
<br />
|
|
||||||
<paper-input id="txtRecordingPath" label="${LabelRecordingPath}" style="width:84%;display:inline-block;"></paper-input>
|
<paper-input id="txtRecordingPath" label="${LabelRecordingPath}" style="width:84%;display:inline-block;"></paper-input>
|
||||||
<button type="button" is="paper-icon-button-light" id="btnSelectRecordingPath" title="${ButtonSelectDirectory}"><iron-icon icon="search"></iron-icon></button>
|
<button type="button" is="paper-icon-button-light" id="btnSelectRecordingPath" title="${ButtonSelectDirectory}"><iron-icon icon="search"></iron-icon></button>
|
||||||
<div class="fieldDescription">${LabelRecordingPathHelp}</div>
|
<div class="fieldDescription">${LabelRecordingPathHelp}</div>
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
|
|
||||||
$('#selectGuideDays', page).val(config.GuideDays || '');
|
$('#selectGuideDays', page).val(config.GuideDays || '');
|
||||||
|
|
||||||
$('#chkMovies', page).checked(config.EnableMovieProviders);
|
|
||||||
$('#chkOrganize', page).checked(config.EnableAutoOrganize);
|
$('#chkOrganize', page).checked(config.EnableAutoOrganize);
|
||||||
$('#chkConvertRecordings', page).checked(config.EnableRecordingEncoding);
|
$('#chkConvertRecordings', page).checked(config.EnableRecordingEncoding);
|
||||||
$('#chkPreserveAudio', page).checked(config.EnableOriginalAudioWithEncodedRecordings || false);
|
$('#chkPreserveAudio', page).checked(config.EnableOriginalAudioWithEncodedRecordings || false);
|
||||||
|
@ -33,7 +32,6 @@
|
||||||
ApiClient.getNamedConfiguration("livetv").then(function (config) {
|
ApiClient.getNamedConfiguration("livetv").then(function (config) {
|
||||||
|
|
||||||
config.GuideDays = $('#selectGuideDays', form).val() || null;
|
config.GuideDays = $('#selectGuideDays', form).val() || null;
|
||||||
config.EnableMovieProviders = $('#chkMovies', form).checked();
|
|
||||||
config.EnableAutoOrganize = $('#chkOrganize', form).checked();
|
config.EnableAutoOrganize = $('#chkOrganize', form).checked();
|
||||||
config.EnableRecordingEncoding = $('#chkConvertRecordings', form).checked();
|
config.EnableRecordingEncoding = $('#chkConvertRecordings', form).checked();
|
||||||
config.EnableOriginalAudioWithEncodedRecordings = $('#chkPreserveAudio', form).checked();
|
config.EnableOriginalAudioWithEncodedRecordings = $('#chkPreserveAudio', form).checked();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue