v18 My first Addon - Need Help with Video URL
#1
Hey Guys,

i'm new in Python and i'm trying to build a little addon.

But i have a problem with a video url.

Can you show me the right way?

Thanks.

My Code:

python:

import xbmcgui
import xbmcplugin
import xbmcaddon
import xbmcvfs
import sys

addon_handle = int(sys.argv[1])

xbmcplugin.setContent(addon_handle, 'movies')

xbmcplugin.addDirectoryItem(handle=addon_handle, url='http://xxx/video.mp4', listitem=xbmcgui.ListItem('stream'))

xbmcplugin.endOfDirectory(addon_handle)

xbmcplugin.setContent(addon_handle, 'songs')

xbmcplugin.addDirectoryItem(handle=addon_handle, url='http://xxx/audio.wav', listitem=xbmcgui.ListItem('sound'))

xbmcplugin.endOfDirectory(addon_handle)

The code is working, but i need a mjpeg url like:

python:
xbmcplugin.addDirectoryItem(handle=addon_handle, url='http://xxx/video', listitem=xbmcgui.ListItem('item stream'))

And this ist not working.
Reply
#2
(2017-11-28, 14:39)T0N1 Wrote: And this ist not working.

I've always wondered: do people really believe that the phrase "does not work" is a useful and informative issue description?
Reply
#3
Check out chapter 3.2 in the General Addon Tutorial, it will help you out with building your first addon.
If you're still having trouble let me know. You should try and include a bit more information about what goes wrong though, do you know how to read the log file to see what's going wrong?
Reply

Logout Mark Read Team Forum Stats Members Help
My first Addon - Need Help with Video URL0