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

imdb linking to sonarr instead of radarr #186

Closed gituser823 closed 5 months ago

gituser823 commented 5 months ago

Describe the bug I opened movies on imdb and it provides a wrong link to sonarr, radarr would be correct.

To Reproduce Steps to reproduce the behavior:

  1. Go to https://www.imdb.com/title/tt1080585/ or https://www.imdb.com/title/tt0302751/ or https://www.imdb.com/title/tt0295432/ or https://www.imdb.com/title/tt0365601/
  2. Click on the link your addon provides
  3. the link is for sonarr, which can not find the movie. It can only be found via radarr.

Please fix this bug for all movies, if possible. Do you need to manually create a database which movie is available via sonarr or radarr or do you get this information from some database? I would like to be able to rely upon this addon using the correct server.

Alternatively you could add a link to jellyseer/overseer, which finds a movie regardless if its in sonarr or radarr.

Desktop (please complete the following information): OS: Linux Mint Debian Edition 6 Browser: Firefox Version: 125.0.1 Extension Version: 2.8.6

Screenshots Optional and if applicable, add screenshots to help explain your problem.

trossr32 commented 5 months ago

This extension is supposed to show both radarr and sonarr icons in this scenario on IMDb, as the links provided point to media that has a type of video:other. This functionality is currently broken.

This issue will be fixed by making sure both icons show. This is just an FYI in case you thought both icons being shown is a newly introduced bug when your extension is updated to the latest version (v.2.8.7).

gituser823 commented 5 months ago

Works now, thanks.

But its not possible to only show the correct link for radarr or sonarr?

trossr32 commented 4 months ago

Unfortunately not. For imdb, the extension checks the value of the og:type meta property, e.g.:

<meta property="og:type" content="video.other">

This can contain 1 of 3 values; video.movie, _video.tvshow or video.other. When the value is video.other, it's impossible to know whether sonarr or radarr should be searched. I've seen this issue before which is when I changed the code to display both icons. I obviously then broke it at some point, so now it's back working as expected.

If you can spot a better way to identify whether an entry with type video.other should be considered a movie or tv show from the page's source then let me know and I'll make a change.