Boerderij / Varken

Standalone application to aggregate data from the Plex ecosystem into InfluxDB using Grafana as a frontend
MIT License
1.15k stars 134 forks source link

[BUG] TypeError creating SonarrEpisode structure with Sonarr v3.0.7.1477 ("tvdbId" added) #230

Closed dotnetjeff closed 2 years ago

dotnetjeff commented 2 years ago

Describe the bug Varken is throwing a TypeError after updating Sonarr to 3.0.7.1477. Looks like they added a field named "tvdbId" to SonarrEpisode structure and this likely needs to be updated in structures.py. I believe that this is also preventing the data from being populated in InfluxDB. I compared the rest of the fields and it looks like it was only tvdbId that was added.

To Reproduce Steps to reproduce the behavior:

  1. Use Sonarr 3.0.7.1477
  2. Configure Varken to scan Sonarr

Expected behavior No errors

Environment (please complete the following information): Docker develop tag (up to date as of this post)

Additional context Example error message:

2022-03-04 22:28:14 : ERROR : sonarr : TypeError has occurred : <lambda>() got an unexpected keyword argument 'tvdbId' while creating SonarrEpisode structure for show. Data attempted is: {'seriesId': 23, 'tvdbId': 0, 'episodeFileId': 13808, 'seasonNumber': 33, 'episodeNumber': 12, 'title': 'Pixelated and Afraid', 'airDate': '2022-02-27', 'airDateUtc': '2022-02-28T01:00:00Z', 'overview': 'When Homer and Marge are lost in an icy wilderness, they must push themselves to their limits to survive.', 'hasFile': True, 'monitored': True, 'absoluteEpisodeNumber': 718, 'unverifiedSceneNumbering': False, 'series': {'title': 'The Simpsons', 'sortTitle': 'simpsons', 'status': 'continuing', 'ended': False, 'overview': 'Set in Springfield, the average American town, the show focuses on the antics and everyday adventures of the Simpson family; Homer, Marge, Bart, Lisa and Maggie, as well as a virtual cast of thousands. Since the beginning, the series has been a pop culture icon, attracting hundreds of celebrities to guest star. The show has also made name for itself in its fearless satirical take on politics, media and American life in general.', 'network': 'Disney+', 'airTime': '20:00', 'images': [{'coverType': 'banner', 'url': 'https://artworks.thetvdb.com/banners/graphical/71663-g13.jpg'}, {'coverType': 'poster', 'url': 'https://artworks.thetvdb.com/banners/posters/71663-15.jpg'}, {'coverType': 'fanart', 'url': 'https://artworks.thetvdb.com/banners/fanart/original/71663-10.jpg'}], 'seasons': [{'seasonNumber': 0, 'monitored': False}, {'seasonNumber': 1, 'monitored': False}, {'seasonNumber': 2, 'monitored': False}, {'seasonNumber': 3, 'monitored': False}, {'seasonNumber': 4, 'monitored': False}, {'seasonNumber': 5, 'monitored': False}, {'seasonNumber': 6, 'monitored': False}, {'seasonNumber': 7, 'monitored': False}, {'seasonNumber': 8, 'monitored': False}, {'seasonNumber': 9, 'monitored': False}, {'seasonNumber': 10, 'monitored': False}, {'seasonNumber': 11, 'monitored': False}, {'seasonNumber': 12, 'monitored': False}, {'seasonNumber': 13, 'monitored': False}, {'seasonNumber': 14, 'monitored': False}, {'seasonNumber': 15, 'monitored': False}, {'seasonNumber': 16, 'monitored': False}, {'seasonNumber': 17, 'monitored': False}, {'seasonNumber': 18, 'monitored': False}, {'seasonNumber': 19, 'monitored': False}, {'seasonNumber': 20, 'monitored': False}, {'seasonNumber': 21, 'monitored': False}, {'seasonNumber': 22, 'monitored': False}, {'seasonNumber': 23, 'monitored': False}, {'seasonNumber': 24, 'monitored': False}, {'seasonNumber': 25, 'monitored': False}, {'seasonNumber': 26, 'monitored': False}, {'seasonNumber': 27, 'monitored': False}, {'seasonNumber': 28, 'monitored': False}, {'seasonNumber': 29, 'monitored': False}, {'seasonNumber': 30, 'monitored': False}, {'seasonNumber': 31, 'monitored': False}, {'seasonNumber': 32, 'monitored': True}, {'seasonNumber': 33, 'monitored': True}], 'year': 1989, 'path': '/media/TV/The Simpsons', 'qualityProfileId': 8, 'languageProfileId': 1, 'seasonFolder': True, 'monitored': True, 'useSceneNumbering': False, 'runtime': 25, 'tvdbId': 71663, 'tvRageId': 6190, 'tvMazeId': 83, 'firstAired': '1989-12-17T00:00:00Z', 'seriesType': 'standard', 'cleanTitle': 'thesimpsons', 'imdbId': 'tt0096697', 'titleSlug': 'the-simpsons', 'certification': 'TV-PG', 'genres': ['Animation', 'Comedy'], 'tags': [], 'added': '2015-05-09T23:49:00.9619267Z', 'ratings': {'votes': 24136, 'value': 8.9}, 'id': 23}, 'id': 16005}

Cajs commented 2 years ago

@dotnetjeff I believe I resolved this on #231 which has just been merged into develop :)

dotnetjeff commented 2 years ago

Confirmed that it's fixed in develop. Looking good.