mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update channel settings
This commit is contained in:
parent
f09dfdcddf
commit
5bd9c580df
3 changed files with 16 additions and 53 deletions
|
@ -88,22 +88,18 @@
|
|||
<div class="folderGroupList"></div>
|
||||
<div class="fieldDescription">${LabelSelectFolderGroupsHelp}</div>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
<div>
|
||||
<paper-checkbox class="chkDisplayChannelsInline">${OptionDisplayChannelsInline}</paper-checkbox>
|
||||
<div class="fieldDescription paperCheckboxFieldDescription">${OptionDisplayChannelsInlineHelp}</div>
|
||||
</div>
|
||||
<br />
|
||||
|
||||
<div>
|
||||
<paper-checkbox class="chkDisplayCollectionView">${LabelDisplayCollectionsView}</paper-checkbox>
|
||||
<div class="fieldDescription paperCheckboxFieldDescription">${LabelDisplayCollectionsViewHelp}</div>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
<div data-role="collapsible">
|
||||
<h2>${HeaderChannels}</h2>
|
||||
<div>
|
||||
<p>${LabelGroupChannelsIntoViews}</p>
|
||||
<div class="channelGroupList"></div>
|
||||
<div class="fieldDescription">${LabelGroupChannelsIntoViewsHelp}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -89,33 +89,6 @@
|
|||
$('.latestItemsList', page).html(folderHtml).trigger('create');
|
||||
}
|
||||
|
||||
function renderChannels(page, user, result) {
|
||||
|
||||
var folderHtml = '';
|
||||
|
||||
folderHtml += '<div data-role="controlgroup">';
|
||||
folderHtml += result.Items.map(function (i) {
|
||||
|
||||
var currentHtml = '';
|
||||
|
||||
var id = 'chkGroupChannel' + i.Id;
|
||||
|
||||
currentHtml += '<label for="' + id + '">' + i.Name + '</label>';
|
||||
|
||||
var isChecked = user.Configuration.DisplayChannelsWithinViews.indexOf(i.Id) != -1;
|
||||
var checkedHtml = isChecked ? ' checked="checked"' : '';
|
||||
|
||||
currentHtml += '<input class="chkGroupChannel" data-channelid="' + i.Id + '" type="checkbox" id="' + id + '"' + checkedHtml + ' />';
|
||||
|
||||
return currentHtml;
|
||||
|
||||
}).join('');
|
||||
|
||||
folderHtml += '</div>';
|
||||
|
||||
$('.channelGroupList', page).html(folderHtml).trigger('create');
|
||||
}
|
||||
|
||||
function renderViewOrder(page, user, result) {
|
||||
|
||||
var html = '';
|
||||
|
@ -161,6 +134,7 @@
|
|||
|
||||
page.querySelector('.chkDisplayCollectionView').checked = user.Configuration.DisplayCollectionsView || false;
|
||||
page.querySelector('.chkHidePlayedFromLatest').checked = user.Configuration.HidePlayedInLatest || false;
|
||||
page.querySelector('.chkDisplayChannelsInline').checked = user.Configuration.DisplayChannelsInline || false;
|
||||
|
||||
$('#selectHomeSection1', page).val(displayPreferences.CustomPrefs.home0 || '').selectmenu("refresh");
|
||||
$('#selectHomeSection2', page).val(displayPreferences.CustomPrefs.home1 || '').selectmenu("refresh");
|
||||
|
@ -170,19 +144,15 @@
|
|||
var promise1 = ApiClient.getItems(user.Id, {
|
||||
sortBy: "SortName"
|
||||
});
|
||||
var promise2 = ApiClient.getJSON(ApiClient.getUrl("Channels", {
|
||||
UserId: user.Id
|
||||
}));
|
||||
var promise3 = ApiClient.getUserViews({}, user.Id);
|
||||
var promise4 = ApiClient.getJSON(ApiClient.getUrl("Users/" + user.Id + "/SpecialViewOptions"));
|
||||
var promise2 = ApiClient.getUserViews({}, user.Id);
|
||||
var promise3 = ApiClient.getJSON(ApiClient.getUrl("Users/" + user.Id + "/SpecialViewOptions"));
|
||||
|
||||
$.when(promise1, promise2, promise3, promise4).done(function (r1, r2, r3, r4) {
|
||||
$.when(promise1, promise2, promise3).done(function (r1, r2, r3) {
|
||||
|
||||
renderViews(page, user, r1[0]);
|
||||
renderLatestItems(page, user, r1[0]);
|
||||
renderChannels(page, user, r2[0]);
|
||||
renderViewOrder(page, user, r3[0]);
|
||||
renderViewStyles(page, user, r4[0]);
|
||||
renderViewOrder(page, user, r2[0]);
|
||||
renderViewStyles(page, user, r3[0]);
|
||||
|
||||
Dashboard.hideLoadingMsg();
|
||||
});
|
||||
|
@ -193,6 +163,8 @@
|
|||
user.Configuration.DisplayCollectionsView = page.querySelector('.chkDisplayCollectionView').checked;
|
||||
user.Configuration.HidePlayedInLatest = page.querySelector('.chkHidePlayedFromLatest').checked;
|
||||
|
||||
user.Configuration.DisplayChannelsInline = page.querySelector('.chkDisplayChannelsInline').checked;
|
||||
|
||||
user.Configuration.LatestItemsExcludes = $(".chkIncludeInLatest:not(:checked)", page).get().map(function (i) {
|
||||
|
||||
return i.getAttribute('data-folderid');
|
||||
|
@ -210,11 +182,6 @@
|
|||
return i.getAttribute('data-folderid');
|
||||
});
|
||||
|
||||
user.Configuration.DisplayChannelsWithinViews = $(".chkGroupChannel:checked", page).get().map(function (i) {
|
||||
|
||||
return i.getAttribute('data-channelid');
|
||||
});
|
||||
|
||||
user.Configuration.OrderedViews = $(".viewItem", page).get().map(function (i) {
|
||||
|
||||
return i.getAttribute('data-viewid');
|
||||
|
|
|
@ -999,8 +999,8 @@
|
|||
"LabelKodiMetadataEnablePathSubstitution": "Enable path substitution",
|
||||
"LabelKodiMetadataEnablePathSubstitutionHelp": "Enables path substitution of image paths using the server's path substitution settings.",
|
||||
"LabelKodiMetadataEnablePathSubstitutionHelp2": "See path substitution.",
|
||||
"LabelGroupChannelsIntoViews": "Display the following channels directly within my views:",
|
||||
"LabelGroupChannelsIntoViewsHelp": "If enabled, these channels will be displayed directly alongside other views. If disabled, they'll be displayed within a separate Channels view.",
|
||||
"OptionDisplayChannelsInline": "Display channels inline within my views",
|
||||
"OptionDisplayChannelsInlineHelp": "If enabled, channels will be displayed directly alongside other views. If disabled, they'll be displayed within a separate Channels view.",
|
||||
"LabelDisplayCollectionsView": "Display a collections view to show movie collections",
|
||||
"LabelDisplayCollectionsViewHelp": "This will create a separate view to display collections that you've created or have access to. To create a collection, right-click or tap-hold any movie and select 'Add to Collection'. ",
|
||||
"LabelKodiMetadataEnableExtraThumbs": "Copy extrafanart into extrathumbs",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue