Kodi Community Forum

Full Version: script.extendedinfo
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
There is indeed a bug that I guess is Python 3, when getting extended info for a TV show episode.  I have to check on seasons.

scott s.
.
(2021-07-17, 07:53)scott967 Wrote: [ -> ]There is indeed a bug that I guess is Python 3, when getting extended info for a TV show episode.  I have to check on seasons.

scott s.
.

Oh okay thanks !
@scott967 but I also have the bug with the tv show not only with tv show episode. the dbid=$INFO[ListItem.DBID] doesn't work it only works when name=$INFO[ListItem.Title] but name=$INFO[ListItem.Title] is not accurate, because there can be multiple tv show with the same name, for example I have a tv show named "Another" but it displays a tv show named "Another Life". That's why I have to use the dbid=$INFO[ListItem.DBID] but it doesn't work.
I also tried on Kodi 18.9 but same issue...
(2021-07-17, 18:47)Bungee_G Wrote: [ -> ]@scott967 but I also have the bug with the tv show not only with tv show episode. the dbid=$INFO[ListItem.DBID] doesn't work it only works when name=$INFO[ListItem.Title] but name=$INFO[ListItem.Title] is not accurate, because there can be multiple tv show with the same name, for example I have a tv show named "Another" but it displays a tv show named "Another Life". That's why I have to use the dbid=$INFO[ListItem.DBID] but it doesn't work.
I will look into this.  Meanwhile, I have fixed the issue that caused an exception when skin requests extra info for seasons and episodes.  Updated addon to +matrix.4 in my repo and also available on github.  My skin uses ListItem.Title so I haven't tested for this.  But it is in the same code area in process.py I think.

scott s.
.
(2021-07-17, 18:47)Bungee_G Wrote: [ -> ]@scott967 but I also have the bug with the tv show not only with tv show episode. the dbid=$INFO[ListItem.DBID] doesn't work it only works when name=$INFO[ListItem.Title] but name=$INFO[ListItem.Title] is not accurate, because there can be multiple tv show with the same name, for example I have a tv show named "Another" but it displays a tv show named "Another Life". That's why I have to use the dbid=$INFO[ListItem.DBID] but it doesn't work.
Probably need a debug log to confirm what is going on.  In general, though, when supplied a DBID the script tried to get the tmdb id number from the videodatabase, and if none might try to lookup.  But there's different things that can happen so need a log to see.

Also need to see how the script was called (parameters).

scott s.
.
(2021-07-21, 04:15)scott967 Wrote: [ -> ]
(2021-07-17, 18:47)Bungee_G Wrote: [ -> ]@scott967 but I also have the bug with the tv show not only with tv show episode. the dbid=$INFO[ListItem.DBID] doesn't work it only works when name=$INFO[ListItem.Title] but name=$INFO[ListItem.Title] is not accurate, because there can be multiple tv show with the same name, for example I have a tv show named "Another" but it displays a tv show named "Another Life". That's why I have to use the dbid=$INFO[ListItem.DBID] but it doesn't work.
Probably need a debug log to confirm what is going on.  In general, though, when supplied a DBID the script tried to get the tmdb id number from the videodatabase, and if none might try to lookup.  But there's different things that can happen so need a log to see.

Also need to see how the script was called (parameters).

scott s.
.

I think it would be better if you test by yourself what I did : I scraped some tv shows with MediaElch. Then I tried the extendedinfo script in different skins. For example in the Metropolis skin, change the DialogVideoInfo.xml file. Change this line 
xml:
<onclick condition="String.IsEqual(ListItem.DBTYPE,tvshow)">RunScript(script.extendedinfo,info=extendedtvinfo,name=$INFO[ListItem.Title])</onclick>
to this one 
xml:
<onclick condition="String.IsEqual(ListItem.DBTYPE,tvshow)">RunScript(script.extendedinfo,info=extendedtvinfo,dbid=$INFO[ListItem.DBID])</onclick>
Then click on a tv show information then on the extended info button. You won't see informations about the tv show (it will be written "tv show info not available")

Thanks
(2021-07-21, 17:09)Bungee_G Wrote: [ -> ]
(2021-07-21, 04:15)scott967 Wrote: [ -> ]
(2021-07-17, 18:47)Bungee_G Wrote: [ -> ]@scott967 but I also have the bug with the tv show not only with tv show episode. the dbid=$INFO[ListItem.DBID] doesn't work it only works when name=$INFO[ListItem.Title] but name=$INFO[ListItem.Title] is not accurate, because there can be multiple tv show with the same name, for example I have a tv show named "Another" but it displays a tv show named "Another Life". That's why I have to use the dbid=$INFO[ListItem.DBID] but it doesn't work.
Probably need a debug log to confirm what is going on.  In general, though, when supplied a DBID the script tried to get the tmdb id number from the videodatabase, and if none might try to lookup.  But there's different things that can happen so need a log to see.

Also need to see how the script was called (parameters).

scott s.
.

I think it would be better if you test by yourself what I did : I scraped some tv shows with MediaElch. Then I tried the extendedinfo script in different skins. For example in the Metropolis skin, change the DialogVideoInfo.xml file. Change this line 
xml:
<onclick condition="String.IsEqual(ListItem.DBTYPE,tvshow)">RunScript(script.extendedinfo,info=extendedtvinfo,name=$INFO[ListItem.Title])</onclick>
to this one 
xml:
<onclick condition="String.IsEqual(ListItem.DBTYPE,tvshow)">RunScript(script.extendedinfo,info=extendedtvinfo,dbid=$INFO[ListItem.DBID])</onclick>
Then click on a tv show information then on the extended info button. You won't see informations about the tv show (it will be written "tv show info not available")

Thanks
OK, but log would still help as the script does write some useful stuff to the log.  That toast means the script couldn't get a tmdb_id for the show, but I will look more closely.

scott s.
.
(2021-07-21, 22:37)scott967 Wrote: [ -> ]
(2021-07-21, 17:09)Bungee_G Wrote: [ -> ]
(2021-07-21, 04:15)scott967 Wrote: [ -> ]Probably need a debug log to confirm what is going on.  In general, though, when supplied a DBID the script tried to get the tmdb id number from the videodatabase, and if none might try to lookup.  But there's different things that can happen so need a log to see.

Also need to see how the script was called (parameters).

scott s.
.

I think it would be better if you test by yourself what I did : I scraped some tv shows with MediaElch. Then I tried the extendedinfo script in different skins. For example in the Metropolis skin, change the DialogVideoInfo.xml file. Change this line 
xml:
<onclick condition="String.IsEqual(ListItem.DBTYPE,tvshow)">RunScript(script.extendedinfo,info=extendedtvinfo,name=$INFO[ListItem.Title])</onclick>
to this one 
xml:
<onclick condition="String.IsEqual(ListItem.DBTYPE,tvshow)">RunScript(script.extendedinfo,info=extendedtvinfo,dbid=$INFO[ListItem.DBID])</onclick>
Then click on a tv show information then on the extended info button. You won't see informations about the tv show (it will be written "tv show info not available")

Thanks
OK, but log would still help as the script does write some useful stuff to the log.  That toast means the script couldn't get a tmdb_id for the show, but I will look more closely.

scott s.
.
Okay thanks. I don't know if I did it well but here is the log : https://paste.kodi.tv/ohuyacesak.kodi
@scott967 have you seen the log ?

Also I don't understand why most of the skins use name=$INFO[ListItem.Title] while it's not accurate... dbid="$INFO[ListItem.DBID]" is.
(2021-07-24, 03:35)Bungee_G Wrote: [ -> ]@scott967 have you seen the log ?

Also I don't understand why most of the skins use name=$INFO[ListItem.Title] while it's not accurate... dbid="$INFO[ListItem.DBID]" is.
Unfortunately your log shows plugin.video.venom installed, which is on the addon blacklist.  So no further analysis can be given for that client.

However, I will advise that extendedinfo is working as designed.  If extendedtvinfo is requested with a DBID, a query of the videodatabase is done to get the tmdb id for that DBID.  If found the tmdb will be used to query tmdb site.  If no tmdb id is in the database then the addon will not attempt to query tmdb for info.

In the case that extendedtvinfo is requested with the show title, the addon will query tmdb with the title and attempt to scrape the tmdb id.  I don't know why the addon was designed this way; I assume there is a valid reason (my assumption is that if the show is in the database, it must have been scraped prior so the tmdb id should be available).

The tmdb v3 api query does allow for a tv "year first shown" query parameter and it is possible to add that as a parameter when skins request extendedtvinfo by adding year=$INFO[ListItem.Year].  I have added that for testing.   It can also be used for movies, but in that case tmdb has 2 different year options: year, and first release year.  Since Kodi only stores 1 premier value I assume that's first release year, but will have to look at the scraper code to verify.

scott s.
.
(2021-07-24, 22:09)scott967 Wrote: [ -> ]
(2021-07-24, 03:35)Bungee_G Wrote: [ -> ]@scott967 have you seen the log ?

Also I don't understand why most of the skins use name=$INFO[ListItem.Title] while it's not accurate... dbid="$INFO[ListItem.DBID]" is.
Unfortunately your log shows plugin.video.venom installed, which is on the addon blacklist.  So no further analysis can be given for that client.

However, I will advise that extendedinfo is working as designed.  If extendedtvinfo is requested with a DBID, a query of the videodatabase is done to get the tmdb id for that DBID.  If found the tmdb will be used to query tmdb site.  If no tmdb id is in the database then the addon will not attempt to query tmdb for info.

In the case that extendedtvinfo is requested with the show title, the addon will query tmdb with the title and attempt to scrape the tmdb id.  I don't know why the addon was designed this way; I assume there is a valid reason (my assumption is that if the show is in the database, it must have been scraped prior so the tmdb id should be available).

The tmdb v3 api query does allow for a tv "year first shown" query parameter and it is possible to add that as a parameter when skins request extendedtvinfo by adding year=$INFO[ListItem.Year].  I have added that for testing.   It can also be used for movies, but in that case tmdb has 2 different year options: year, and first release year.  Since Kodi only stores 1 premier value I assume that's first release year, but will have to look at the scraper code to verify.

scott s.
.
I deleted this addon, a while ago but thanks to you I just found out 2 related addons that weren't uninstalled...

The tv shows are on tmdb and they have a tmdb id(for example this one : https://www.themoviedb.org/tv/42589?language=fr-FR), but it doesn't work... I think adding the year would be more accurate but I tried and it doesn't work (the release year of one of my tv show is 2012 but it displays a tv show released in 2019)

So dbid can't work, can it ? Have you tried dbid=$INFO[ListItem.DBID] ?
Just reading through and noticed last entries - a bug?
Leia 18.9 just finished re-build and thought I'd try as I like this add on

Image
Image
Image
Image

Season and episode work fine - only bug is in DialogMovieInfo.py
(row 211 and 217)  self.exit_script()
Change to self.exit()
Hi,

Thanks @scott967 .

I just upgraded my Kodi Windows 18.9 to 19.1 and then installed your addons: first script.module.kodi65 then script.extended.info.

But I don't see the "Extended info" button when I am on movies or show's information screen. I use the default Estuary skin.

Did I miss something?
Here is some fixes for script.module.kodi65:
https://github.com/Mariusz89B/script.module.kodi65

Also added a fix for xbmcgui.Dialog() in script.extendedinfo:
https://github.com/Mariusz89B/script.extendedinfo

I can't figure out this error though in script.extendedinfo:
xml:
2021-08-31 23:53:04.162 T:13504   ERROR <general>:   File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.extendedinfo/resources/lib/dialogs/DialogMovieInfo.py", line 247, in set_omdb_infos_async

2021-08-31 23:53:04.163 T:13504   ERROR <general>:     
2021-08-31 23:53:04.163 T:13504   ERROR <general>: self.omdb_thread.join()
2021-08-31 23:53:04.164 T:13504   ERROR <general>: 

2021-08-31 23:53:04.164 T:13504   ERROR <general>: AttributeError
2021-08-31 23:53:04.164 T:13504   ERROR <general>: : 
2021-08-31 23:53:04.164 T:13504   ERROR <general>: 'DialogMovieInfo' object has no attribute 'omdb_thread'