RadioDJ - Free Radio Automation Software Forum

RadioDJ v1.7+ => Plugin Development => Topic started by: DancePassionFL on November 16, 2017, 07:14:36 PM

Title: Now Playing Plugin. Add genre?
Post by: DancePassionFL on November 16, 2017, 07:14:36 PM
Is somebody can make Now Playing Plugin show the Genre.
I am willing to pay.
I am hosting educational radio for my students and they want to recognize what king of Dance you can dance on that song.
I already organize all my music library to Waltz, Tango, Cha Cha ... and put the correct Dance in Genre.

Have a web player which display the name of the song, but RadioDJ does not send a ~ $genre$
Is work right now only with Artist and Name of the songs ($artist$ ~ $title$)
Is somebody can add the Genre?

Link to the radio is:

https://www.dancepassionfl.com/ (https://www.dancepassionfl.com/)

Thank you
Title: Re: Now Playing Plugin. Add genre?
Post by: Jhonny on November 16, 2017, 09:04:44 PM
You can send the $genre-id$ and in the script use it to get the genre from the database.

What file do you use?
From the docs folder of radiodj (RadioDJ\Docs\Now Playing Plugin Help\PHP Script\song_update1.php or song_update2.php) ?


Title: Re: Now Playing Plugin. Add genre?
Post by: DancePassionFL on November 16, 2017, 09:18:13 PM
I am not using them. I am using the simple:

c:/Program Files x86/RadioDJ/Docs/now_playing.txt

send to

MB Recaster

then to

icecast
Title: Re: Now Playing Plugin. Add genre?
Post by: Jhonny on November 16, 2017, 09:40:10 PM
What RadioDJ version are you using?

Title: Re: Now Playing Plugin. Add genre?
Post by: DancePassionFL on November 17, 2017, 12:13:25 AM
RadioDJ v1.8.2.0
Title: Re: Now Playing Plugin. Add genre?
Post by: Jhonny on November 17, 2017, 12:52:15 AM
Will see if it can be done, and have to test it.
Will take some time!


Title: Re: Now Playing Plugin. Add genre?
Post by: DancePassionFL on November 17, 2017, 01:07:17 AM
thank you
Title: Re: Now Playing Plugin. Add genre?
Post by: Jhonny on November 19, 2017, 02:05:34 AM
I can't get it done with the txt file, sorry.
Maybe in the new version that there is the variable $genre$.
Title: Re: Now Playing Plugin. Add genre?
Post by: Brodephat on November 19, 2017, 08:38:36 AM
Yeah, currently the genre "name" is not a part of the stream variables but could be added into the next version. You would have to have the genre id numbers listed as variables in your php script and assigned the name values to the corresponding id number in the script.

It can be done but not through RadioDJ unless you are connecting to the MYSQL database directly.

example php:

If genre Rock had the id number 12

if ($genreid == "12") { $genre = "Rock";
}
Title: Re: Now Playing Plugin. Add genre?
Post by: DancePassionFL on November 20, 2017, 07:48:37 PM
Thank you Jhonny & Brodephat for the effort. Changing the MYSQL is far away of my knowledge.
I will wait for next version of RadioDJ and hope this option will be added.

Thank you again.

Ivan
Title: Re: Now Playing Plugin. Add genre?
Post by: DancePassionFL on January 12, 2018, 12:16:05 AM
I upgrade RadioDJ to v 2.0.0
I have a lot more options, but still I can't make $gender$ to work

Everything else is work except $gender$

Any ideas?
Title: Re: Now Playing Plugin. Add genre?
Post by: Marius on January 12, 2018, 08:06:07 AM
Do you need GENDER or GENRE?
I ask this because you've mentioned both...
Title: Re: Now Playing Plugin. Add genre?
Post by: DancePassionFL on January 12, 2018, 07:05:03 PM
Sorry Marius
It is my mistake, English is not my first language.
I organize my music library to genre:
Waltz
Tango
Salsa
...

I want to educate my student, to show what dance is the song.
When I use:
$genre-id$ - $title$ - The beats per minute is: $bpm$

I got:
165 - Softly As I Leave You - The beats per minute is: 74

instead of:
Waltz - Softly As I Leave You - The beats per minute is: 74
Title: Re: Now Playing Plugin. Add genre?
Post by: DancePassionFL on January 12, 2018, 10:44:48 PM
I did it.

I "trick" RadioDj.

Instead of "genre" I use "composer"

So first I replace the "composer" with "Waltz" or "Tango" or "Salsa" ....

Then my Now Playing Template is:

$composer$ - $title$ - The beats per minute is $bpm$

You can check at:

https://www.dancepassionfl.com/ (https://www.dancepassionfl.com/)

Thank you Marius for that beautiful software.

Ivan

Title: Re: Now Playing Plugin. Add genre?
Post by: PresidentOfACPJ on February 13, 2019, 04:04:21 AM
I wanna know if is it posible t add, the current song playing tags into radiodj database, gettint the tag on the web, then insertin into db then use heid sql manually or automatically to insert tags from database into original mp3 files.

IS IT POSIBLE?

i want to do it automatically in mass. a lot of files at the same time, can it be done automatically only by playing songs normally in radiodj, and using demoscript? nad maybe a script else to make the databse be inserted into mp3 files?

Does someone have this script?


THNK YOU GUYS.
Title: Re: Now Playing Plugin. Add genre?
Post by: PresidentOfACPJ on March 26, 2019, 07:39:16 AM
Yeah, currently the genre "name" is not a part of the stream variables but could be added into the next version. You would have to have the genre id numbers listed as variables in your php script and assigned the name values to the corresponding id number in the script.

It can be done but not through RadioDJ unless you are connecting to the MYSQL database directly.

example php:

If genre Rock had the id number 12

if ($genreid == "12") { $genre = "Rock";
}

Actually RadioDJv2 acept it...

Just go to C:\RadioDJv2\templates\NowPlaying

So openthe file TextTemplate.txt and insert there:

$genre-id$
a
Ready to go!


UPDATE:  I noticed now that really it wont work, because its gonna show only the ID, not the word of the genre :( only with that php code,like if (genre == 6  ){echo rock}; or something like this :)
Title: Re: Now Playing Plugin. Add genre?
Post by: stevewa on March 26, 2019, 04:40:38 PM
Quote
I wanna know if is it posible t add, the current song playing tags into radiodj database, gettint the tag on the web, then insertin into db then use heid sql manually or automatically to insert tags from database into original mp3 files.

IS IT POSIBLE?

i want to do it automatically in mass. a lot of files at the same time, can it be done automatically only by playing songs normally in radiodj, and using demoscript? nad maybe a script else to make the databse be inserted into mp3 files?


look at a program named "MusicBrainz Picard"
it will batch analyze your mp3 files, get metadata tags from it's web database collection, and update the metatags embedded in the mp3 file.

or, you could write a powershell script to use a dll named libtag_lite (not sure of exact name), which can read and write metadata tags to files on disk. such a script could also connect to your RDJ database and update data in the Songs table.