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 "missing" IMDB ID #80

Closed
wants to merge 2 commits into from
Closed

Conversation

kiamvdd
Copy link

@kiamvdd kiamvdd commented May 25, 2024

As mentioned in #78 (comment), xbmc.getInfoLabel('VideoPlayer.IMDBNumber') doesn't always return an IMDB ID even when it is available. Unfortunately despite the provided workaround for this, the problem persists and the addon fails to search for subtitles for certain titles.

I've implemented a possible fix here, replacing the calls to xbmc.getInfoLabel with the new InfoTagVideo API introduced in Kodi v20. InfoTagVideo.getUniqueId does seem to correctly return the IMDB ID for movies when available.

Since it's a new addition to the API this change isn't automatically backwards compatible with v19, so I've also included a version check to maintain said backwards compatibility. I'm not sure if this is the best way to handle this or if might have overlooked anything, so please review.

@kiamvdd kiamvdd requested a review from newt-sc as a code owner May 25, 2024 20:36
@9000000
Copy link

9000000 commented May 31, 2024

kodi 21 "IMDB ID not provided" , I have uninstalled kodi and all addons and reinstalled from scratch but still get the error

@newt-sc
Copy link
Collaborator

newt-sc commented Jun 9, 2024

Thanks @kiamvdd. I will look into the new APIs, they should also be mocked in order for the tests to work.

However, for context this is something that depends on the used Video addon.
The label VideoPlayer.IMDBNumber should be set by the Video addon before sending the movie to the video player.
Here for example is how a4kStreaming sets it.

@ChiefVitor
Copy link

Thanks @kiamvdd. I will look into the new APIs, they should also be mocked in order for the tests to work.

However, for context this is something that depends on the used Video addon. The label VideoPlayer.IMDBNumber should be set by the Video addon before sending the movie to the video player. Here for example is how a4kStreaming sets it.

Subs from opensubtitles are not working. You can download them, but they don’t play. I already tried a few different movies and tv shows. Always see the same behavior.

@ManilaByNight
Copy link

Hi there. I hope you will forgive me for posting this here as I do not know where to post this request and I am a total beginner with this stuff.

Anyway, would it be possible to add a feature to the add-on to have an option to tell the add-on to save the subtitle to a custom location (on the local or network storage location).

Any way to add this feature to this add-on?

Thanks.

@McEnnes
Copy link

McEnnes commented Jun 28, 2024

I also have a problem with the missing IMDB ID in A4Ksubtitles sometimes, but it is not a problem with every show. One of the shows generating this message is: Insomnia (2024)

@newt-sc
Copy link
Collaborator

newt-sc commented Sep 14, 2024

@McEnnes That is because the addon has a fallback when the video addon does not provide the IMDB ID. The addon tries to get it on its own by title searching in IMDB. It does not always work. I will check what is the issue with Insomnia.

@ManilaByNight Yes, we could add that. Just have to find the time. Contributions are welcome. 🙏🏻

@MGuerreiro42
Copy link

MGuerreiro42 commented Sep 22, 2024

Hi guys, Im having this problem too this night. I have noticed that the name of the file is showing as url encoded (substituting spaces by %20 to be specific) in the top of the subtitle search menu. This could impact the search?
Currently in a MiBoxS 4k

Copy link

@twinden twinden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks legit, as the new function does not have the “no IMDb id” issue.

@twinden
Copy link

twinden commented Sep 29, 2024

Please merge this into release.
The change looks legit. The “no imdb id” problem can’t get any worse.

@FASOPE
Copy link

FASOPE commented Oct 13, 2024

Hi you all,
I'm having the same issue using the "BBC www" add on. It doesn't find the IMBD id

xbmc.getInfoLabel('VideoPlayer.IMDBNumber') sometimes returns a non-imdb ID. The new InfoTagVideo.getUniqueID added in v20 doesn't have this issue.
@newt-sc
Copy link
Collaborator

newt-sc commented Oct 15, 2024

Closing in favor of: #85

@newt-sc newt-sc closed this Oct 15, 2024
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.

9 participants