trossr32 / sonarr-radarr-lidarr-autosearch-browser-extension

An extension for Chromium and Firefox browsers that automates searching on Servarr instances based on a modified URL, and adds context menus for direct searching from any selected text. Adds icons as direct search links on IMDb, TVDb, TMDb, Trakt, MusicBrainz, letterboxd, TV Calendar, Rotten Tomatoes, metacritic and simkl websites.
Mozilla Public License 2.0
128 stars 15 forks source link

Not Searching Sonarr/Radarr #196

Closed StraightSpine closed 1 month ago

StraightSpine commented 4 months ago

Describe the bug 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.

I expect the show to be searchged and to show in the Search field in Radarr/Sonarr.

To Reproduce Steps to reproduce the behaviour:

  1. Go to (https://www.imdb.com/title/tt0795176/?ref_=chttvtp_t_3)
  2. Click on the Sonarr Icon

Desktop (please complete the following information):

Screenshots 2024-05-29 12_32_37-Add New Series - Sonarr — Mozilla Firefox 2024-05-29 12_32_18-Planet Earth (TV Mini Series 2006) - IMDb — Mozilla Firefox

StraightSpine commented 4 months ago

![Uploading 2024-05-29 12_34_15-Servarr autosearch options — Mozilla Firefox.png…]()

notjhoan commented 2 months ago

I've got the exact same issue with Chrome.

dynamiccookies commented 1 month ago

This is happening to me too, and the cause is here: https://github.com/trossr32/sonarr-radarr-lidarr-autosearch-browser-extension/blob/b56ef300c41ff7673700758d9117c6fbd4cb5bc7/src/content/js/content_script.js#L1513

encodeURIComponent(searchTerm) is replacing the colon with "%3A".

One solution could be to replace the "%3A" with a colon after the encoding is completed: site.searchPath + encodeURIComponent(searchTerm).replace(/\./g, ' ').replace(/%3A/g, ':')