RadioDJ - Free Radio Automation Software Forum

RadioDJ v2.0.1.4 BETA Released!

Offline Marius

  • *****
  • 5578
    • Radio DJ
RadioDJ v2.0.1.4 BETA Released!
« on: December 06, 2018, 11:02:53 AM »
Changes List:

- Finalized new AutoDJ logic implementation.
- AutoDJ "items to keep" option was modified, if set to zero, it will keep in playlist at least one rotation (like in the old versions), otherwise the playlist will maintain the set number of tracks [NEW];
- AutoDJ will work in background, so the main window will not freeze when a new playlist will be generated [NEW];
- M3U playlist loading will be done in the background, so the main window will not freeze [NEW];
- Added support for M3U8 playlist format [NEW];
- Added more debug output to the windows event logs when loading M3U playlists, if contained files are not found, or not compatible. [NEW]
- Added confirmation dialog for the shuffle option [NEW];
- Minor bugs fixed.

Due a database procedure bug reported in the previous version, there are two ways to make this version work with a previous beta version database:

1. Manually edit the database procedure using HeidiSQL:

Original Code:
Code: [Select]
IF tType = 0 OR tType = 9 THEN
UPDATE `songs` SET `artist_played`=NOW() WHERE `artist`=@curArtist;
UPDATE `songs` SET `title_played`=NOW() WHERE `title`=@curTitle;
IF @tAlbum <> '' THEN
UPDATE `songs` SET `album_played`=NOW() WHERE `album`=@tAlbum;
END IF;
END IF;

Modified Code:
Code: [Select]
IF tType = 0 OR tType = 9 THEN
UPDATE `songs` SET `artist_played`=NOW() WHERE `artist`=curArtist;
UPDATE `songs` SET `title_played`=NOW() WHERE `title`=curTitle;
IF @tAlbum <> '' THEN
UPDATE `songs` SET `album_played`=NOW() WHERE `album`=@tAlbum;
END IF;
END IF;

Notice that the two input variables (curArtist and curTitle) have in front the "@" character which needs to be removed. Just those two, the "@tAlbum" will remain the same.

2. Simply run this query to delete the old procedure code and create it again correctly. The rest of the database will remain untouched:

Code: [Select]
DROP PROCEDURE IF EXISTS `UpdateTracks2`;

DELIMITER $$

CREATE PROCEDURE `UpdateTracks2`(
IN `trackID` INT,
IN `curArtist` VARCHAR(250),
IN `curTitle` VARCHAR(250),
IN `tType` INT,
IN `curListeners` INT,
IN `historyDays` INT,
IN `pWeight` DOUBLE
)

BEGIN
-- Update Count Playedradiodj2
UPDATE `songs` SET `count_played`=`count_played`+1, `date_played`=NOW() WHERE `ID`=trackID;

-- UPDATE ARTIST, ALBUM AND TITLE
SET @tAlbum = (SELECT album FROM songs WHERE ID=trackID);

IF tType = 0 OR tType = 9 THEN
UPDATE `songs` SET `artist_played`=NOW() WHERE `artist`=curArtist;
UPDATE `songs` SET `title_played`=NOW() WHERE `title`=curTitle;
IF @tAlbum <> '' THEN
UPDATE `songs` SET `album_played`=NOW() WHERE `album`=@tAlbum;
END IF;
END IF;

-- UPDATE REQUESTS
IF tType = 9 THEN
UPDATE `requests` SET `played`=1 WHERE `songID`=trackID;
END IF;

-- DISABLE BY PLAYCOUNT
UPDATE `songs` SET `enabled`=0, `play_limit`=0 WHERE `enabled`=1 AND `play_limit`>0 AND `count_played`>=`play_limit` AND `limit_action`=1;

-- DELETE BY PLAYCOUNT
DELETE FROM `songs` WHERE `play_limit`>0 AND `count_played`>=`play_limit` AND `limit_action`=2;

-- MOVE TO SUBCATEGORY
UPDATE `songs` SET `id_subcat`=ABS(limit_action), `play_limit`=0, limit_action=0 WHERE `enabled`=1 AND `limit_action`<0 AND `count_played`>=`play_limit`;

-- UPDATE WEIGHT
IF pWeight>0 THEN
UPDATE `songs` SET `weight`=`weight`-pWeight WHERE `ID`=trackID AND (`weight`-pWeight)>=0;
END IF;

-- UPDATE HISTORY
IF historyDays > 0 THEN
INSERT INTO `history`(trackID, date_played, song_type, id_subcat, id_genre, duration, artist, original_artist, title, album, composer, label, `year`, track_no, disc_no, publisher, copyright, isrc, listeners)
SELECT ID, NOW(), song_type, id_subcat, id_genre, duration, curArtist, original_artist, curTitle, album, composer, label, `year`, track_no, disc_no, publisher, copyright, isrc, curListeners FROM `songs` WHERE ID=trackID;
END IF;

-- DELETE OLDER ENTRIES FROM HISTORY
DELETE FROM `history` WHERE TIMESTAMPDIFF(DAY, `date_played`, NOW()) >= historyDays;

END $$
DELIMITER ;

For the new users, a new clean database install will avoid all enumerated problems and will install the fixed database procedure.

Please let me know your thoughts about the new AutoDJ.  :)

PS: Users who already edited the procedure following my guide from the previous beta topic, don't need to change anything to their database.
DOWNLOADS PAGE

HOW TO FIX RADIODJ DATABASE
----------------
Please don't PM me for support requests. Use the forums instead.

Offline DJ Garybaldy

  • *****
  • 3997
  • Never Get Angry At the Stupid People (Erasure)
    • DJ Garybaldy
Re: RadioDJ v2.0.1.4 BETA Released!
« Reply #1 on: December 06, 2018, 11:42:29 AM »
Cheers Marius.... my install was painless because I'd already upgraded my database.
USER of RadioDJ since 2010

Useful RadioDJ information : https://djgarybaldy.co.uk/category/radiodj/

I cannot give help and support via Private message!

I'm not as scary as I look Honest!

My little pet project: https://t.co/YyVaPOBYBK

Offline plauri

  • *****
  • 1313
    • Funky Corner Radio
Re: RadioDJ v2.0.1.4 BETA Released!
« Reply #2 on: December 06, 2018, 11:49:40 AM »
I've got some hard work for tonight! Thanks Marius as always  :ok:
Funky Corner Radio
http://www.funkycorner.it
http://www.radiofunkycorner.com

Offline Vanlen

  • *****
  • 1138
    • Music for your senses
Re: RadioDJ v2.0.1.4 BETA Released!
« Reply #3 on: December 06, 2018, 03:04:09 PM »
First go - 2.0.1.4 F Beta
Win10/MariaDB
Firstly a big Thank You...for all the great tweaks Marius :ok:

I decided to do a fresh install from scratch and was up and running on test box in about an hour.
Like the choice of Keep in Play List
  •    :ok:

Audio Processing drop down Presets  :cool:
Didn't know about the Priority options in rotations before New? :cool:
The Meter in RadioDJ doesn't lag or skip a beat in this version when fading etc in AutoDJ:cool:

Running a couple of hours and event log show no errors and running very smoothly.

Nice one Marius
Cheers



Forest Green - Music in Nature's Frequency
www.forestgreenradio.ca

Re: RadioDJ v2.0.1.4 BETA Released!
« Reply #4 on: December 06, 2018, 04:03:02 PM »
Marius, thanks for the new release. I'll try it soon    :ok: :ok: :ok:

Offline Eddy73

  • ***
  • 157
Re: RadioDJ v2.0.1.4 BETA Released!
« Reply #5 on: December 06, 2018, 04:17:53 PM »
Bedankt Marius

Offline DJ Garybaldy

  • *****
  • 3997
  • Never Get Angry At the Stupid People (Erasure)
    • DJ Garybaldy
Re: RadioDJ v2.0.1.4 BETA Released!
« Reply #6 on: December 06, 2018, 04:18:50 PM »
I've had 2.0.1.4 running for a few hours now everything seems to be OK, No errors in the error logs


Will do some more testing with playlists over the next couple of days.

**Edit**

When trying to build a 3 hour (180 minute) playlist with playlist builder from rotation it only loads 1 hour of the rotation.  :bash: Only thing I have noticed. (Nothing about this in error logs)
« Last Edit: December 06, 2018, 04:45:56 PM by DJ Garybaldy »
USER of RadioDJ since 2010

Useful RadioDJ information : https://djgarybaldy.co.uk/category/radiodj/

I cannot give help and support via Private message!

I'm not as scary as I look Honest!

My little pet project: https://t.co/YyVaPOBYBK

Re: RadioDJ v2.0.1.4 BETA Released!
« Reply #7 on: December 06, 2018, 06:10:09 PM »
Thanks for the new beta; especially the seperate thread for adding tracks (so no freeze of the main screen) is very welcome.

I noticed, among some other things, this message in the Eventlog:

"AUTODJ ROTATION FROM QUERY WARNING: Your query could not return enough tracks. Please reconsider lowering the repeat values if used in your query, or import more tracks."

There are enough tracks in the database, but I also make choices based on time; in the select is something like "and hour(now())>18" - so if it's 17:12, the query always returns 0 results. I assume this message can be related to that? Ofcourse it's a good message in case you really run out of tracks  ;)

Offline Vanlen

  • *****
  • 1138
    • Music for your senses
Re: RadioDJ v2.0.1.4 BETA Released!
« Reply #8 on: December 06, 2018, 08:08:44 PM »
Quote
When trying to build a 3 hour (180 minute) playlist with playlist builder from rotation it only loads 1 hour of the rotation.

Had the same issue (fresh install.)  It would only load 12 or 13 tracks when choosing 60/90/120 minutes adding to what DJ GaryBaldy has mentioned above.

Cheers
Forest Green - Music in Nature's Frequency
www.forestgreenradio.ca

Offline Marius

  • *****
  • 5578
    • Radio DJ
Re: RadioDJ v2.0.1.4 BETA Released!
« Reply #9 on: December 06, 2018, 08:39:57 PM »
It's not a bug, but for the moment the playlist builfer is limited to 60 minutes playlists in one shot.
DOWNLOADS PAGE

HOW TO FIX RADIODJ DATABASE
----------------
Please don't PM me for support requests. Use the forums instead.

Offline plauri

  • *****
  • 1313
    • Funky Corner Radio
Re: RadioDJ v2.0.1.4 BETA Released!
« Reply #10 on: December 07, 2018, 11:15:37 AM »
I upgraded from 2.0.1.3 then I ran the query update into Heidi Sql, but nothing has changed in the rotation: same two songs one after the other and so on, like before. Maybe I did something wrong updating...

This is what I get:

Code: [Select]
/* Errore nella cartella dei ritagli: The specified path was not found */
/* Delimitatore cambiato in ; */
/* Connessione a 127.0.0.1 tramite MariaDB (TCP/IP), nome utente root, usando la password: Yes… */
SELECT CONNECTION_ID();
/* Connesso. ID thread: 47 */
/* Set di caratteri: utf8mb4 */
SHOW STATUS;
SHOW VARIABLES;
SHOW DATABASES;
USE `radiodj2beta`;
/* Collegamento alla sessione “Unnamed” */
SELECT `DEFAULT_COLLATION_NAME` FROM `information_schema`.`SCHEMATA` WHERE `SCHEMA_NAME`='radiodj2beta';
SHOW TABLE STATUS FROM `radiodj2beta`;
SHOW FUNCTION STATUS WHERE `Db`='radiodj2beta';
SHOW PROCEDURE STATUS WHERE `Db`='radiodj2beta';
SHOW TRIGGERS FROM `radiodj2beta`;
SELECT `DEFAULT_COLLATION_NAME` FROM `information_schema`.`SCHEMATA` WHERE `SCHEMA_NAME`='information_schema';
SHOW TABLE STATUS FROM `information_schema`;
SHOW FUNCTION STATUS WHERE `Db`='information_schema';
SHOW PROCEDURE STATUS WHERE `Db`='information_schema';
SHOW TRIGGERS FROM `information_schema`;
SHOW EVENTS FROM `information_schema`;
SELECT *, EVENT_SCHEMA AS `Db`, EVENT_NAME AS `Name` FROM information_schema.`EVENTS` WHERE `EVENT_SCHEMA`='radiodj2beta';
Funky Corner Radio
http://www.funkycorner.it
http://www.radiofunkycorner.com

Offline Vanlen

  • *****
  • 1138
    • Music for your senses
Re: RadioDJ v2.0.1.4 BETA Released!
« Reply #11 on: December 07, 2018, 04:45:06 PM »
2.0.1.4F Over 24 hours on Win10/MariaDB (Fresh Install and new DB)

No errors in event viewer Just showing RadioDJ events  info
Running Event: Bottom 1/2 Hour ID
Running Event: Playlist 2.0.1.4F Test
......etc.
Nothing amiss that I've found in Tracks Manager by moving sorting, nor Playlist builder (other than your rotation note) and RadioDJ REPORTS show tracks played per rotations and playlist with no dupes or strangeness so far in 24 hours.
Looking good Marius :cool:
Forest Green - Music in Nature's Frequency
www.forestgreenradio.ca

guest17255

TTS 2014 plugin does not open
« Reply #12 on: December 08, 2018, 09:49:39 AM »
https://www.flickr.com/photos/radiomg/46176315822/in/dateposted-public/


https://www.flickr.com/photos/radiomg/32354598858/in/dateposted-public/

Offline 704djs

  • *****
  • 931
  • 704djs We break records like Dj's suppose
    • Hot 107.9 fm
Re: RadioDJ v2.0.1.4 BETA Released!
« Reply #13 on: December 08, 2018, 06:08:33 PM »
just updated to the newer version let you know in 24 to 48 hour  :cool: once again thx
Beat 94.7/Hot 107.9  fm banging the hitz that you wanna hear.

Offline plauri

  • *****
  • 1313
    • Funky Corner Radio
Re: RadioDJ v2.0.1.4 BETA Released!
« Reply #14 on: December 09, 2018, 02:19:13 AM »
After doing the Heidi Sql update I checked the code and it's correct, like this:
Code: [Select]
IF tType = 0 OR tType = 9 THEN
UPDATE `songs` SET `artist_played`=NOW() WHERE `artist`=curArtist;
UPDATE `songs` SET `title_played`=NOW() WHERE `title`=curTitle;
IF @tAlbum <> '' THEN
UPDATE `songs` SET `album_played`=NOW() WHERE `album`=@tAlbum;
END IF;
END IF;

and now tracks played are set with correct played time in "Date Played", "Artist Played", "Title Played" and "Album Played".

The problem with my rotations is that no matter if I set 0 (old method) or 15/20 tracks to be loaded (this works), it seems to me that the engine doesn't count tracks already selected and already ready to be played, because it loads them again...   

For example I have Gene Chandler - Love Quakes (2 times) and Gene Chandler - No One Can Love You (other 2 times) in half an hour.
« Last Edit: December 09, 2018, 02:38:03 AM by plauri »
Funky Corner Radio
http://www.funkycorner.it
http://www.radiofunkycorner.com