i know i said tests would be next but pythons mocking is kicking my ass and i've had these changes running for a while without issues so might aswell:
changelog: * did major refactoring script is now seperated into following files: * arguments.py - argparse and config file parse logic * constants.py - global and not so global constants * coordination.py - stream recording state and it's control logic. * environment.py - environment validation and setup logic * post_process.py - post processing logic. converting merging and temporary file managing * recording.py - flv recording logic * utils.py - generic utils that don't fit anywhere else * tt_lives_recorder.py stream detection/api invoking main loop logic this should make the code easier to navigate if you want to look at it (which you should since i'm a stranger posting unverified code on the internet) * added support for dual streams, will now record streams that someone you follow has joined the end result might be you recording some random dude doing nothing for 5hours with your follower having joined for 5 seconds at the start no flags to disable it for now