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

Online Requests - Same artist

Started by urayoan, August 10, 2018, 03:40:22 PM

urayoan

Hi:
  First of all. Thank you to the developers an people who works with RadioDJ. It is an amazing piece of software. Lots of flexibility and features that makes endless possibilities to work and make the thing we want in a efficient way.

  Right now, we are using the software, and with some programming in our end, we were able to make requests from our station app and even send push notifications to the user who requested the song within RadioDJ, when the track is starting to play. (did i tell, endless possibilities?)

  So here is my question, when he user add a track to the request, the rule does not let the user add the same song again but, if they want, they can add the same artists to the requests queue. There is a way to check if the artist exists in the requests queue, similar to the song.

  Any suggestions will be appreciated, i am pretty sure i am missing something.

Thanks again
@ Urayoán Miranda

DJ Garybaldy

QuoteSo here is my question, when he user add a track to the request, the rule does not let the user add the same song again but, if they want, they can add the same artists to the requests queue. There is a way to check if the artist exists in the requests queue, similar to the song.

Currently looking for an answer on this one with our request script, There's a few anomalies somewhere which we can't seem to fathom out.
Its also letting people search for disabled track titles too which is bamboozling us. We're going to look at it when we get chance to get our coding heads together.
Someone may come up with a fix before us so its best to check back on the forums.
Worlds Biggest Fan of RadioDJ

Install MariaDB https://djgarybaldy.blogspot.com/2020/08/installing-maria-db.html

Install RadioDJ: https://djgarybaldy.blogspot.com/2020/08/how-to-install-radiodj-free-radio.html

Into Internet radio for 25 years 1999-2024

RadioDJ 2045 MariaDB 11.2 Windows 11

urayoan

Quote from: DJ Garybaldy on August 10, 2018, 03:47:45 PM
Currently looking for an answer on this one with our request script, There's a few anomalies somewhere which we can't seem to fathom out.
Its also letting people search for disabled track titles too which is bamboozling us. We're going to look at it when we get chance to get our coding heads together.
Someone may come up with a fix before us so its best to check back on the forums.

Thank you DJ Garybaldy. I will check regularly if someone else come with more ideas.

Jhonny

My small question to understand the question  :hihi:

When a request is in the request and not played or in the plylist the requester cant request the artist?

R.T.F.M. means to me, Read The Fantastic Messages.
Einstein says: Make things simple, but don't make simple things simpler! (wise) this is just my life lesson you know.

I don't do drugs ( ͡° ͜ʖ ͡°)
The Radiodj tutorials site is now managed by Domstad radio .nl still  Just in English

PROducer

Quote from: urayoan on August 10, 2018, 03:40:22 PMWhen the user add a track to the request, the rule does not let the user add the same song again but, if they want, they can add the same artists to the requests queue. There is a way to check if the artist exists in the requests queue, similar to the song?
In the database, there is a table for `requests`.  The table only contains the song ID, not the artist or title so you would need to gather, also the info from the `songs` table.


urayoan

Quote from: Jhonny on August 10, 2018, 04:53:26 PM
My small question to understand the question  :hihi:

When a request is in the request and not played or in the plylist the requester cant request the artist?

Good question Jhonny, with the requests file first, i can use similar logic to check in the playlist_list too. Right now the scripts only check for the song but not the artists. I want to prevent the listeners to put the same artist in the hour if i already have a requested song with the artist in requests or even playlist_list queue

urayoan

Quote from: PROducer on August 10, 2018, 06:05:48 PM
In the database, there is a table for `requests`.  The table only contains the song ID, not the artist or title so you would need to gather, also the info from the `songs` table.

Yes i am aware of that. One way i was thinking is running for every song that hasn't been played and compare, but to be honest i think this is not gonna be efficient for the service.

stevewa

research sql joins using NOT IN (1, 2, 3, etc)

populate the numbers inside the parenthesis with the track ids that are in the requests table.
that will ignore any tracks in the request table, so they won't be show in the list of tracks to request.

urayoan

Quote from: stevewa on August 17, 2018, 02:40:42 PM
research sql joins using NOT IN (1, 2, 3, etc)

populate the numbers inside the parenthesis with the track ids that are in the requests table.
that will ignore any tracks in the request table, so they won't be show in the list of tracks to request.

I will try that. Thank you stevewa!

hypadj33

Quote from: DJ Garybaldy on August 10, 2018, 03:47:45 PM
Currently looking for an answer on this one with our request script, There's a few anomalies somewhere which we can't seem to fathom out.
Its also letting people search for disabled track titles too which is bamboozling us. We're going to look at it when we get chance to get our coding heads together.
Someone may come up with a fix before us so its best to check back on the forums.

Did You ever find a solution to this DjGarybaldy?, i have a few subcats i need to exclude from showing in the requests, but they are still being found even though they should have been disabled.

DJ Garybaldy

Quote from: hypadj33 on October 25, 2019, 12:27:44 AM
Did You ever find a solution to this DjGarybaldy?, i have a few subcats i need to exclude from showing in the requests, but they are still being found even though they should have been disabled.
We're no longer developing any website scripts, so no we didn't figure this one out.

Not sure if this has been solved by the new website scripts coded by someone else.
Worlds Biggest Fan of RadioDJ

Install MariaDB https://djgarybaldy.blogspot.com/2020/08/installing-maria-db.html

Install RadioDJ: https://djgarybaldy.blogspot.com/2020/08/how-to-install-radiodj-free-radio.html

Into Internet radio for 25 years 1999-2024

RadioDJ 2045 MariaDB 11.2 Windows 11

Jhonny

@ hypadj33 where have you downloaded this?
R.T.F.M. means to me, Read The Fantastic Messages.
Einstein says: Make things simple, but don't make simple things simpler! (wise) this is just my life lesson you know.

I don't do drugs ( ͡° ͜ʖ ͡°)
The Radiodj tutorials site is now managed by Domstad radio .nl still  Just in English

hypadj33

Quote from: Jhonny on October 25, 2019, 12:33:21 PM
@ hypadj33 where have you downloaded this?

I Can't remember Jhonny I found the link somewhere here on the forums.

Jhonny

Just the request.php file, kan you show or attach.
R.T.F.M. means to me, Read The Fantastic Messages.
Einstein says: Make things simple, but don't make simple things simpler! (wise) this is just my life lesson you know.

I don't do drugs ( ͡° ͜ʖ ͡°)
The Radiodj tutorials site is now managed by Domstad radio .nl still  Just in English

hypadj33

#14
Quote from: Jhonny on October 26, 2019, 06:11:14 PM
Just the request.php file, kan you show or attach.

<?php
/*
Request script with wait time between selects.
Originally coded by: Jhonny
Date: 21-12-2016
Code Updated by: Code Monkey/DJGarybaldy
Date: 03-08-2018
*/
########### edit database settings #########
$dataip ""// External IP address
$database ""// Your Databse name
$username "";  // Your database username
$userpass ""// Your database password
$dataport "3306";  // database port number (You change ports at your own risk)
############Other settings ###########
$timezone "Europe/London";  // Your time zone http://php.net/manual/en/timezones.php
$reqLimit '100'// Request limit per day
$req_wait '5'// waiting minutes between requests
$req_event ''// showing how many minutes between requests will be played in event. 0 = don't show
$reqsubcat '33,37,44'// exclude subcats use id numbers like 1,2,3  Empty for show all
$page_limit '50'// How many tracks showing in the page
$track_repeat '1450'// Same track can't play in minutes.
$artist_repeat '300'// Same artist can't play in minutes
$random_seed rand(1,100000); // Generate random number (Used in combo with SQL Rand) / Edge fix
$random_limit '20'//Sets the limit and button
###### End Edit settings #######

##### Standard #####
$adjacents '5'// paginations blocks
#### language part ########
$lang = array();
$lang['ALT_REQ']= "Select song";
$lang['GO_BACK']= "Go back";
$lang['COL_NUM']= "#";
$lang['COL_ARTIST']= "Artist name";
$lang['COL_DURATION']= "Duration";
$lang['COL_REQ']= "&nbsp;";
$lang['COL_TITLE']= "Track title";
$lang['ERROR_FIND']= "Didn't find what you were looking for? Search again!";
$lang['ERROR_LIMITREACHED']= "Sorry, but you've reached the request limit for one day.";
$lang['ERROR_LIMITREACHED2']= "You've now reached the request limit for today.";
$lang['ERROR_REQUEST']= "The song can't be requested it's already played recently.";
$lang['ERROR_SONGREQ']= "The selected song is already requested.<br />Please try again later, or select another song!";
$lang['ERROR_TRACKID']= "Please select a song in order to send a request!";
$lang['ERROR_TRACKREQ']= "Sorry, this track is already in the request list and hasn't played yet.";
$lang['ERROR_UNKNOWN']= "Unknown error occurred! Try again ...";
$lang['ERROR_USERNAME']= "Please enter your name in order to send a request!";
$lang['ERROR_TRACKREQ_TIME']= "Sorry, you'll have to wait ";
$lang['ERROR_TRACKREQ_TIME2']= " more minutes before you can make another request.<br />Press F5 to re-submit this request";
$lang['MSG_NORESULTS']= "No results to display, on your search...";
$lang['MSG_REQSUCCESS']= "Your request for this song, was successfully placed";
$lang['REQ_BUTTON']= "Send request";
$lang['REQ_DESCRIPTION']= "Please enter your request details below";
$lang['REQ_MESSAGE']= "Message (Optional):";
$lang['REQ_NAME']= "Your name (required)";
$lang['REQ_PLAYED']= "This song is played or requested, before your selection, sorry.";
$lang['REQ_PLAYNO']= "This track can't be selected now, please try it later.";
$lang['REQ_RANDOM']= "Random";
$lang['REQ_RANDOM2']= "Another random";
$lang['REQ_SELECT']= "Select Song";
$lang['REQ_SELECTED']= "You've selected:";
$lang['REQUEST_DIS']= "You can request a song to put in the top playlist of the station";
$lang['REQ_A_TRACK']= "Track Requests";
$lang['REQUEST']= "Request a song";
$lang['SEARCH_BUTTON']= "Search";
$lang['SEARCH_TXT']= "Search for an artist or title";
$lang['SEE_RULS_A']= "Select rules: no more than";
$lang['SEE_RULS_B']= "per day on IP address";
$lang['NAV_NEXT']= "Next";
$lang['NAV_PREV']= "Previous";
$lang['COL_YEAR']= "Year";
$lang['MSG_REQSUCCESS_MADE'] = "You made a total request of ";
$lang['MSG_REQSUCCESS_TOT'] =  "of the ";
$lang['MSG_REQSUCCESS_DAY'] = "limited per day.";
$lang['WAIT'] = "You'll have to wait ";
$lang['WAIT2'] = " min. before you can make a new request.";
$lang['REQ_LISTED'] = "Track is in the request list and not played yet.";
$lang['SELECTED'] = "Is selected";
$lang['REQ_EVENT'] = "Every ";
$lang['REQ_EVENT2'] = "minutes a request is played!";
$lang['REQUESTED_TRACK_LIMITS'] ="Requests are limited to ";
$lang['REQUESTED_TRACK_LIMITS1'] =" per day and ";
$lang['REQUESTED_TRACK_LIMITS2'] =" minutes between.";
$lang['NOREQ'] = "Unavailable";
$lang['OFFLINE'] = "The station is currently offline";
########### Don't edit billow ##########
date_default_timezone_set($timezone);
 
### Connection ###
$conn mysqli_connect($dataip,$username,$userpass,$database,$dataport);
?>


Ive deleted db details on purpose. but as you can see i have tried to disable certain subcats and it still shows them