Poster and movie name in video player
#1
Information 
Hi everyone,
I developed a very simple plugin based on the t0mm0's test addon. Then I created a file with the name of the movie and .strm extension, that I imported in the Kodi video library, with the following text inside:

plugin://script.module.teststream/?url=http://www.nowvideo.sx/video/abcde12345

When I start the movie I don't see the title and the poster in the player but a generic icon and the name of the stream file, for example efghijklmno6789.flv. So what should I do in order to see the poster and movie name in the video playerHuh

Thanks for your help!

This is the script
PHP Code:
import os
import re
import string
import sys
from t0mm0
.common.addon import Addon
from t0mm0
.common.net import Net
import urlresolver

addon 
Addon('script.module.teststream'sys.argv)
net Net()

mode addon.queries['mode']
play addon.queries.get('play'None)

url addon.queries.get('url''')
host addon.queries.get('host''')
media_id addon.queries.get('media_id''')
#stream_url = urlresolver.resolve(play)
stream_url urlresolver.HostedMediaFile(url=urlhost=hostmedia_id=media_id).resolve()
addon.resolve_url(stream_url
Reply
#2
You need to create a listitem and set the properties and infolabels appropriately

eg:

Code:
listitem = xbmcgui.ListItem(path=stream_url, iconImage=icon, thumbnailImage=thumb)
listitem.setInfo(type="Video", infoLabels={'title': <title>, 'year': <year>, 'type': 'movie', 'plotoutline': <plot_outline>, 'plot': <plot>, 'mpaa': <mpaa>})

You need to fill in the information for each of those infoLabels, I just put in placeholders

TV Show episodes have some extra info:

Code:
listitem.setInfo('video', {'title': <episode title>, 'tvshowtitle': <tv show title>, 'year': <year>, 'episode': <episode #>, 'season': <season #>, 'type': 'episode', 'plotoutline': <plot_outline>, 'plot': <plot>, 'mpaa': <mpaa>})

Then instead of doing addon.resolve_url(stream_url) (it currently doesn't support passing in a listitem) use:

Code:
xbmcplugin.setResolvedUrl(int(sys.argv[1]), True, listitem)
Reply
#3
Should add that you can use my metahandlers script to fetch movie and tv show meta data to fill in those infolabels for you

https://github.com/Eldorados/script.module.metahandler
Reply
#4
(2015-10-14, 21:42)Eldorado Wrote: Should add that you can use my metahandlers script to fetch movie and tv show meta data to fill in those infolabels for you

https://github.com/Eldorados/script.module.metahandler
Thanks so much for your help!!! Blush
Reply
#5
what kind of plugin that is ?
Reply
#6
there is another problem... When the video is playing I can't see the fanart in Yatse app for Android. I tried to set with this code without success:

Code:
listitem.setProperty('fanart_image', fanart)

where fanart variable contain the link of fanart

Thanks
Reply

Logout Mark Read Team Forum Stats Members Help
Poster and movie name in video player0