Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add match by date when no time specified in TvMaze
Sometimes, the TvMaze database only specifies a date and not a time for an episode or set of episodes. This is most common in webChannel originated shows. In such a case, the 'Find Episode by Timestamp' syntax, fails to find an exact or close match. For example: tvmaze.py -N "Criminal Minds" "2022-11-24 21:00:00" For this episode, in the TvMaze database airtime = airdate = 2022-11-24 With this code update, we detect when no airtime is specified in the database, and apply a match-by-date behavior. The match-by-date results are only used as a last resort. First we select exact timestamp matches. If there are none of those, we select close timestamp matches. If there are none of those, then we'll select date only matches. For example: tvmaze.py -N "Criminal Minds" "2022-11-24 21:00:00" <?xml version='1.0' encoding='UTF-8'?> <metadata> <item> <title>Criminal Minds</title> <subtitle>Just Getting Started</subtitle> ... <season>16</season> <episode>1</episode> <inetref>81</inetref> ... </item> <item> <title>Criminal Minds</title> <subtitle>Sicarius</subtitle> ... <season>16</season> <episode>2</episode> <inetref>81</inetref> ... </item> </metadata> Note that there were 2 episodes released on 2022-11-24, so both episodes appear in the output results. In addition, a display of 'runtime' has been added for the -M invocation option. For example tvmaze.py -M "Fire Country" <?xml version='1.0' encoding='UTF-8'?> <metadata> <item> <title>Fire Country</title> ... <inetref>60339</inetref> <collectionref>60339</collectionref> <language>en</language> <releasedate>2022-10-07</releasedate> <userrating>6.300000</userrating> <popularity>99.0</popularity> <year>2022</year> <runtime>60</runtime> ... </item> </metadata> Resolves MythTV#654
- Loading branch information