Set actor thumb in python
#1
Is it possible to set a thumb for an actor when adding an item to a list in a plugin?

In my MMA Browser plugin I add a list of fights to the cast list instead of individual fighters, I'm then using PIL to join the two individual fighter images together (like below)

Image

If possible I'd like to set the thumb for the cast item(actor) to an image like this which has been generated by the addon, is this possible?

Thanks,
Paddy
Reply
#2
sadly not possible currently.
Reply
#3
Would it maybe be a workaround by scraping them as actors so they are added to the library and then retrieve them through the plug-in?
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
#4
Was there any work done on this to allow setting cast thumb url from a python addon?

We are working on a request to add cast support form the MB3 addon:

http://mediabrowser3.com/community/index...-plug-ins/

And from what I can see it is still not possible to set the cast members thumb url, I see some work was done on being able to pass in a cast members role 4 months ago but that did not cover the thumb link for the SActorInfo struct.

Here is a link to the original ticket
http://trac.xbmc.org/ticket/14546
and the code change for that ticket
https://github.com/xbmc/xbmc/commit/121e...a435657f34

So is there any chance we can have this added (the ability to set actor thumb) via python addon for Gotham final?
Reply
#5
Not in Gotham, no.

I would suggest that if we do want to get something like that in, it would make sense to do it via a separate method, rather than trying to co-opt the setInfo() function into taking more and more types.

i.e. a setCast() routine that takes in a list of dictionaries maybe?
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#6
Is it available now ?
Would be sweet

or is there some workaround with this one? like storing data in some file and feeding it to some kind of JSON then parsed by Kodi ? almost 4 years have passed!?

Or adding actors to kodi database then adding them to movie so it will fetch info from database?
Reply
#7
is this supported in 16 or 17?
Reply
#8
Quote:Would it maybe be a workaround by scraping them as actors so they are added to the library and then retrieve them through the plug-in?
That's sound interesting... How can web "add" to the library this thumbnails... Are they in a database? How can we "call" them from plugin?

I try to "add this values" to actors table in Myvideos99.db but this values seems not to be read by the addon hehe
Reply
#9
actor thumbs are stored in the database, yes.

you should be able to get them using the VideoLibrary.GetMovieDetails json-rpc method.
http://kodi.wiki/view/JSON-RPC_API/v6#Vi...vieDetails

there's no way to set them though afaik.
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#10
I can set this values into the database using thist SQL instructions

PHP Code:
try:
    
from sqlite3 import dbapi2 as sqlite
except
:
    
from pysqlite2 import dbapi2 as sqlite
                    
DB 
os.path.join(xbmc.translatePath("special://database"), 'MyVideos99.bd')
db sqlite.connect(DB)
db.execute('INSERT into actor (name, art_urls) values ("name_of_actor", "url_thumbnail_actors" )' )
db.commit()
db.close() 

Note that MyVideos99.bd is for Jarvis each version has it's own database name
Using this name an thubmnail are inside "actor" table...


Using json-rpc I can get this values (even directly using SQL too), but the problema remains... how to "assing" this thumbail to each actor, because seems that addon are not reading this table.

Thanks for the answer
Reply
#11
Photo 
In 17 version Krypton using the default (and great) skin, actors thumbnails are just in the top...so I will be strange not showing this thumbs there Confused

Image

As far I know this option is not in the "plans" for Krypton version.... Is there any place where we can sugest this kind of ideas ?
Reply
#12
Just an idea...

What if you look at it from another way...

Create (or add to the existing) an .nfo file with the actor thumbs and names (you could do this from your addon). Then rescrape the movie.

ie an example from a random movie:

<actor>
<name>Chloë Grace Moretz</name>
<role>Cassie Sullivan</role>
<thumb>http://ia.media-imdb.com/images/M/MV5BMTk2ODk0Mzc0Ml5BMl5BanBnXkFtZTgwNDYzMzgzMzE@._V1._SY275_SX400_.jpg</thumb>
</actor>

I consider this not a "nice"™ solution, but I suppose you can this way get the needed info in the Kodi library.
Add-on : Bluray iso utils Rewrite of BR_iso_enhancements
Add-on : BR_iso_Enhancements Give theatrical & directors cut from the same bluray iso each their own library entry, use bluray iso's of tv shows as if they are already ripped.
Reply
#13
I have also tried on this way Smile

I tried to create the .nfo file into the userdata /adon folder but seems not be read by kodi, probably because I don't know how to make "rescrape" the movie from the addon hehe, because using xbmc.executebuiltin('UpdateLibrary(video, '+__addondir__+')') (where addondir is the path to userdata/addon/nameofplugin (where nfo file is), seems not to work
Reply
#14
No, no, create the movie.info file in the movie dir. Do you use the Kodi scraper? you need to create an .nfo file, use ember media manager for instance for this. Or export your Kodi library (setting/library/export video library/seperate). You will then have an .nfo file in each of your movie dirs and can adjust these to eventually import your thumbnailes...

You have to be carefull to not overwrite settings that are there, but after scraping (of the movie/tv show) you will have this informatin in the Kodi library.
Add-on : Bluray iso utils Rewrite of BR_iso_enhancements
Add-on : BR_iso_Enhancements Give theatrical & directors cut from the same bluray iso each their own library entry, use bluray iso's of tv shows as if they are already ripped.
Reply
#15
The movie dir depends of what each user select isn't it? but I when updates library "updates" every folder added to movies. In my previous test I added the "userdata" to videos as folder but it doesn' work
Reply

Logout Mark Read Team Forum Stats Members Help
Set actor thumb in python0