Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RadarrAPI.upd_movie does not work #94

Closed
shunluzhang opened this issue Jan 22, 2022 · 3 comments · Fixed by #95
Closed

RadarrAPI.upd_movie does not work #94

shunluzhang opened this issue Jan 22, 2022 · 3 comments · Fixed by #95
Assignees
Labels
type/bug Something isn't working

Comments

@shunluzhang
Copy link

Expected behavior

  1. use RadarrAPI.get_movie to get a dict
  2. change some value in the dict, for example 'qualityProfileId'
  3. use RadarrAPI.upd_movie to update Radarr database
  4. used to have no error and Radarr database has been changed with v2.0.7 (call RadarrAPI.get_movie again and verified)

Current behavior

step 3 returns 'MethodNotAllowed', not error was raised and Radarr database not changed

Possible reasons and solutions

in RadarrAPI.upd_movie, path = "/api/movie"
in request_handler._request_url, url is defined as f"{self.host_url}/api{ver_uri}/{path}"
ver_uri = '/v3', so _request_url returns https://HOSTNAME/api/v3//api/movie
so there is one extra slash between v3 and api/movie
changed in RadarrAPI.upd_movie, path = "api/movie", program runs successfully

also, according to Radarr API docs, this path value should be just 'movie'
so _request_url should return https://HOSTNAME/api/v3/movie

haven't tested other functions, but did a quick find and in Radarr.lookup_movie_by_imdb_id, path also got one extra leading slash

@github-actions
Copy link

Hello @shunluzhang, thank you for your interest in our work!

If this is a bug report, please provide screenshots and minimum viable code to reproduce your issue, otherwise we can not help you.{% endraw %}

@Archmonger
Copy link
Contributor

Archmonger commented Jan 23, 2022

Temporary resolution is downgrading to v2.0.7.

I'll PR a fix for this now.

@Archmonger Archmonger added the type/bug Something isn't working label Jan 23, 2022
@Archmonger Archmonger self-assigned this Jan 23, 2022
@github-actions
Copy link

Branch 94-radarrapi_upd_movie_does_not_work created!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants