Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The script tvmaze/show.py had a line which retrieved the episode duration from the metadata provider, but then assigned it to num_episodes, which makes no sense. There is no code looking for num_episodes, but there is code looking for runtime, so the line has been fixed to assign to runtime. Using the TVmaze service for metadata lookup, there are rare cases where the 'runtime' field is empty, but 'averageRuntime' is not. This happened when looking up metadata for a TV show called "Everything's Trash". Note that the database entry for this show was subsequently updated to include the missing 'runtime' field. But on the night it was recorded, and for several days later, that field was null. Here's an excerpt of the original metadata for "Everything's Trash": "id":60518, "url":"https://www.tvmaze.com/shows/60518/everythings-trash", "name":"Everything's Trash", "type":"Scripted", "language":"English", "genres":[], "status":"Running", "runtime":null, "averageRuntime":30, To handle this type of scenario, when the 'runtime' field is null, read the duration from the 'averageRuntime' field. If both are null, then avoid trying to cast that value to an integer in tvmaze.py. Refs: MythTV#654
- Loading branch information