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();
|
||||
//});
|
||||
|
||||
var playlistOpen = isPlaylistOpen(context);
|
||||
|
||||
if (playlistOpen) {
|
||||
|
||||
html += libraryBrowser.getListViewHtml({
|
||||
items: MediaController.playlist(),
|
||||
smallIcon: true
|
||||
});
|
||||
|
||||
playlistNeedsRefresh = false;
|
||||
}
|
||||
|
||||
var deps = [];
|
||||
|
||||
if (playlistOpen) {
|
||||
deps.push('paper-icon-item');
|
||||
deps.push('paper-item-body');
|
||||
}
|
||||
|
||||
require(deps, function () {
|
||||
|
||||
|
@ -438,8 +431,6 @@
|
|||
|
||||
itemsContainer.innerHTML = html;
|
||||
|
||||
if (playlistOpen) {
|
||||
|
||||
var index = MediaController.currentPlaylistIndex();
|
||||
|
||||
if (index != -1) {
|
||||
|
@ -452,16 +443,11 @@
|
|||
img.classList.add('playlistIndexIndicatorImage');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ImageLoader.lazyChildren(itemsContainer);
|
||||
});
|
||||
}
|
||||
|
||||
function isPlaylistOpen(context) {
|
||||
return libraryBrowser.selectedTab(context.querySelector('.libraryViewNav')) == 2;
|
||||
}
|
||||
|
||||
function onStateChanged(e, state) {
|
||||
|
||||
if (e.type == 'positionchange') {
|
||||
|
@ -485,11 +471,7 @@
|
|||
|
||||
onStateChanged.call(player, e, state);
|
||||
|
||||
if (isPlaylistOpen(dlg)) {
|
||||
loadPlaylist(dlg);
|
||||
} else {
|
||||
playlistNeedsRefresh = true;
|
||||
}
|
||||
}
|
||||
|
||||
function onPlaybackStopped(e, state) {
|
||||
|
@ -500,11 +482,7 @@
|
|||
|
||||
onStateChanged.call(player, e, {});
|
||||
|
||||
if (isPlaylistOpen(dlg)) {
|
||||
loadPlaylist(dlg);
|
||||
} else {
|
||||
playlistNeedsRefresh = true;
|
||||
}
|
||||
}
|
||||
|
||||
function releaseCurrentPlayer() {
|
||||
|
@ -824,6 +802,7 @@
|
|||
libraryBrowser.configurePaperLibraryTabs(ownerView, mdlTabs, ownerView.querySelectorAll('.pageTabContent'));
|
||||
|
||||
mdlTabs.addEventListener('tabchange', function (e) {
|
||||
|
||||
if (e.detail.selectedTabIndex == 2 && playlistNeedsRefresh) {
|
||||
loadPlaylist(context);
|
||||
}
|
||||
|
|
|
@ -28,12 +28,7 @@
|
|||
<div class="fieldDescription">${LabelNumberOfGuideDaysHelp}</div>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="paperCheckboxList">
|
||||
<label>${LabelEnableInternetMetadataForTvPrograms}</label>
|
||||
<paper-checkbox id="chkMovies">${OptionTVMovies}</paper-checkbox>
|
||||
</div>
|
||||
<div>
|
||||
<br />
|
||||
<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>
|
||||
<div class="fieldDescription">${LabelRecordingPathHelp}</div>
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
|
||||
$('#selectGuideDays', page).val(config.GuideDays || '');
|
||||
|
||||
$('#chkMovies', page).checked(config.EnableMovieProviders);
|
||||
$('#chkOrganize', page).checked(config.EnableAutoOrganize);
|
||||
$('#chkConvertRecordings', page).checked(config.EnableRecordingEncoding);
|
||||
$('#chkPreserveAudio', page).checked(config.EnableOriginalAudioWithEncodedRecordings || false);
|
||||
|
@ -33,7 +32,6 @@
|
|||
ApiClient.getNamedConfiguration("livetv").then(function (config) {
|
||||
|
||||
config.GuideDays = $('#selectGuideDays', form).val() || null;
|
||||
config.EnableMovieProviders = $('#chkMovies', form).checked();
|
||||
config.EnableAutoOrganize = $('#chkOrganize', form).checked();
|
||||
config.EnableRecordingEncoding = $('#chkConvertRecordings', form).checked();
|
||||
config.EnableOriginalAudioWithEncodedRecordings = $('#chkPreserveAudio', form).checked();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue