Disable Auto-Websocket

This commit is contained in:
int2001
2026-01-30 15:26:06 +00:00
parent 6744e63405
commit 9002caa5b7

View File

@@ -1312,20 +1312,6 @@ $(document).ready(function() {
// Start standard polling
CATInterval = setInterval(updateFromCAT, CAT_CONFIG.POLL_INTERVAL);
// --- PR ADDITION: Auto-enable WebSocket for local CAT URLs ---
// Fetch radio details to check if we should also start WebSocket
$.getJSON(base_url + 'index.php/radio/json/' + selectedRadioId, function(data) {
if (data.cat_url) {
const url = data.cat_url.toLowerCase();
if (url.includes('127.0.0.1') || url.includes('localhost')) {
console.log("CAT: Local CAT URL detected (" + data.cat_url + "). Initializing WebSocket...");
websocketIntentionallyClosed = false;
initializeWebSocketConnection();
}
}
});
// -------------------------------------------------------------
if ((window.CAT_COMPACT_MODE === 'ultra-compact' || window.CAT_COMPACT_MODE === 'icon-only') && typeof window.isCatTrackingEnabled !== 'undefined' && !window.isCatTrackingEnabled) {
displayOfflineStatus('cat_disabled');
}