Astroprint trigger python file on print start

Hey everyone, first post here so sorry if it’s not up to the forum standards, but I’m glad to keep updating with necessary information.

Context: I own a Tevo Little Monster (the type of printer shouldn’t be needed for the question, but anyway it’s a delta), which is hooked up to my own Raspberry Pi 3 B+ that is set up as a traditional AstroBox.

What I’m trying to do: I have a RaspiCam attached to my Pi and they are both mounted in an optimal location for capturing a live video feed of the printer on Astroprint. However, the RaspiCam isn’t the highest quality and the area my printer is in doesn’t get good light, leading to a dark, fuzzy image when streaming that makes it impossible to clearly see the print. To fix this, I created a python script that uses ADB to turn on the flashlight of a phone connected to the Pi via USB. Now, before you say I’m overcomplicating this or suggest that I use the android phone camera, I have already tried droidcam, ip webcam, and several other clients but astroprint just doesn’t wanna work with them. So basically I would like to use my old phone’s flashlight to light the bed when printing.

What I need help with: I need a way to trigger a python script or somehow let the Pi know when a print has started so that I can trigger my custom python script. I have tried combing through all the astroprint source files to find a file that initiates the print but all the files are either unrelated or really confusing. So i’m wondering if there’s a easy way to trigger another Pi function such as a python script when a print starts and possibly end the script when a print ends?

Thank you everyone in advance and I am also open to completely alternative solutions that may fix my lighting/live streaming issue.