-
Notifications
You must be signed in to change notification settings - Fork 359
Description
-
Platform: All
-
MythTV version: fixes/32
-
Package version:
-
Component: metadatalookup
What steps will reproduce the bug?
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, that field was empty.
For the same show, the early contents of the database entries had 'airdate' populated, but no 'airtime'. I'm guessing that at the time the data was populated, the broadcast time had not been decided yet. The missing 'airtime' caused the specific episode lookup to fail.
How often does it reproduce? Is there a required condition?
It's rare, but when it happens, it causes metadata lookups to fail.
What is the expected behaviour?
The lookup scripts should be more flexible to handle these sorts of issues.
If the 'runtime' field is empty, try using the 'averageRuntime' field. If the 'averageRuntime' field is also empty, set a default runtime length. If the 'airtime' field is empty, look for an episode which matches the 'airdate' field.
What do you see instead?
Additional information
Here's an example of the original data 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,
"premiered":"2022-07-13",
"ended":null,
"officialSite":null,
"schedule": {"time":"","days":[]},
"rating": {"average":null},
"weight":94,