2016-11-30, 03:28
How do I call or set urlresolver on my addon, i had put in every where and Kodi don't use it
Can someone explain it or show a link that can help
Can someone explain it or show a link that can help
<?xml version="1.0" encoding="UTF-8"?>
<!--suppress ALL -->
<addon id="plugin.video.foo" version="0.0.1" name="foo" provider-name="tknorris">
<requires>
<import addon="xbmc.python" version="2.19.0"/>
<import addon="script.module.urlresolver" version="3.0.0"/>
</requires>
<extension point="xbmc.python.pluginsource" library="default.py">
<provides>video</provides>
</extension>
<extension point="xbmc.addon.metadata">
<summary></summary>
<description></description>
<platform>all</platform>
</extension>
</addon>
(2016-11-30, 22:39)danielrodrigues Wrote: It is fine, the problem is how to call it on play it is not running
import urlresolver
hmf = urlresolver.HostedMediaFile(url=hoster_url)
if not hmf:
log('Indirect hoster_url not supported by urlresolver: %s' % (hoster_url))
else:
try:
stream_url = hmf.resolve()
if not stream_url or not isinstance(stream_url, basestring):
try: msg = stream_url.msg
except: msg = hoster_url
raise Exception(msg)
except Exception as e:
try: msg = str(e)
except: msg = hoster_url
kodi.notify(msg=i18n('resolve_failed') % (msg), duration=7500)
return False
(2016-12-01, 02:16)danielrodrigues Wrote: thanks for help me, but still i dont know where to put this code, do i put it on default.py on first line, do i put on addDirectory, i make it work once but the way i did it play all the urls at the same time insted to create the menu with item and wait for me to click it to play, do u undestand what i m saying
(2016-12-01, 02:32)danielrodrigues Wrote: I just learn how to Add directory, I don't know how to play it I m using the default player
(2016-12-01, 02:37)danielrodrigues Wrote: can u show me a simple one because they all a nest o code.
codes that they even need, so it make my head confuse