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

RadioDJ v2.0.1.4 BETA Released!

Started by Marius, December 06, 2018, 11:02:53 AM

Marius

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:
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:
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:

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.

DJ Garybaldy

Cheers Marius.... my install was painless because I'd already upgraded my database.
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

plauri

I've got some hard work for tonight! Thanks Marius as always  :ok:
Funky Corner Radio
Radiodj v.2.0.4.5 (Windows 10)
http://www.funkycorner.radio
https://www.funkycorner.it
http://www.radiofunkycorner.com

Vanlen

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

Music Box

Marius, thanks for the new release. I'll try it soon    :ok: :ok: :ok:

Eddy73


DJ Garybaldy

#6
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)
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

Calypso

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  ;)

Vanlen

QuoteWhen 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

Marius

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.

plauri

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:

/* 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
Radiodj v.2.0.4.5 (Windows 10)
http://www.funkycorner.radio
https://www.funkycorner.it
http://www.radiofunkycorner.com

Vanlen

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

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


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

704djs

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.

plauri

#14
After doing the Heidi Sql update I checked the code and it's correct, like this:
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.
Funky Corner Radio
Radiodj v.2.0.4.5 (Windows 10)
http://www.funkycorner.radio
https://www.funkycorner.it
http://www.radiofunkycorner.com