mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
Disable Auto-Websocket
This commit is contained in:
@@ -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');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user