Skip to content

Use BuildInfo.AppName for RARBG appId instead of hardcoded value#4821

Merged
markus101 merged 1 commit intoSonarr:developfrom
Ga22be:rarbg-app-id-fix
Apr 25, 2023
Merged

Use BuildInfo.AppName for RARBG appId instead of hardcoded value#4821
markus101 merged 1 commit intoSonarr:developfrom
Ga22be:rarbg-app-id-fix

Conversation

@Ga22be
Copy link
Copy Markdown
Contributor

@Ga22be Ga22be commented Dec 28, 2021

  • Added app_id to captcha check to avoid 403 forbidden error
  • Migrated app_id from hard coded to BuildInfo.AppName

Database Migration

NO

Description

Previously the captcha check threw an exception in the logs since RARBG's API responds with 403 forbidden if app_id is skipped/overlooked in the query. I also took the opportunity to update app_id from hard coded to use the BuildInfo.AppName value instead.

* Added app_id to captcha check to avoid 403 forbidden error
* Migrated app_id from hard coded to BuildInfo.AppName
@Taloth
Copy link
Copy Markdown
Member

Taloth commented Dec 28, 2021

iirc the Captcha stuff hasn't worked for ages due to changes to CF Captcha implementation.

Did you run into CF captcha? And were you able to get a valid captcha token?

@Ga22be
Copy link
Copy Markdown
Contributor Author

Ga22be commented Dec 28, 2021

@Taloth, I did not. But I pressed the button in the UI and was greeted with a long stack trace in the logs. Since I don't like those I decided to track down the origin and amend it. 😅

I discussed it shortly in the Prowlarr discord last night with @bakerboy448, @ta264, and "PearsonFlyer". They suggested I create a PR there and here as it supposedly could flow down-stream from here.

@Taloth
Copy link
Copy Markdown
Member

Taloth commented Dec 28, 2021

I can merge it, it just won't help anyone since CF Captcha changed... I basically should remove the whole feature, but never bothered. 😄

@Ga22be
Copy link
Copy Markdown
Contributor Author

Ga22be commented Dec 28, 2021

Well, this at least ensures it is a more bug free feature that you remove 😁

@Ga22be
Copy link
Copy Markdown
Contributor Author

Ga22be commented Jan 3, 2022

@Taloth, will you merge this or disregard it and remove the feature all together? Because if one clicks the captcha button the log will be filled with exceptions as of now :)

@markus101 markus101 requested a review from Taloth January 23, 2022 21:52
@markus101 markus101 changed the title Fixed: (Indexer) Update RARBG API query options Use BuildInfo.AppName for RARBG appId instead of hardcoded value Apr 25, 2023
@markus101 markus101 merged commit 99c4f5b into Sonarr:develop Apr 25, 2023
@markus101
Copy link
Copy Markdown
Member

This slipped through the cracks, but the changes are fine, so I've finally landed them, thanks for contributing.

@Ga22be
Copy link
Copy Markdown
Contributor Author

Ga22be commented Apr 26, 2023

Thanks, happy to have contributed

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Apr 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants