Here's some preliminary code to attempt to find a show name from the Twitch title when it's updated.
It uses a new column, "rule" in the shows table to store the RegEx to find the show ID.
It's fairly simple, and I've tried to make it reasonably bulletproof, so if there's 0 or multiple matches it doesn't do anything. It'll also automatically remove an override if the title has changed and a new show has been found.
I've tried to match my code style to what's already there. I've also not tested this on a live instance, as the repo is missing necessary things to do that, like a DB skeleton. This is also the first time I've written Python, so please be gentle. :D
Here's some preliminary code to attempt to find a show name from the Twitch title when it's updated. It uses a new column, "rule" in the shows table to store the RegEx to find the show ID. It's fairly simple, and I've tried to make it reasonably bulletproof, so if there's 0 or multiple matches it doesn't do anything. It'll also automatically remove an override if the title has changed and a new show has been found.
I've tried to match my code style to what's already there. I've also not tested this on a live instance, as the repo is missing necessary things to do that, like a DB skeleton. This is also the first time I've written Python, so please be gentle. :D