ObserverHerb / Celeste

A Twitch bot written in C++/Qt with a focus on multimedia and native performance
GNU General Public License v3.0
6 stars 0 forks source link

Shuffle vibe playlist instead of grabbing random index #101

Closed ObserverHerb closed 1 year ago

ObserverHerb commented 2 years ago

The purpose of the shuffle prior to the Qt6 migration was to ensure the same song isn't played twice. Modify Music::Player class to play from a shuffled list instead of choosing a random index every song.

ObserverHerb commented 2 years ago

This could possibly be handled by the File::List object itself. Add a Unique() function that returns a single random file, which leaves Random() in place for when we don't care about duplicates.

ObserverHerb commented 2 years ago

By moving an instance of File::List into the Command class, I could let commands handle this themselves, which would solve the problem of repeat TikTok videos, too. Commands could have a member function in addition to Path() that would pull a random file from the internal File::List. (Path() has to stay intact for screens like the configuration GUI.) Also, commands could have a "unique" or "duplicates" flag, similar to protect, that determines whether duplicates are allowed or not.

ObserverHerb commented 1 year ago

Closed by c584e59d481079e2e54129562f23dd881ad26101