Not sure what happened but the script I submitted and had it locally in my repo and on GithHb had this change after CvH noted it during the PR review but it didn't make it to the PR.
Kodi doesn't pass environment variables unless the user saves a configuration. Use sub3 github release repo for downloading
NextPVR 6.1.0 with netcore 6 with configuration