Posts: 7,805
Joined: Feb 2013
Reputation:
1,484
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.
Posts: 3,532
Joined: Oct 2013
Reputation:
357
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?
Main: Lancool II Mesh - Ryzen 9 5900x - MSI x570 Unify - Zotac RTX 3080 AMP HOLO - 32GB Trident Z Neo 3600 CL16 - EVO 960 M.2 250GB / EVO 940 250GB / MX100 512GB / Crucial P1 2TB / WD Blue 3D Nand 2TB
Sound: Saxx AS30 DSP - Beyer Dynamic Custom One Pro
TV: Nvidia Shield 2019 Pro- Adalight 114x LEDs - Sony 65XG9505 - Kodi / Emby - Yamaha RX-V683 - Heco Victa 700/101/251a + Dynavoice Magic FX-4
Server: i3 Skylake - 8GB - OMV4 - 22TB Storage
Posts: 3,532
Joined: Oct 2013
Reputation:
357
Wtf. I cannot reproduce it on my end. In a property it gets correctly set?
Main: Lancool II Mesh - Ryzen 9 5900x - MSI x570 Unify - Zotac RTX 3080 AMP HOLO - 32GB Trident Z Neo 3600 CL16 - EVO 960 M.2 250GB / EVO 940 250GB / MX100 512GB / Crucial P1 2TB / WD Blue 3D Nand 2TB
Sound: Saxx AS30 DSP - Beyer Dynamic Custom One Pro
TV: Nvidia Shield 2019 Pro- Adalight 114x LEDs - Sony 65XG9505 - Kodi / Emby - Yamaha RX-V683 - Heco Victa 700/101/251a + Dynavoice Magic FX-4
Server: i3 Skylake - 8GB - OMV4 - 22TB Storage
Posts: 3,532
Joined: Oct 2013
Reputation:
357
2019-08-12, 11:59
(This post was last modified: 2019-08-12, 12:00 by sualfred.)
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.
Main: Lancool II Mesh - Ryzen 9 5900x - MSI x570 Unify - Zotac RTX 3080 AMP HOLO - 32GB Trident Z Neo 3600 CL16 - EVO 960 M.2 250GB / EVO 940 250GB / MX100 512GB / Crucial P1 2TB / WD Blue 3D Nand 2TB
Sound: Saxx AS30 DSP - Beyer Dynamic Custom One Pro
TV: Nvidia Shield 2019 Pro- Adalight 114x LEDs - Sony 65XG9505 - Kodi / Emby - Yamaha RX-V683 - Heco Victa 700/101/251a + Dynavoice Magic FX-4
Server: i3 Skylake - 8GB - OMV4 - 22TB Storage
Posts: 7,805
Joined: Feb 2013
Reputation:
1,484
2019-08-12, 14:00
(This post was last modified: 2019-08-12, 14:06 by jurialmunkey.)
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.
Posts: 3,532
Joined: Oct 2013
Reputation:
357
2019-08-12, 16:06
(This post was last modified: 2019-08-12, 16:15 by sualfred.)
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"?
Main: Lancool II Mesh - Ryzen 9 5900x - MSI x570 Unify - Zotac RTX 3080 AMP HOLO - 32GB Trident Z Neo 3600 CL16 - EVO 960 M.2 250GB / EVO 940 250GB / MX100 512GB / Crucial P1 2TB / WD Blue 3D Nand 2TB
Sound: Saxx AS30 DSP - Beyer Dynamic Custom One Pro
TV: Nvidia Shield 2019 Pro- Adalight 114x LEDs - Sony 65XG9505 - Kodi / Emby - Yamaha RX-V683 - Heco Victa 700/101/251a + Dynavoice Magic FX-4
Server: i3 Skylake - 8GB - OMV4 - 22TB Storage
Posts: 12,706
Joined: Nov 2003
Reputation:
129
spiff
Team-Kodi Member
Posts: 12,706
this looks like a very very old hack, i can't even find its origin in git (ie it's from the pre-git svn days). fairly certain this can be removed with no negative consequences.