Beispiel #1
0
    def letter(self, letter):
        type = self.get("type")

        if letter == "%23":
            letter = 1
        if type == 'series':
            obj = http.get("%s/?type=series&letter=%s&lang=%s" %
                           (const.SERVICE_URL, letter, const.LANG))

            for video in obj:
                self.item_list.append(
                    DirectoryItem(
                        "%s [%s]" %
                        (video['title'], const.LANG_CODES[video['lang']]),
                        "?mode=seasons&title=%s" % (video['urlTerm']),
                        "%s/thumbs/%s.jpg" %
                        (const.SERVICE_URL, video['urlTerm'])))
        elif type == 'movies' or type == 'documentations':
            obj = http.get("%s/?type=%s&letter=%s&lang=%s" %
                           (const.SERVICE_URL, type, letter, const.LANG))

            for video in obj:
                self.item_list.append(
                    VideoItem(
                        "%s [%s]" %
                        (video['title'], const.LANG_CODES[video['lang']]),
                        "?mode=play&title=" + video['urlTerm'],
                        "%s/thumbs/%s.jpg" %
                        (const.SERVICE_URL, video['urlTerm'])))
        pass
Beispiel #2
0
    def search(self):
        type = self.get("type")
        dialog = xbmcgui.Dialog()
        d = dialog.input('Search', type=xbmcgui.INPUT_ALPHANUM)

        if type == "series" and d:
            obj = http.get("%s/search.php?type=series&title=%s&lang=%s" %
                           (const.SERVICE_URL, d, const.LANG))

            for video in obj:
                self.item_list.append(
                    DirectoryItem(
                        "%s [%s]" %
                        (video['title'], const.LANG_CODES[video['lang']]),
                        "?mode=seasons&title=%s" % (video['urlTerm']),
                        "%s/thumbs/%s.jpg" %
                        (const.SERVICE_URL, video['urlTerm'])))
        if (type == 'documentations' or type == 'movies') and d:
            obj = http.get("%s/search.php?type=%s&title=%s&lang=%s" %
                           (const.SERVICE_URL, type, d, const.LANG))

            for video in obj:
                self.item_list.append(
                    VideoItem(
                        "%s [%s]" %
                        (video['title'], const.LANG_CODES[video['lang']]),
                        "?mode=play&title=" + video['urlTerm'],
                        "%s/thumbs/%s.jpg" %
                        (const.SERVICE_URL, video['urlTerm'])))
        pass
    def list(self, params):
        letter = params('letter')

        obj = http.get("%s/?type=movies&letter=%s&lang=%s" %
                       (const.SERVICE_URL, letter, const.LANG))

        for video in obj:
            self.item_list.append(
                VideoItem(
                    "%s [%s]" %
                    (video['title'], const.LANG_CODES[video['lang']]),
                    "?view=player&action=start&title=" + video['urlTerm'],
                    "%s/thumbs/%s.jpg" %
                    (const.SERVICE_URL, video['urlTerm'])))
        return self.item_list
    def search(self, params):
        dialog = xbmcgui.Dialog()
        d = dialog.input('Search', type=xbmcgui.INPUT_ALPHANUM)

        obj = http.get("%s/search.php?type=movies&title=%s&lang=%s" %
                       (const.SERVICE_URL, d, const.LANG))

        for video in obj:
            self.item_list.append(
                VideoItem(
                    "%s [%s]" %
                    (video['title'], const.LANG_CODES[video['lang']]),
                    "?view=player&action=start&title=" + video['urlTerm'],
                    "%s/thumbs/%s.jpg" %
                    (const.SERVICE_URL, video['urlTerm'])))
        return self.item_list
Beispiel #5
0
    def episodes(self):
        try:
            obj = http.get(
                "%s/series/getEpisodes.php?title=%s&season=%s" %
                (const.SERVICE_URL, self.get('title'), self.get('season')))

            if len(obj['episodes']):
                for episode in obj['episodes']:
                    self.item_list.append(
                        VideoItem(
                            "Episode %s" % episode,
                            "?mode=play&title=%s&season=%s&episode=%s" %
                            (self.get('title'), self.get('season'), episode)))
            else:
                raise Exception('Episodes not found')
        except Exception, e:
            print 'StreamCloud Error occurred: %s' % e
            dialog = xbmcgui.Dialog()
            dialog.ok("Error",
                      "No Episodes hosted by StreamCloud in this Season")