Ejemplo n.º 1
0
    def __init__(self, *args, **kwargs):
        super(TestVtmGo, self).__init__(*args, **kwargs)

        self._vtmgoauth = vtmgoauth.VtmGoAuth(kodi)
        self._vtmgo = vtmgo.VtmGo(kodi)
        self._vtmgostream = vtmgostream.VtmGoStream(kodi)
        self._player = Player(kodi)
Ejemplo n.º 2
0
def play_from_page(channel, page):
    """ Play the requested item """
    try:  # Python 3
        from urllib.parse import unquote
    except ImportError:  # Python 2
        from urllib import unquote

    from resources.lib.modules.player import Player
    Player().play_from_page(channel, unquote(page))
Ejemplo n.º 3
0
    def play_epg_datetime(self, channel, timestamp):
        """ Play a program based on the channel and the timestamp when it was aired
        :type channel: str
        :type timestamp: str
        """
        broadcast = self._epg.get_broadcast(channel, timestamp)
        if not broadcast:
            kodiutils.ok_dialog(message=kodiutils.localize(30713))  # The requested video was not found in the guide.
            kodiutils.end_of_directory()
            return

        if not broadcast.video_url:
            kodiutils.ok_dialog(message=kodiutils.localize(30712))  # The video is unavailable and can't be played right now.
            kodiutils.end_of_directory()
            return

        Player().play_from_page(channel, broadcast.video_url)
Ejemplo n.º 4
0
def play(category, item):
    """ Play the requested item """
    from resources.lib.modules.player import Player
    Player().play(category, item)
Ejemplo n.º 5
0
def play(uuid):
    """ Play the requested item """
    from resources.lib.modules.player import Player
    Player().play(uuid)
def play_asset(asset_id):
    """ PLay a Program """
    from resources.lib.modules.player import Player
    Player().play_asset(asset_id)
def play_from_page(page):
    """ Play the requested item """
    from resources.lib.modules.player import Player
    Player().play_from_page(unquote(page))
def play_live(channel):
    """ Play the requested item """
    from resources.lib.modules.player import Player
    Player().live(channel)
Ejemplo n.º 9
0
def play_or_live(category, item, channel):
    """ Ask to play the requested item or switch to the live channel """
    from resources.lib.modules.player import Player
    Player().play_or_live(category, item, channel)