Forum Activity for @michael

michael
@michael
06/27/23 06:03:30PM
7,717 posts

update stream count by 1 seem impossible


Jamroom Developers

If you can get that search "// Get all audio files that are part of this album" lined up with the song that needs incrementing then incrementing will happen. Right now your search is not finding the song to increment.
michael
@michael
06/27/23 05:56:22PM
7,717 posts

update stream count by 1 seem impossible


Jamroom Developers

What Im seeing is that whenever the shoutcast stream changes from one song to another many thing happen, one of which is the /update url is called. That just happened and this URL was generated:
https://popradio.se/ShoutcastPlayer/update?audio_title=Trap%20Queen&profile_name=Fetty%20Wap&_=1687913313586

Even changing that to the correct update variable the update still fails:
https://popradio.se/ShoutcastPlayer/update?song=Trap%20Queen&profile_name=Fetty%20Wap&_=1687913313586

The reason is that the search for that song is not found or the profile is not found. Do you have a profile on your site for "Fetty Wap"? and does that profile have a song in their audio list called "Trap Queen".

It could be formatting, and probably would be best to use cleaner variables to search on like the audio_title_url if that exists and the profile_url if that exists.
michael
@michael
06/27/23 05:36:55PM
7,717 posts

update stream count by 1 seem impossible


Jamroom Developers

The URL that should be being used in the /update currently is:
/update?audio_title=
but that should be
/update?song=

--edit--
Alternatively if you don't know what is causing that url to be like that then changing the _update() function to allow ?audio_title works too, use this function:
PREVIOUSLY
function view_jrShoutcastPlayer_update($_post, $_user, $_conf) {
    jrCore_validate_location_url();
    if (!isset($_post['song']) || strlen($_post['song']) == 0) {
        return jrCore_json_response(array('error' => 'invalid song title'));
    }
    if (!isset($_post['profile_name']) || strlen($_post['song']) == 0) {
        return jrCore_json_response(array('error' => 'invalid profile name'));
    }
    // Get all audio files that are part of this album
    $_sp = array(
        'search'                       => array(
            "audio_title = {$_post['song']}",
           "profile_name = {$_post['profile_name']}",
		 // jake put in kod
         "audio_artist = {$_post['profile_name']}",
		  // SLUT JAKE


        ),
        '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'));
}
CHANGE IT TO:
function view_jrShoutcastPlayer_update($_post, $_user, $_conf)
{ jrCore_validate_location_url(); $title = ''; if (!empty($_post['song'])) { $title = $_post['song']; } elseif (!empty($_post['audio_title'])) { $title = $_post['audio_title']; } if (!empty($title)) { return jrCore_json_response(array('error' => 'invalid song title')); } if (!isset($_post['profile_name'])) { return jrCore_json_response(array('error' => 'invalid profile name')); } // Get all audio files that are part of this album $_sp = array( 'search' => array( "audio_title = {$title}", "profile_name = {$_post['profile_name']}", // jake put in kod "audio_artist = {$_post['profile_name']}", // SLUT JAKE ), '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')); }

updated by @michael: 06/27/23 05:42:06PM
michael
@michael
06/26/23 09:47:12PM
7,717 posts

update stream count by 1 seem impossible


Jamroom Developers

The stand alone 'Pop Up' player is on this url:
https://popradio.se/ShoutcastPlayer/popup

There's a link to it from the /radio page.

From within that page there is a call to /update :
https://popradio.se/ShoutcastPlayer/update?audio_title=The%20World%20s%20Greatest&profile_name=R.%20Kelly&_=1687840891592

That is returning
error: "Invalid Song Title".

That seems like it could be why the incrementing is not happening perhaps.

There's also a lot of GET requests to itunes going on which seems unusual.

--edit--
The GET requests are to itunes to get the album covers.
1.jpg 1.jpg - 20KB

updated by @michael: 06/26/23 09:52:33PM
michael
@michael
06/25/23 03:13:06PM
7,717 posts

update stream count by 1 seem impossible


Jamroom Developers

Need to get some feedback from Nate on here, he's the one that understands whats supposed to happen. @nate
michael
@michael
06/22/23 11:00:52PM
7,717 posts

update stream count by 1 seem impossible


Jamroom Developers

oh yeah, if you have that turned on it will most likely break many things. it inject the name of the template into the source code so you can locate where a section of code is. It does not care if that breaks the code or not.

The way it does it is with HTML comments which look like this:
<!-- BEGIN template_name.tpl -->
That will definitely break a json file.
michael
@michael
06/20/23 05:48:20PM
7,717 posts

update stream count by 1 seem impossible


Jamroom Developers

looks like you have the "Template Names In Source" turned on.
site.jpg site.jpg - 101KB
michael
@michael
06/11/23 11:27:01PM
7,717 posts

How to add or edit Blog Categories?


Using Jamroom

Multi lingual in the same site is hard to get right. Almost better to just let google do the translating. When I want to translate sites I use google chrome because I can right click on any page and select "Translate to english" and its done.

The problem you're going to run into with categories in different languages is the text thats uses IS the category, so
dog = dogs
cats = cats

change that to a different language and you get
inu = dogs
nekko = cats

and the dogs and cats of different languages aren't grouped together anymore.

Even with the translating the language strings its not great because some sentence structures just don't line up
button.jpg button.jpg - 1.1MB

updated by @michael: 06/11/23 11:27:25PM
michael
@michael
06/10/23 03:26:15PM
7,717 posts

How to add or edit Blog Categories?


Using Jamroom

Go to your profile then to the BLOG tab and click the + button. A form will open to create a new blog post. On that form is a field CATEGORY. you can choose from the existing list of blog post categories or add a new one. The list will be of all existing blog post categories. To delete a category move or delete all blog posts from that category and it will disappear.
blog.jpg blog.jpg - 728KB
michael
@michael
05/22/23 09:40:37PM
7,717 posts

Jamroom logo


Using Jamroom

Looks great, thanks.
  14