08-04-2024, 04:46 PM
If you added all 4 workerLog() statements then you should see 4 log entries if the script executed to completion.
here0
here1
here2
here3
Here's that code block again.
here0
here1
here2
here3
Here's that code block again.
Code:
case 'add_to_playlist':
$plName = html_entity_decode($_POST['path']['playlist']);
workerLog('here0);
// Get metadata (may not exist so defaults will be returned)
$plMeta = getPlaylistMetadata($plName);
workerLog('here1);
// Replace with URL if radio station
if (count($_POST['path']['items']) == 1 && substr($_POST['path']['items'][0], -4) == '.pls') {
$stName = substr($_POST['path']['items'][0], 6, -4); // Trim RADIO/ and .pls
$result = sqlQuery("SELECT station FROM cfg_radio WHERE name='" . SQLite3::escapeString($stName) . "'", sqlConnect());
$_POST['path']['items'][0] = $result[0]['station']; // URL
}
workerLog('here2);
.
.
.
workerLog('here3);
break;