diff --git a/data/interfaces/default/settings.html b/data/interfaces/default/settings.html
index 694029bc..b6f39a54 100644
--- a/data/interfaces/default/settings.html
+++ b/data/interfaces/default/settings.html
@@ -488,7 +488,7 @@ available_notification_agents = sorted(notifiers.available_notification_agents()
-
Set the complete folder path where your Plex Server logs are, shortcuts are not recognized.
+
Set the complete folder path where your Plex Server logs are, shortcuts are not recognized .
Click here for help. This is required if you enable IP logging (for PMS 0.9.12 and below).
@@ -1905,6 +1905,11 @@ $(document).ready(function() {
$.get("/osxnotifyregister", { 'app': osx_notify_app }, function (data) { showMsg(" " + data + "
", false, true, 3000); });
})
+ pms_version = false;
+ pms_logs_debug = false;
+ pms_logs = false;
+
+ // Checks to see if PMS server version is >= 0.9.14 with automaatically logged IP addresses
$.ajax({
url: 'get_server_identity',
async: true,
@@ -1914,41 +1919,54 @@ $(document).ready(function() {
$("#debugLogCheck").html("IP address is automatically logged for PMS version 0.9.14 and above.");
$("#ip_logging_enable").attr("disabled", true);
$("#ip_logging_enable").attr("checked", true);
+ pms_version = true;
+ checkLogsPath();
} else {
+ // Check to see if debug logs are enabled on the PMS.
$.ajax({
url: 'get_server_pref',
data: { pref: 'logDebug' },
async: true,
success: function(data) {
- if (data !== 'true') {
- $("#debugLogCheck").html("Debug logging must be enabled on your Plex Server. Click here for help.");
- $("#ip_logging_enable").attr("disabled", true);
- $("#ip_logging_enable").attr("checked", false);
- }
+ pms_logs_debug = (data == 'true' ? true : false);
+ // Check to see if our logs folder is set before allowing IP logging to be enabled.
+ checkLogsPath();
}
});
-
- // Check to see if our logs folder is set before allowing IP logging to be enabled.
- checkLogsPath();
-
- $("#pms_logs_folder").change(function() {
- checkLogsPath();
- });
-
- function checkLogsPath() {
- if ($("#pms_logs_folder").val() == '') {
- $("#debugLogCheck").html("You must first define your Plex Server Logs folder path under the Plex Media Server tab.");
- $("#ip_logging_enable").attr("disabled", true);
- $("#ip_logging_enable").attr("checked", false);
- } else {
- $("#ip_logging_enable").attr("disabled", false);
- $("#debugLogCheck").html("");
- }
- }
}
}
});
+ $("#pms_logs_folder").change(function() {
+ checkLogsPath();
+ });
+
+ function checkLogsPath() {
+ if ($("#pms_logs_folder").val().startsWith("%") || $("#pms_logs_folder").val().startsWith("~")) {
+ $("#pms-logs-shortcut").css("color", "#eb8600");
+ pms_logs = false
+ } else {
+ $("#pms-logs-shortcut").css("color", "#737373");
+ pms_logs = ($("#pms_logs_folder").val() == '' ? false : true);
+ }
+
+ // Toggle IP logging checkbox depending on debug logs, and logs path
+ if (!(pms_version)) {
+ if (pms_logs_debug && pms_logs) {
+ $("#ip_logging_enable").attr("disabled", false);
+ $("#debugLogCheck").html("");
+ } else if (!(pms_logs_debug)) {
+ $("#debugLogCheck").html("Debug logging must be enabled on your Plex Server. Click here for help.");
+ $("#ip_logging_enable").attr("disabled", true);
+ $("#ip_logging_enable").attr("checked", false);
+ } else {
+ $("#debugLogCheck").html("You must first define your Plex Server Logs folder path under the Plex Media Server tab.");
+ $("#ip_logging_enable").attr("disabled", true);
+ $("#ip_logging_enable").attr("checked", false);
+ }
+ }
+ }
+
$.ajax({
url: 'get_server_pref',
data: { pref: 'PublishServerOnPlexOnlineKey' },