Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
A recording of a broadcast of the first episode in season 16 of "Criminal Minds" on CBS lead to a metadata lookup failure. The general syntax for this metadata lookup was: tvmaze.py -N "Criminal Minds" "2022-11-24 11:00:00" Investigation revealed that for recent years this show is normally only available on a streaming service called Paramount+. https://api.tvmaze.com/shows/81 ... "webChannel":{"id":107,"name":"Paramount+", "country":null,"officialSite": "https://www.paramountplus.com/"} ... The null value for Country caused the Timezone retrieval code in tvmaze.py to fail. The code has been updated to handle a null Country field. While regression testing, another crash appeared. tvmaze.py -N "The Masked Singer" "2022-11-24 19:00:00" This show has distinct versions in many countries and timezones. country='United States', timezone='America/New_York' country='United Kingdom', timezone='Europe/London' country='Australia', timezone='Australia/Sydney' country='Belgium', timezone='Europe/Brussels' country=None, show_tz =None (Japanese version) country='Finland', timezone='Europe/Helsinki' country='Germany', timezone='Europe/Busingen' country='Israel', timezone='Asia/Jerusalem' country='Mexico', timezone='America/Monterrey' The null Country field for the Japanese version is handled fine, but passing 'Asia/Jerusalem' to astimezone() caused it to throw an exception. UnboundLocalError: local variable 'ttmfmt' referenced before assignment This appears to be a bug in python3. To prevent it from crashing our script, UnboundLocalError has been added to the exception catcher. Some of the debug print messages have also been updated to improve their format. Refs: MythTV#654
- Loading branch information