l3uddz / traktarr

Script to add new series & movies to Sonarr/Radarr based on Trakt lists.
GNU General Public License v3.0
574 stars 52 forks source link

Radarr: Year passed as string, needs to pass as integer #144

Closed owine closed 3 years ago

owine commented 3 years ago

Describe the bug Traktarr throws an error when attempting to add a movie to Radarr

From exchange with ta264 on Discord

looks like it's passing a year as a string when it should be an integer
before radarr didn't care but now it does

To Reproduce Run movies task to add movies

Expected behavior Successfully add movies to Radarr

Logs

2021-02-08 15:39:05,896 - INFO       - Traktarr                            - movies                              - ADDING: 'HG Wells: War with the World (2006)' | Country: GB | Language: EN | Genre(s): Drama, Science-Fiction, Thriller 
2021-02-08 15:39:05,915 - ERROR      - media.pvr                           - _add_object                         - Failed to add 'HG Wells: War with the World [18986]' - status_code: 400, reason: BadRequest: Invalid request body. The JSON value could not be converted to System.Int32. Path: $.year | LineNumber: 0 | BytePositionInLine: 337.
2021-02-08 15:39:05,915 - ERROR      - Traktarr                            - movies                              - FAILED ADDING: 'HG Wells: War with the World (2006)'

System Information

Additional context This is similar to an issue that impacted Trackarr

saltydk commented 3 years ago

Fixed in https://github.com/l3uddz/traktarr/commit/352786c1e00b5103634d143ac16337247d8ee14a