diff options
author | pietje666 <martijn.moreel@gmail.com> | 2017-12-15 22:53:37 +0100 |
---|---|---|
committer | Martijn Kaijser <martijn@xbmc.org> | 2017-12-17 05:50:34 +0000 |
commit | 9075e266cdb3e84c31d12e9d521097ab1c1da144 (patch) | |
tree | 802dea30dd1bec32a130fd11fc6c88cf11ec21b8 /plugin.video.vrt.nu/resources/lib/kodiwrappers/kodiwrapper.py | |
parent | 9b1f805af94d8800efa8d51a49e6bcd3fdb4bda0 (diff) |
[plugin.video.vrt.nu] 1.1.0
Diffstat (limited to 'plugin.video.vrt.nu/resources/lib/kodiwrappers/kodiwrapper.py')
-rw-r--r-- | plugin.video.vrt.nu/resources/lib/kodiwrappers/kodiwrapper.py | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/plugin.video.vrt.nu/resources/lib/kodiwrappers/kodiwrapper.py b/plugin.video.vrt.nu/resources/lib/kodiwrappers/kodiwrapper.py index 7edcccd..6df324d 100644 --- a/plugin.video.vrt.nu/resources/lib/kodiwrappers/kodiwrapper.py +++ b/plugin.video.vrt.nu/resources/lib/kodiwrappers/kodiwrapper.py @@ -3,7 +3,6 @@ import xbmcgui import xbmcplugin from urllib import urlencode from resources.lib.vrtplayer import vrtplayer -from resources.lib.vrtplayer import urltostreamservice from resources.lib.kodiwrappers import sortmethod class KodiWrapper: @@ -35,11 +34,7 @@ class KodiWrapper: xbmcplugin.endOfDirectory(self._handle) - def play_video(self, path): - stream_service = urltostreamservice.UrlToStreamService(vrtplayer.VRTPlayer._VRT_BASE, - vrtplayer.VRTPlayer._VRTNU_BASE_URL, - self._addon) - stream = stream_service.get_stream_from_url(path) + def play_video(self, stream): if stream is not None: play_item = xbmcgui.ListItem(path=stream.stream_url) if stream.subtitle_url is not None: @@ -49,3 +44,16 @@ class KodiWrapper: def play_livestream(self, path): play_item = xbmcgui.ListItem(path=path) xbmcplugin.setResolvedUrl(self._handle, True, listitem=play_item) + + def show_ok_dialog(self, title, message): + xbmcgui.Dialog().ok(self._addon.getAddonInfo('name'), title, message) + + def get_localized_string(self, string_id): + return self._addon.getLocalizedString(string_id) + + def get_setting(self, setting_id ): + return self._addon.getSetting(setting_id) + + def open_settings(self): + self._addon.openSettings() + |