Menu

#20 better random, refresh bug and add/remove from random

open
None
5
2004-08-16
2004-06-28
CakTux
No

The PQueue.pm patch will keep ices from playing the
same song too quickly (will check it hasn't played in
the last 3 hours) and will favor least played songs.
The admin_edit_record and tunez.inc.php will fix the
refresh bug for unknown length songs and add the option
to add/remove selected songs from random.
remember to recompile/install the PQueue perl module if
you patch PQueue.pm
Enjoy :)

Vince

Discussion

  • CakTux

    CakTux - 2004-06-28

    tunez-ck1patches-CakTux

     
  • Philip Lowman

    Philip Lowman - 2004-08-16

    Logged In: YES
    user_id=78148

    admin_edit_record and tunez.inc.php patch merged (thanks).

    I'm still looking at possible changes to PQueue as you are
    not the only user who has submitted a change for the random
    algorithm. What will most likely happen is some kind of
    option in a configuration file so users can choose the one
    they prefer.

     
  • Philip Lowman

    Philip Lowman - 2004-08-16
    • assigned_to: nobody --> plowman
     
  • Philip Lowman

    Philip Lowman - 2004-11-13

    Logged In: YES
    user_id=78148

    Your PQueue random SQL change has a side effect where
    because it does a LEFT JOIN on the play table if a song has
    been played multiple times it results in it appearing
    multiple times in the results and thus it could still be
    played anyways so long as it has a timestamp less than
    NOW()-1800.

    In other words, if you played the song 400 times more than
    1800 seconds ago and then once in the last 1800 seconds you
    would have 400 rows to pick one from instead of 401 but the
    song could still be played. Remove the LIMIT 1 and RAND()
    from your query and only select songtitle and you'll see
    what I mean.

     

Log in to post a comment.