Closed TheDerpySage closed 2 years ago
Also I plan on making some improvements to the playout config, including allowing for single files, and sequential playback rather than shuffling whats in a dir along with some other options for my own use.
I can merge those too, if you'd like.
ALSO Alternatively we could make looping default behavior and make it so theres a flag for only playing through once...
Fixed an issue with consecutive retries not being used correctly, and updated the play_item logic. Also decided to fix bumps playing on the last regular item in a playlist. Other readability changes.
As of now, this should all be working. all that'd be left is to determine if the -l loop flag should be flipped to a play once flag, and if we should flip the default behavior back to looping.
Thank you for your changes! Sorry for taking a while to approve
Sorry I would've done the previous one in this merge as well if I'd known my curiosity would get me this far...
Added two flags for use -l for Looping, default behavior is now not to loop the playout.ini -p PLAYOUT_FILE to define an ini file, default behavior just reads playout.ini
I added these I personally wanted the ability to launch streams unattended through other processes, and figured it was widely applicable.
Moved playing a file from the client to its own function (for reuse), and added the bumper feature. I'd noticed finally that this was largely unused, so I tried my hand at implementing it. I made 'bump_chance' a float when being read in since it made sense to cast it there rather than in my if statement. Added the bumpers/ folder, with three random ones found on https://www.bumpworthy.com for testing purposes.
I kind of don't like that the last regular mediaitem has a chance to trigger the bumper right before the upnext, but I figured it wasn't bad enough to try to plan around.
Let me know if you have any questions or concerns.