1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

add adult content filter to catalog

This commit is contained in:
Luke Pulverenti 2014-06-07 17:06:01 -04:00
parent c52720b994
commit ce1763c192
5 changed files with 30 additions and 12 deletions

View file

@ -30,6 +30,11 @@
<label for="chkPremium">Free Only</label>
</p>
<br />
<p style="max-width: 300px;">
<label for="chkAdult">${OptionDisplayAdultContent}</label>
<input id="chkAdult" type="checkbox" data-mini="true" />
</p>
<br />
<div id="noPlugins" class="hide">
<div style="text-align: center; margin: 10px;">${MessageNoAvailablePlugins}</div>
</div>

View file

@ -7,6 +7,7 @@
SortBy: "",
SortOrder: "Ascending",
Fields: "PrimaryImageAspectRatio",
StartIndex: 0
};

View file

@ -176,6 +176,11 @@
DashboardPage.renderRunningTasks(page, tasks);
}
else if (msg.MessageType == "PackageInstalling" || msg.MessageType == "PackageInstallationCompleted") {
DashboardPage.pollForInfo(page, true);
DashboardPage.reloadSystemInfo(page);
}
},
onWebSocketOpen: function () {
@ -183,11 +188,11 @@
DashboardPage.startInterval();
},
pollForInfo: function (page) {
pollForInfo: function (page, forceUpdate) {
ApiClient.getSessions().done(function (sessions) {
DashboardPage.renderInfo(page, sessions);
DashboardPage.renderInfo(page, sessions, forceUpdate);
});
ApiClient.getScheduledTasks().done(function (tasks) {
@ -195,10 +200,10 @@
});
},
renderInfo: function (page, sessions) {
renderInfo: function (page, sessions, forceUpdate) {
DashboardPage.renderActiveConnections(page, sessions);
DashboardPage.renderPluginUpdateInfo(page);
DashboardPage.renderPluginUpdateInfo(page, forceUpdate);
Dashboard.hideLoadingMsg();
},
@ -812,10 +817,10 @@
$('#pendingInstallations', page).html(html);
},
renderPluginUpdateInfo: function (page) {
renderPluginUpdateInfo: function (page, forceUpdate) {
// Only check once every 30 mins
if (DashboardPage.lastPluginUpdateCheck && (new Date().getTime() - DashboardPage.lastPluginUpdateCheck) < 1800000) {
if (!forceUpdate && DashboardPage.lastPluginUpdateCheck && (new Date().getTime() - DashboardPage.lastPluginUpdateCheck) < 1800000) {
return;
}

View file

@ -342,7 +342,7 @@ $.fn.createHoverTouch = function () {
timerId = setTimeout(function () {
$(elem).trigger('hovertouch');
}, 250);
}, 300);
}
function stopTimer(elem) {

View file

@ -2,7 +2,8 @@
// The base query options
var query = {
TargetSystems: 'Server'
TargetSystems: 'Server',
IsAdult: false
};
function getApps() {
@ -173,11 +174,17 @@
reloadList(page);
});
$('#chkAdult', page).on('change', function () {
query.IsAdult = this.checked ? null : false;
reloadList(page);
});
}).on('pageshow', "#pluginCatalogPage", function () {
var page = this;
$(".radioPackageTypes", page).each(function() {
$(".radioPackageTypes", page).each(function () {
this.checked = this.value == query.TargetSystems;