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

Fix bug where colon is replaced by "%3A" #196 #209

Merged
merged 1 commit into from
Sep 2, 2024

Conversation

dynamiccookies
Copy link
Contributor

This fixes the issue where the search is not automatically populating on Radarr and Sonarr:

"When opening Radarr/Sonarr from the respective icon on IMDb & TMDB, the search page is opened but the search field is not populated. The IMDB/TMDB reference appears in the url."

image

What should say 'imdb:tt0795176' is instead coming through as 'imdb%3Att0795176'.

This is because the searchTerm is being URI encoded:

let searchUrl = site.domain.replace(/\/$/, '') + site.searchPath + encodeURIComponent(searchTerm).replace(/\./g, ' ');

This fix adds .replace(/%3A/g, ':') to encodeURIComponent(searchTerm).replace(/\./g, ' ') so '%3A' is replaced with a colon again.

Close #196

@trossr32 trossr32 self-assigned this Sep 2, 2024
@trossr32 trossr32 merged commit caeb7ec into trossr32:staging Sep 2, 2024
1 check failed
@trossr32
Copy link
Owner

trossr32 commented Sep 2, 2024

Merged, will fix tests prior to release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants