I can get the audio_title and audio_artist out of the stream but tried so hard to update the
JrAudio database. I manually upload files with audio_title and audio_artist and_item_id a s o.
When playing those song on demand the it adds a play in the count, but not when in live stream.
The code that should do the job is this:
// Get all audio files that are part of this album
$_sp = array(
'search' => array(
"audio_title = {$_post['song']}",
"audio_artist = {$_post['profile_name']}",
),
'return_keys' => array('_item_id'),
'exclude_jrUser_keys' => true,
'exclude_jrProfile_quota_keys' => true,
'order_by' => array('_created' => 'numerical_asc'),
'limit' => 1
);
$_rt = jrCore_db_search_items('jrAudio', $_sp);
if (isset($_rt) && is_array($_rt)) {
jrCore_db_increment_key('jrAudio',$_rt['_items'][0]['item_id'], 'audio_file_stream_count',1,true);
return jrCore_json_response(array('success' => 1));
}
// return jrCore_json_response(array('error' => 'update failed'));
}
What Am I missing?
Please, thank you. // Jacob
updated by @popradio-stockholm: 09/27/23 02:49:12AM