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

Rotation querys

Started by Jhonny, January 04, 2020, 12:12:03 AM

Jhonny

If you have no knowledge of sql, it might be difficult to make a rotation query with the rotation query maker in radio dj.

I tried to make a script to make this a little easier.
I placed it in a small web server if you don't have a server.
Let it know if it's useful.
Download

Main screen.
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

chebaev

I tried to use this, but when i write MySQL information and click the button "Save configuration settings" is nothing is happening. Just the page is reloaded.
Radio ORV - www.orvmedia.com/radioorv.m3u

Jhonny

It should just work on this way.

Video
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

Jhonny

Quote from: chebaev on January 04, 2020, 10:34:17 PM
I tried to use this, but when i write MySQL information and click the button "Save configuration settings" is nothing is happening. Just the page is reloaded.
So sorry! the download link ref to a other script  :huh:   it's fix now.
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

FreerunMedia

NICE! I didn't understand it but thats me  :bash: :hihi: I am searching for something else though. So i will ask the SQL guru Jhonny :hihi:

The thing i would love to have is automatic change from normal rotation to christmas rotation and back So let's say when events are running and the timeslot is over, give it a +1 year to prepair it for the upcoming year. Same for the "dodenherdenking" that is started every year on one day. I can't find it in the forum for the only reason, it's sooooooo much topics  :P

Can you help me out or point me to the part of the forum that i need?
Running 3 editions V1.8.2 at www.salto.nl and v1.8.2 at radio251.nl. ( NOW with 2 live studio's! )

Jhonny

This can be done with the events and some sql script that runs on 1- Jan every  year the sql file is used to reset the date for Christmas / dode herdenking (all  WWII victims)  etc when there date to play and from disabled to anabled (for the requests option).
I have to look in to it how to make the sql file work best.
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

EmmaSts

#6
Quote from: Jhonny on January 05, 2020, 02:31:57 PM
This can be done with the events and some sql script that runs on 1- Jan every  year the sql file is used to reset the date for Christmas / dode herdenking (all  WWII victims)  etc when there date to play and from disabled to anabled (for the requests option).
I have to look in to it how to make the sql file work best.
Just a note Jhonny :)
Don't do the SQL as a Day or Yearly rotation Query as over time it go out of align... do it by day / month of todays date (Plus easier to add to) :)

for eg:
editted as thinking about it you'd need a query to return to normal.....

$date = date("d/m");
if($date == '4/7'){
$sqlquery //run query
}elseif($date == '5/7'){
$sqlquery //run return to normal query
}elseif($date == '1/12'){
$sqlquery //run query
}elseif($date == '1/1'){
$sqlquery //run return to normal query
}else{
// Do nothing
}


:)

Jhonny

#7
I was thinking, if the special tracks where in a special folder (most time there are), just disable or enable is simplest. as for Halloween ect. to.then only tho euery's are needed
it's just the id_subcat to selectlike:
UPDATE SONGS
SET enabled = O (-1)
WHERE id_subcat = (christmas ID)  And id_subcat =  (WW2 ID) AND id_subcat = (whatever ;
And opposed is
UPDATE SONGS
SET enabled = 1
WHERE id_subcat = (christmas ID)  And id_subcat =  (WW2 ID) AND id_subcat = (whatever ;
And of course you can use something like this on date for certain periods of time. (shortly before and shortly after) with events.
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

Jhonny

Em updating (expanding) the script.
Like select between bpm's
any other ideas or improvements?



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