• Welcome to RadioDJ - Free Radio Automation Software Forum. Please log in or sign up.

RESOLVED: Request Sweeper Help

Started by MYXXfm, May 02, 2024, 12:15:04 PM



After digging further into the PHP files, I was able to resolve my issue shortly after posting this, naturally! Haha

For those wanting to achieve the same thing, I will include the manual fix below:

You will need to edit the radiodj.class.php file located in the /lib/ folder of the request files...

Just above the reCAPTCHA section near the bottom of the file (search for reCAPTCHA to easily find it) you'll see the following line:

      $sql = $DB->prepare("INSERT INTO `requests` SET `songID` = %d, `username` = %s, `userIP` = %s, `message` = %s, `requested` = NOW()", $request_songID, $request_name, $request_IP, $request_msg);
      $result = $DB->query( $sql );

Immediately below that, add the following line (above "     if( $result ) {     "), replacing the ____ with the sweeper ID you'd like to use:

      $sql = $DB->prepare("INSERT INTO `requests` SET `songID` = ____, `username` = %s, `userIP` = %s, `message` = %s, `requested` = NOW()", $request_songID, $request_name, $request_IP, $request_msg);
      $result = $DB->query( $sql );

This will result in the listeners requested song being added to the "Online Requests" section as well as your chosen sweeper automatically added with it. Now requests are "instant" and given a clean sound without the sweeper playing over the top of the song. There seems to be a bug in the latest version (possibly earlier versions too) that still plays a sweeper even if the option is disabled in the "Online Requests" window. A quick fix for this is to create a "No Sweeper" category in Sweepers and selecting that in the dropdown.

I hope this helps somebody in the future... I'm finally a happy camper! You can test this yourself by visiting MYXXfm.com/request
Submit your request and it'll immediately play next along with the sweeper "This is a MYXX request".


*** Original Post:

Hello all! Long time RDJ user (5+ years) / forum lurker here... Never had to reach out before so forgive my late hello!

I have a quick question (hopeful for a resolution) regarding requests...

I currently have everything working correctly with the online request system but there is one thing that is annoying me a little... I'd love to have a sweeper play PRIOR to the requested song being played. I know this can be achieved using the rotation method (placing a sweeper before the request input) but in my situation, I have marketed them as "instant requests"... The automated method in the requests window works great but using the sweeper selection, it always plays them on top of the intro.

Is there any trick to this to still be able to have a dedicated request sweeper played before the request? Maybe a code that can be added via SQL?

I have tried adding some lines into the request form CSS but failed miserably... It did work, however it would either add the sweeper and not the song or the song but not the sweeper.

Hopefully this makes sense.

Thank you for your time... I look forward to your thoughts!