Bug xbmcgui.ListItem().setInfo() prefixes IMDBNumber with "xx"
#1
As title states. On Leia v18.3

I create a listitem for a plugin path using xbmcgui.ListItem() and for some reason ListItem.IMDBNumber is always prefixed with "xx"
If I add an IMDBNumber with xbmcgui.ListItem().setInfo(video, {'imdbnumber': imdb_id}) I will get something like "xxtt123456" when it should be just "tt123456". If I leave the imdbnumber value blank or don't specify the key at all, I still get a imdbnumber "xx".

This is problematic from a skinning side of things as I can't even set a blank value to allow for String.IsEmpty(ListItem.IMDBNumber) and to use a property instead.

Has anyone encountered this issue?
I've checked my code so many times and I'm definitely not adding this "xx" afaict.

I also tried using setUniqueIDs method but that doesn't appear to do anything for Leia.
Reply
#2
Weird. I also set this value in my helper and info script and never faced that issue. Even if empty it doesn't get a "xx". What exactly do you mean with leaving it empty? Keeping the "imdb" var empty replacing the var with a empty string like ''? What happens if you strip the first two digits from the var with [2:] in the setInfo part?
Embuary | Skin | Helper | Info | Repo | GitHub
Reply
#3
So I set IMDBNumber by adding it to a dict containing all the infolabels and then adding the info using listitem().setInfo(video, dict)
https://github.com/jurialmunkey/plugin.v...py#L85-L86
https://github.com/jurialmunkey/plugin.v...em.py#L233

This code will give me:
xxtt123456

If I comment out these lines and don't even create an IMDBNumber key in the dict
https://github.com/jurialmunkey/plugin.v...py#L85-L86
Then I get:
xx

If I strip the first two characters:
self.infolabels['imdbnumber'] = request_item.get('imdb_id')[2:]
Then I get:
xx123456


---


I even output the variables to the log immediately before setInfo to check it wasn't something I was doing.
In the log I got all the correct variables/key-values:
self.name = Scream
self.infolabels['imdbnumber'] = tt0117571
self.library = video

But still this puts xxtt0117571 as the imdbnumber. I'm completely stumped.
Reply
#4
Wtf. I cannot reproduce it on my end. In a property it gets correctly set?
Embuary | Skin | Helper | Info | Repo | GitHub
Reply
#5
(2019-08-12, 08:02)sualfred Wrote: Wtf. I cannot reproduce it on my end. In a property it gets correctly set?
Yep I can set it to ListItem.Property(imdb_id) perfectly fine. I can even set it to another infolabel like genre or plot etc.
Only imdbnumber does this and I have absolutely no idea why!
Reply
#6
I've checked your code but I cannot see the issue. I've also crawled the xbmc code to see if somwhere "xx" is used for imdbnumber but there is nothing.

A last dumb question: What happens if you hardcode a value directly in setInfo without getting it from the dict? Same issue?

Since you already tried it without setting uniqueids (which I don't use), I'm running out of ideas.
Embuary | Skin | Helper | Info | Repo | GitHub
Reply
#7
(2019-08-12, 11:59)sualfred Wrote: I've checked your code but I cannot see the issue. I've also crawled the xbmc code to see if somwhere "xx" is used for imdbnumber but there is nothing.

A last dumb question: What happens if you hardcode a value directly in setInfo without getting it from the dict? Same issue?

Since you already tried it without setting uniqueids (which I don't use), I'm running out of ideas.

Yep. Tried direct values with same result:
self.listitem.setInfo('video', {'imdbnumber': 'tt12345678'})
ListItem.IMDBNumber = "xxtt12345678"

How are you setting IMDBNumber?
Reply
#8
Exactly like you.

Helper script: https://github.com/sualfred/script.embua...ry.py#L126
Info script: https://github.com/sualfred/script.embua...ls.py#L369
Embuary | Skin | Helper | Info | Repo | GitHub
Reply
#9
Okay I am completely stumped about this. I just checked with your script and I'm not getting this error there, so there is definitely something that I'm doing which is causing this.

EDIT: I've just found it only happens in info dialog. When I'm in a normal list view it shows correct imdbnumber, but as soon as I open info dialog kodi adds "xx" to the start of imdbnumber.

I just tested with some other add-ons and it happens with every single one in info dialog (but not with library items, only add-on items), so it appears to be a kodi bug.
Reply
#10
I do have a lot of widgets in the infodialog that is using my helper script and the imdbnumber gets correctly set for them.

Edit:
But maybe this is different, because the path of the item exists in the videodb.

Edit2:
Have you tried to set the mediatype? To "tvshow" or "movie"?
Embuary | Skin | Helper | Info | Repo | GitHub
Reply
 
Thread Rating:
  • 0 Vote(s) - 0 Average



Logout Mark Read Team Forum Stats Members Help
xbmcgui.ListItem().setInfo() prefixes IMDBNumber with "xx"00