Author Topic: "Don't play the same track" is not working v1.8.2  (Read 929 times)

MikeRichardson

  • New User

  • Offline
  • *
  • 8
"Don't play the same track" is not working v1.8.2
« on: June 06, 2019, 08:35:20 PM »
I have "Don't play the same track"  set to 480 minutes. Yet the Auto DJ is still pulling in tracks that just played 20 minutes ago sometimes!

Does Radio DJ 2.0 fix this or is there any fix that I can apply?

(Horrible image quality due to forum restrictions.)

[attachment deleted by admin]

MikeRichardson

  • New User

  • Offline
  • *
  • 8
Re: "Don't play the same track" is not working v1.8.2
« Reply #1 on: June 06, 2019, 09:23:36 PM »
Here it strikes again!

[attachment deleted by admin]

MikeRichardson

  • New User

  • Offline
  • *
  • 8
Re: "Don't play the same track" is not working v1.8.2
« Reply #2 on: June 06, 2019, 10:17:10 PM »
I fixed it. The Stored Procedure was missing. Here is the SQL you must execute if stored procedure is missing in the database for radioDJ v1.8.2.

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

DELIMITER $$

CREATE PROCEDURE UpdateTracks(IN trackID INT, IN tType INT, IN curListeners INT, IN historyDays INT, IN pWeight DOUBLE)
BEGIN

SET @tArtist = (SELECT artist FROM songs WHERE ID=trackID);

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

-- UPDATE ARTISTS
IF tType = 0 OR tType = 9 THEN
    UPDATE `songs` SET `artist_played`=NOW() WHERE `artist`=@tArtist;
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;

-- 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`(date_played, song_type, id_subcat, id_genre, duration, artist, original_artist, title, album, composer, `year`, track_no, disc_no, publisher, copyright, isrc, listeners)
    SELECT NOW(), song_type, id_subcat, id_genre, duration, artist, original_artist, title, album, composer, `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 ;

btthevoice

  • New User

  • Offline
  • *
  • 16
    • Bob Taylor Voice Productions
Re: "Don't play the same track" is not working v1.8.2
« Reply #3 on: June 25, 2019, 09:04:51 AM »
I'm getting artist repeats even though my "don't repeat artist" is set to 240 min.
So I have to be a SQL programmer to fix this?
I have no idea what to do.

Jhonny

  • Hero Member

  • Offline
  • *****
  • 4183
  • Personal Text
    Peace, enjoy life, last sleep is longer than live!
Re: "Don't play the same track" is not working v1.8.2
« Reply #4 on: June 25, 2019, 10:51:22 AM »
rotaion has enough tracks to play?
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 ( ͡° ͜ʖ ͡°)

FreerunMedia

  • Hero Member

  • Offline
  • *****
  • 873
  • Personal Text
    Proud user of RadioDJ
    • Radio 251 , Gewoon gezellig
Re: "Don't play the same track" is not working v1.8.2
« Reply #5 on: July 02, 2019, 10:30:19 AM »
I have "Don't play the same track"  set to 480 minutes. Yet the Auto DJ is still pulling in tracks that just played 20 minutes ago sometimes!

Does Radio DJ 2.0 fix this or is there any fix that I can apply?

(Horrible image quality due to forum restrictions.)

Try checking your event logs first. RadioDJ makes entries in it when tracks can't be played because of the rules. It's working fine at my place but as Jhonny said, you need to have more  than enough files in the categories. Like 10 files in the hits categorie and a seperation for 240 minutes, won't work at all.
Running 3 editions V1.8.2 at www.salto.nl and v1.8.2 at radio251.nl. ( NOW with 2 live studio's! )