Пример #1
0
    def getLinksForVideo(self, Index=0, selItem=None):
        listLen = len(self.host.currList)
        if listLen < Index and listLen > 0:
            printDBG(
                "ERROR getLinksForVideo - current list is to short len: %d, Index: %d"
                % (listLen, Index))
            return RetHost(RetHost.ERROR, value=[])

        if self.host.currList[Index]["type"] != 'video':
            printDBG("ERROR getLinksForVideo - current item has wrong type")
            return RetHost(RetHost.ERROR, value=[])

        urlsTab = self.host.getVideoUrl(self.host.currList[Index]["page"])
        retlist = []
        for urlItem in urlsTab:
            retlist.append(CUrlItem(urlItem['name'], urlItem['url'], 0))

        return RetHost(RetHost.OK, value=retlist)
Пример #2
0
    def getLinksForVideo(self, Index=0, selItem=None):
        listLen = len(self.host.currList)
        if listLen < Index and listLen > 0:
            printDBG(
                "ERROR getLinksForVideo - current list is to short len: %d, Index: %d"
                % (listLen, Index))
            return RetHost(RetHost.ERROR, value=[])

        if self.host.currList[Index]["type"] != 'video':
            printDBG("ERROR getLinksForVideo - current item has wrong type")
            return RetHost(RetHost.ERROR, value=[])

        retlist = []
        urlList = self.host.getHostingTable(self.host.currList[Index]["url"])
        for item in urlList:
            retlist.append(CUrlItem(item["name"], item["url"], 0))

        return RetHost(RetHost.OK, value=retlist)
Пример #3
0
    def getResolvedURL(self, url):
        # resolve url to get direct url to video file
        retlist = []
        urlList = self.host.getVideoLinks(url)
        for item in urlList:
            need_resolve = 0
            retlist.append(CUrlItem(item["name"], item["url"], need_resolve))

        return RetHost(RetHost.OK, value = retlist)
    
        # resolve url to get direct url to video file
        url = self.host.up.getVideoLink( url )
        urlTab = []

        if isinstance(url, basestring) and url.startswith('http'):
            urlTab.append(url)

        return RetHost(RetHost.OK, value = urlTab)
Пример #4
0
    def convertList(self, cList):
        hostList = []
        searchTypesOptions = [] # ustawione alfabetycznie
        #searchTypesOptions.append((_("Games"), "games"))
        #searchTypesOptions.append((_("Channles"), "streams"))
    
        for cItem in cList:
            hostLinks = []
            type = CDisplayListItem.TYPE_UNKNOWN
            possibleTypesOfSearch = None

            if 'category' == cItem['type']:
                if cItem.get('search_item', False):
                    type = CDisplayListItem.TYPE_SEARCH
                    possibleTypesOfSearch = searchTypesOptions
                else:
                    type = CDisplayListItem.TYPE_CATEGORY
            elif cItem['type'] == 'video':
                type = CDisplayListItem.TYPE_VIDEO
            elif 'more' == cItem['type']:
                type = CDisplayListItem.TYPE_MORE
            elif 'audio' == cItem['type']:
                type = CDisplayListItem.TYPE_AUDIO
                
            if type in [CDisplayListItem.TYPE_AUDIO, CDisplayListItem.TYPE_VIDEO]:
                url = cItem.get('url', '')
                if '' != url:
                    hostLinks.append(CUrlItem("Link", url, 1))
                
            title       =  self.host._getStr( cItem.get('title', '') )
            description =  self.host._getStr( cItem.get('desc', '') ).strip()
            icon        =  self.host._getStr( cItem.get('icon', '') )
            if '' == icon: icon = SerialeNet.DEFAULT_ICON
            
            hostItem = CDisplayListItem(name = title,
                                        description = description,
                                        type = type,
                                        urlItems = hostLinks,
                                        urlSeparateRequest = 1,
                                        iconimage = icon,
                                        possibleTypesOfSearch = possibleTypesOfSearch)
            hostList.append(hostItem)

        return hostList
Пример #5
0
    def convertList(self, cList):
        hostList = []
        searchTypesOptions = []

        for cItem in cList:
            hostLinks = []
            type = CDisplayListItem.TYPE_UNKNOWN
            possibleTypesOfSearch = None

            if 'category' == cItem['type']:
                if cItem.get('search_item', False):
                    type = CDisplayListItem.TYPE_SEARCH
                    possibleTypesOfSearch = searchTypesOptions
                else:
                    type = CDisplayListItem.TYPE_CATEGORY
            elif cItem['type'] == 'video':
                type = CDisplayListItem.TYPE_VIDEO
            elif 'more' == cItem['type']:
                type = CDisplayListItem.TYPE_MORE
            elif 'audio' == cItem['type']:
                type = CDisplayListItem.TYPE_AUDIO

            if type in [
                    CDisplayListItem.TYPE_AUDIO, CDisplayListItem.TYPE_VIDEO
            ]:
                url = cItem.get('url', '')
                if '' != url:
                    hostLinks.append(CUrlItem("Link", url, 1))

            title = self.host.cleanHtmlStr(cItem.get('title', ''))
            description = self.host.cleanHtmlStr(cItem.get('desc', ''))
            icon = self.host.cleanHtmlStr(cItem.get('icon', ''))

            hostItem = CDisplayListItem(
                name=title,
                description=description,
                type=type,
                urlItems=hostLinks,
                urlSeparateRequest=1,
                iconimage=icon,
                possibleTypesOfSearch=possibleTypesOfSearch)
            hostList.append(hostItem)

        return hostList
Пример #6
0
    def converItem(self, cItem):
        hostList = []
        searchTypesOptions = []  # ustawione alfabetycznie
        #searchTypesOptions.append((_("Movies"),   "movie"))
        #searchTypesOptions.append((_("TV Shows"), "series"))

        hostLinks = []
        type = CDisplayListItem.TYPE_UNKNOWN
        possibleTypesOfSearch = None

        if 'category' == cItem['type']:
            if cItem.get('search_item', False):
                type = CDisplayListItem.TYPE_SEARCH
                possibleTypesOfSearch = searchTypesOptions
            else:
                type = CDisplayListItem.TYPE_CATEGORY
        elif cItem['type'] == 'video':
            type = CDisplayListItem.TYPE_VIDEO
        elif 'more' == cItem['type']:
            type = CDisplayListItem.TYPE_MORE
        elif 'audio' == cItem['type']:
            type = CDisplayListItem.TYPE_AUDIO

        if type in [CDisplayListItem.TYPE_AUDIO, CDisplayListItem.TYPE_VIDEO]:
            url = cItem.get('url', '')
            if '' != url:
                hostLinks.append(CUrlItem("Link", url, 1))

        title = cItem.get('title', '')
        description = cItem.get('desc', '')
        icon = cItem.get('icon', '')
        if icon == '':
            icon = self.host.DEFAULT_ICON_URL
        isGoodForFavourites = cItem.get('good_for_fav', False)

        return CDisplayListItem(name=title,
                                description=description,
                                type=type,
                                urlItems=hostLinks,
                                urlSeparateRequest=1,
                                iconimage=icon,
                                possibleTypesOfSearch=possibleTypesOfSearch,
                                isGoodForFavourites=isGoodForFavourites)
Пример #7
0
    def getLinksForVideo(self, Index = 0, selItem = None):
        listLen = len(self.host.currList)
        if listLen < Index and listLen > 0:
            printDBG( "ERROR getLinksForVideo - current list is to short len: %d, Index: %d" % (listLen, Index) )
            return RetHost(RetHost.ERROR, value = [])
        
        if self.host.currList[Index]["type"] != 'video':
            printDBG( "ERROR getLinksForVideo - current item has wrong type" )
            return RetHost(RetHost.ERROR, value = [])

        linkTab = []
        if True == self.host.loggedIn:
            linkTab.extend( self.host.getHostTable(self.host.currList[Index]["page"], True) )
        linkTab.extend( self.host.getHostTable(self.host.currList[Index]["page"]) )
        retlist = []
        for item in linkTab:
            retlist.append(CUrlItem(item['name'], item['url'], 0))

        return RetHost(RetHost.OK, value = retlist)
Пример #8
0
    def getLinksForVideo(self, Index = 0, selItem = None):
        listLen = len(self.host.currList)
        if listLen < Index and listLen > 0:
            printDBG( "ERROR getLinksForVideo - current list is to short len: %d, Index: %d" % (listLen, Index) )
            return RetHost(RetHost.ERROR, value = [])
        
        if self.host.currList[Index]["type"] not in ['audio', 'video']:
            printDBG( "ERROR getLinksForVideo - current item has wrong type" )
            return RetHost(RetHost.ERROR, value = [])

        retlist = []
        urlList = self.host.getLinksForVideo(self.host.currList[Index])
        for item in urlList:
            need_resolve = 0
            name = self.host.cleanHtmlStr( item["name"] )
            url  = item["url"]
            retlist.append(CUrlItem(name, url, need_resolve))

        return RetHost(RetHost.OK, value = retlist)
Пример #9
0
    def getResolvedURL(self, url):
        retlist = []
        url = strwithmeta(url)
        name = url.meta.get('name', '')
        
        printDBG("getResolvedURL url[%s], meta[%s]" % (url, url.meta))
        
        urlList = []
        
        if name == 'bilasport.com': urlList = self.host.getBilaSportPwResolvedLink(url)
        elif name == 'mlbstream.tv':  urlList = self.host.getMLBStreamResolvedLink(url)
        
        
        if isinstance(urlList, list):
            for item in urlList:
                need_resolve = 0
                retlist.append(CUrlItem(item["name"], item["url"], need_resolve))

        return RetHost(RetHost.OK, value = retlist)
Пример #10
0
    def converItem(self, cItem):
        hostList = []
        searchTypesOptions = []  # ustawione alfabetycznie

        hostLinks = []
        type = CDisplayListItem.TYPE_UNKNOWN
        possibleTypesOfSearch = None

        if 'category' == cItem['type']:
            if cItem.get('search_item', False):
                type = CDisplayListItem.TYPE_SEARCH
                possibleTypesOfSearch = searchTypesOptions
            else:
                type = CDisplayListItem.TYPE_CATEGORY
        elif cItem['type'] == 'video':
            type = CDisplayListItem.TYPE_VIDEO
        elif 'more' == cItem['type']:
            type = CDisplayListItem.TYPE_MORE
        elif 'audio' == cItem['type']:
            type = CDisplayListItem.TYPE_AUDIO
        elif 'picture' == cItem['type']:
            type = CDisplayListItem.TYPE_PICTURE

        if type in [
                CDisplayListItem.TYPE_AUDIO, CDisplayListItem.TYPE_VIDEO,
                CDisplayListItem.TYPE_PICTURE
        ]:
            url = cItem.get('url', '')
            if '' != url:
                hostLinks.append(
                    CUrlItem("Link", url, cItem.get('need_resolve', 0)))

        title = cItem.get('title', '')
        description = cItem.get('desc', '')
        icon = cItem.get('icon', '')

        return CDisplayListItem(name=title,
                                description=description,
                                type=type,
                                urlItems=hostLinks,
                                urlSeparateRequest=0,
                                iconimage=icon,
                                possibleTypesOfSearch=possibleTypesOfSearch)
Пример #11
0
    def convertList(self, cList):
        hostList = []
        searchTypesOptions = []  # ustawione alfabetycznie
        searchTypesOptions.append(("MUSIC", "MUSIC"))
        #searchTypesOptions.append(("TV", "TV"))
        searchTypesOptions.append(("FILM", "FILM"))
        #searchTypesOptions.append(("CHANNEL", "CHANNEL"))
        searchTypesOptions.append(("COMMUNITY", "COMMUNITY"))

        for cItem in cList:
            hostLinks = []
            type = CDisplayListItem.TYPE_UNKNOWN
            possibleTypesOfSearch = None

            if cItem['type'] == 'category':
                if cItem.get('search_item', False):
                    type = CDisplayListItem.TYPE_SEARCH
                    possibleTypesOfSearch = searchTypesOptions
                else:
                    type = CDisplayListItem.TYPE_CATEGORY
            elif cItem['type'] == 'video':
                type = CDisplayListItem.TYPE_VIDEO
                url = cItem.get('url', '')
                if '' != url:
                    hostLinks.append(CUrlItem("Link", url, 1))

            title = cItem.get('title', '')
            description = clean_html(cItem.get('desc', '')) + clean_html(
                cItem.get('plot', ''))
            icon = cItem.get('icon', '')

            hostItem = CDisplayListItem(
                name=title,
                description=description,
                type=type,
                urlItems=hostLinks,
                urlSeparateRequest=1,
                iconimage=icon,
                possibleTypesOfSearch=possibleTypesOfSearch)
            hostList.append(hostItem)

        return hostList
Пример #12
0
    def convertList(self, cList):
        hostList = []

        for cItem in cList:
            hostLinks = []
            type = CDisplayListItem.TYPE_UNKNOWN

            if cItem['type'] == 'category':
                if cItem['title'] == 'Wyszukaj':
                    type = CDisplayListItem.TYPE_SEARCH
                else:
                    type = CDisplayListItem.TYPE_CATEGORY
            elif cItem['type'] == 'video':
                type = CDisplayListItem.TYPE_VIDEO
                page = cItem.get('page', '')
                if '' != page:
                    hostLinks.append(CUrlItem("Link", page, 1))

            title = cItem.get('title', '')
            icon = cItem.get('icon', '')

            # prepar description
            descTab = ((cItem.get('duration', ''), '|', ''),
                       (cItem.get('gatunek',
                                  ''), '|', ''), (cItem.get('plot',
                                                            ''), '|\t', ''))
            description = ''
            for descItem in descTab:
                if '' != descItem[0]:
                    description += descItem[1] + descItem[0] + descItem[2]

            hostItem = CDisplayListItem(
                name=unescapeHTML(title.decode("utf-8")).encode("utf-8"),
                description=unescapeHTML(
                    description.decode("utf-8")).encode("utf-8"),
                type=type,
                urlItems=hostLinks,
                urlSeparateRequest=1,
                iconimage=icon)
            hostList.append(hostItem)

        return hostList
Пример #13
0
    def convertList(self, cList):
        hostList = []
        searchTypesOptions = []  # ustawione alfabetycznie
        #searchTypesOptions.append(("Filmy", "filmy"))
        #searchTypesOptions.append(("Seriale", "seriale"))

        for cItem in cList:
            hostLinks = []
            type = CDisplayListItem.TYPE_UNKNOWN
            possibleTypesOfSearch = None

            if cItem['type'] == 'category':
                if cItem['title'] == 'Wyszukaj':
                    type = CDisplayListItem.TYPE_SEARCH
                    possibleTypesOfSearch = searchTypesOptions
                else:
                    type = CDisplayListItem.TYPE_CATEGORY
            elif cItem['type'] == 'video':
                type = CDisplayListItem.TYPE_VIDEO
                url = cItem.get('url', '')
                if self._isPicture(url):
                    type = CDisplayListItem.TYPE_PICTURE
                else:
                    type = CDisplayListItem.TYPE_VIDEO
                if '' != url:
                    hostLinks.append(CUrlItem("Link", url, 1))

            title = cItem.get('title', '')
            description = clean_html(cItem.get('desc', ''))
            icon = cItem.get('icon', '')

            hostItem = CDisplayListItem(
                name=title,
                description=description,
                type=type,
                urlItems=hostLinks,
                urlSeparateRequest=1,
                iconimage=icon,
                possibleTypesOfSearch=possibleTypesOfSearch)
            hostList.append(hostItem)

        return hostList
Пример #14
0
    def getLinksForVideo(self, Index=0, selItem=None):
        listLen = len(self.host.currList)
        if listLen < Index and listLen > 0:
            printDBG(
                "ERROR getLinksForVideo - current list is to short len: %d, Index: %d"
                % (listLen, Index))
            return RetHost(RetHost.ERROR, value=[])

        if self.host.currList[Index].type != CListItem.TYPE_VIDEO:
            printDBG("ERROR getLinksForVideo - current item has wrong type")
            return RetHost(RetHost.ERROR, value=[])

        retlist = []
        tab = self.host.getPlayTable(self.host.currList[Index].page)
        for item in tab:
            nameLink = item[1]
            url = item[0]
            retlist.append(CUrlItem(nameLink, url, 1))

        return RetHost(RetHost.OK, value=retlist)
Пример #15
0
    def getLinksForVideo(self, Index=0, selItem=None):
        listLen = len(self.host.currList)
        if listLen < Index and listLen > 0:
            print "ERROR getLinksForVideo - current list is to short len: %d, Index: %d" % (listLen, Index)
            return RetHost(RetHost.ERROR, value=[])

        selItem = self.host.currList[Index]
        if selItem['type'] != 'video':
            print "ERROR getLinksForVideo - current item has wrong type"
            return RetHost(RetHost.ERROR, value=[])

        retlist = []

        if None != selItem and 'url' in selItem and 1 < len(selItem['url']):
            tmpList = self.host.getVideoLinks(selItem['url'])

            for item in tmpList:
                retlist.append(CUrlItem(item['name'], item['url'], 0))

        return RetHost(RetHost.OK, value=retlist)
Пример #16
0
    def converItem(self, cItem):
        hostList = []
        searchTypesOptions = []  # ustawione alfabetycznie
        searchTypesOptions.append(("Filmy", "filmy"))
        searchTypesOptions.append(("Seriale", "seriale"))
        searchTypesOptions.append(("Anime", "anime"))

        hostLinks = []
        type = CDisplayListItem.TYPE_UNKNOWN
        possibleTypesOfSearch = None

        if 'category' == cItem['type']:
            if cItem.get('search_item', False):
                type = CDisplayListItem.TYPE_SEARCH
                possibleTypesOfSearch = searchTypesOptions
            else:
                type = CDisplayListItem.TYPE_CATEGORY
        elif cItem['type'] == 'video':
            type = CDisplayListItem.TYPE_VIDEO
        elif 'more' == cItem['type']:
            type = CDisplayListItem.TYPE_MORE
        elif 'audio' == cItem['type']:
            type = CDisplayListItem.TYPE_AUDIO

        if type in [CDisplayListItem.TYPE_AUDIO, CDisplayListItem.TYPE_VIDEO]:
            url = cItem.get('url', '')
            if '' != url:
                hostLinks.append(CUrlItem("Link", url, 1))

        title = self.host._getStr(cItem.get('title', ''))
        description = self.host._getStr(cItem.get('desc', '')).strip()
        icon = self.host._getStr(cItem.get('icon', ''))
        if '' == icon: icon = SeansikTV.DEFAULT_ICON

        return CDisplayListItem(name=title,
                                description=description,
                                type=type,
                                urlItems=hostLinks,
                                urlSeparateRequest=1,
                                iconimage=icon,
                                possibleTypesOfSearch=possibleTypesOfSearch)
Пример #17
0
    def convertList(self, cList):
        hostList = []
        searchTypesOptions = []  # ustawione alfabetycznie
        searchTypesOptions.append((_("Songs"), "Songs"))
        searchTypesOptions.append((_("Playlists"), "Playlists"))
        searchTypesOptions.append((_("Albums"), "Albums"))

        for cItem in cList:
            hostLinks = []
            type = CDisplayListItem.TYPE_UNKNOWN
            possibleTypesOfSearch = None

            if 'category' == cItem['type']:
                if cItem.get('search_item', False):
                    type = CDisplayListItem.TYPE_SEARCH
                    possibleTypesOfSearch = searchTypesOptions
                else:
                    type = CDisplayListItem.TYPE_CATEGORY
            elif 'more' == cItem['type']:
                type = CDisplayListItem.TYPE_MORE
            elif 'audio' == cItem['type']:
                type = CDisplayListItem.TYPE_AUDIO
                url = cItem.get('url', '')
                if '' != url:
                    hostLinks.append(CUrlItem("Link", url, 1))

            title = self.host.getStr(cItem.get('title', ''))
            description = self.host.getStr(cItem.get('desc', '')).strip()
            icon = self.host.getStr(cItem.get('icon', ''))

            hostItem = CDisplayListItem(
                name=title,
                description=description,
                type=type,
                urlItems=hostLinks,
                urlSeparateRequest=1,
                iconimage=icon,
                possibleTypesOfSearch=possibleTypesOfSearch)
            hostList.append(hostItem)

        return hostList
Пример #18
0
    def converItem(self, cItem):
        hostList = []
        searchTypesOptions = []  # ustawione alfabetycznie
        searchTypesOptions.append((_("DATE"), "date"))
        searchTypesOptions.append((_("VIEWS"), "views"))
        searchTypesOptions.append((_("LIKES"), "likes"))
        searchTypesOptions.append((_("COMMENTS"), "comments"))

        hostLinks = []
        type = CDisplayListItem.TYPE_UNKNOWN
        possibleTypesOfSearch = None

        if 'category' == cItem['type']:
            if cItem.get('search_item', False):
                type = CDisplayListItem.TYPE_SEARCH
                possibleTypesOfSearch = searchTypesOptions
            else:
                type = CDisplayListItem.TYPE_CATEGORY
        elif cItem['type'] == 'video':
            type = CDisplayListItem.TYPE_VIDEO
        elif 'more' == cItem['type']:
            type = CDisplayListItem.TYPE_MORE
        elif 'audio' == cItem['type']:
            type = CDisplayListItem.TYPE_AUDIO

        if type in [CDisplayListItem.TYPE_AUDIO, CDisplayListItem.TYPE_VIDEO]:
            url = cItem.get('url', '')
            if '' != url:
                hostLinks.append(CUrlItem("Link", url, 1))

        title = cItem.get('title', '')
        description = cItem.get('desc', '')
        icon = cItem.get('icon', '')

        return CDisplayListItem(name=title,
                                description=description,
                                type=type,
                                urlItems=hostLinks,
                                urlSeparateRequest=1,
                                iconimage=icon,
                                possibleTypesOfSearch=possibleTypesOfSearch)
Пример #19
0
    def getLinksForVideo(self, cItem):
        printDBG("Favourites.getLinksForVideo idx[%r]" % cItem)
        ret = RetHost(RetHost.ERROR, value=[])
        sts, data = self.helper.getGroupItems(cItem['group_id'])
        if not sts: return ret
        item = data[cItem['item_idx']]

        if CFavItem.RESOLVER_URLLPARSER != item.resolver:
            if self._setHost(item.resolver):
                ret = self.host.getLinksForFavourite(item)
        else:
            self.host = None
            self.hostName = None
            retlist = []
            urlList = self.up.getVideoLinkExt(item.data)
            for item in urlList:
                name = self.host.cleanHtmlStr(item["name"])
                url = item["url"]
                retlist.append(CUrlItem(name, url, 0))
            ret = RetHost(RetHost.OK, value=retlist)
        return ret
Пример #20
0
    def getLinksForVideo(self, Index=0, selItem=None):
        listLen = len(self.host.currList)
        if listLen < Index and listLen > 0:
            printDBG(
                "ERROR getLinksForVideo - current list is to short len: %d, Index: %d"
                % (listLen, Index))
            return RetHost(RetHost.ERROR, value=[])
        retlist = []
        if 'ekstraklasa.tv' in self.host.currList[Index].get('host', ''):
            tab = self.host.getLinks_ETV(self.host.currList[Index].get(
                'url', ''))

            tmp = tab
            tab = []
            for item in tmp:
                if item[0] == Ekstraklasa.ETV_FORMAT:
                    tab.append(item)

            def __getLinkQuality(itemLink):
                return int(itemLink[2])

            maxRes = int(config.plugins.iptvplayer.ekstraklasa_defaultformat.
                         value) * 1.1
            tab = CSelOneLink(tab, __getLinkQuality, maxRes).getSortedLinks()
            printDBG(
                ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>. tab[%s]" %
                tab)
            if config.plugins.iptvplayer.ekstraklasa_usedf.value and 0 < len(
                    tab):
                tab = [tab[0]]

            for item in tab:
                nameLink = "type: %s \t bitrate: %s" % (item[0], item[2])
                url = item[1]
                retlist.append(
                    CUrlItem(nameLink.encode('utf-8'), url.encode('utf-8'), 0))
        elif 'ekstraklasa.org' in self.host.currList[Index].get('host', ''):
            pass
        return RetHost(RetHost.OK, value=retlist)
Пример #21
0
    def convertList(self, cList):
        hostList = []

        for cItem in cList:
            hostLinks = []
            description = cItem.description
            type = CDisplayListItem.TYPE_UNKNOWN
            if cItem.type == CListItem.TYPE_CATEGORY:
                type = CDisplayListItem.TYPE_CATEGORY
            elif cItem.type == CListItem.TYPE_VIDEO:
                type = CDisplayListItem.TYPE_VIDEO
                hostLinks.append(CUrlItem('', cItem.videoUrl, 1))

            hostItem = CDisplayListItem(name=cItem.title,
                                        description=description,
                                        type=type,
                                        urlItems=hostLinks,
                                        urlSeparateRequest=0,
                                        iconimage='')
            hostList.append(hostItem)

        return hostList
Пример #22
0
    def getLinksForVideo(self, Index = 0, selItem = None):
        listLen = len(self.host.currList)
        if listLen < Index and listLen > 0:
            printDBG( "ERROR getLinksForVideo - current list is to short len: %d, Index: %d" % (listLen, Index) )
            return RetHost(RetHost.ERROR, value = [])
        retlist = []
        if 'ekstraklasa.tv' in self.host.currList[Index].get('host', ''):
            tab = self.host.getLinks_ETV(self.host.currList[Index].get('url', ''))

            def __getLinkQuality( itemLink ):
                return int(itemLink['bitrate'])

            maxRes = int(config.plugins.iptvplayer.ekstraklasa_defaultformat.value) * 1.1
            tab = CSelOneLink(tab, __getLinkQuality, maxRes).getSortedLinks()
            printDBG(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>. tab[%s]" % tab)
            if config.plugins.iptvplayer.ekstraklasa_usedf.value and len(tab):
                tab = [tab[0]]

            for item in tab:
                retlist.append(CUrlItem(item['name'], item['url'], 0))
        elif 'ekstraklasa.org' in self.host.currList[Index].get('host', ''):
            pass
        return RetHost(RetHost.OK, value = retlist)
Пример #23
0
    def convertList(self, cList):
        hostList = []

        for cItem in cList:
            hostLinks = []
            type = CDisplayListItem.TYPE_UNKNOWN
            possibleTypesOfSearch = None

            if cItem['type'] == 'category':
                if cItem['title'] == 'Wyszukaj':
                    type = CDisplayListItem.TYPE_SEARCH
                else:
                    type = CDisplayListItem.TYPE_CATEGORY
            elif cItem['type'] == 'video':
                type = CDisplayListItem.TYPE_VIDEO
                url = cItem.get('url', '')
                if '' != url:
                    hostLinks.append(CUrlItem("Link", url, 1))

            title = cItem.get('title', '')
            title = clean_html(title.decode("utf-8")).encode("utf-8")
            description = cItem.get('plot', '')
            description = clean_html(
                description.decode("utf-8")).encode("utf-8")
            icon = cItem.get('icon', '')

            hostItem = CDisplayListItem(
                name=title,
                description=description,
                type=type,
                urlItems=hostLinks,
                urlSeparateRequest=1,
                iconimage=icon,
                possibleTypesOfSearch=possibleTypesOfSearch)
            hostList.append(hostItem)

        return hostList
Пример #24
0
    def converItem(self, cItem):
        hostLinks = []
        type = CDisplayListItem.TYPE_UNKNOWN
        possibleTypesOfSearch = None

        if cItem['type'] == 'category':
            if cItem['title'] == 'Wyszukaj':
                type = CDisplayListItem.TYPE_SEARCH
            else:
                type = CDisplayListItem.TYPE_CATEGORY
        elif cItem['type'] == 'video':
            type = CDisplayListItem.TYPE_VIDEO
        elif 'audio' == cItem['type']:
            type = CDisplayListItem.TYPE_AUDIO
        elif 'picture' == cItem['type']:
            type = CDisplayListItem.TYPE_PICTURE

        if type in [
                CDisplayListItem.TYPE_AUDIO, CDisplayListItem.TYPE_VIDEO,
                CDisplayListItem.TYPE_PICTURE
        ]:
            url = cItem.get('url', '')
            if '' != url:
                hostLinks.append(CUrlItem("Link", url, 1))

        title = clean_html(cItem.get('title', ''))
        description = clean_html(cItem.get('plot', ''))
        icon = cItem.get('icon', '')

        return CDisplayListItem(name=title,
                                description=description,
                                type=type,
                                urlItems=hostLinks,
                                urlSeparateRequest=1,
                                iconimage=icon,
                                possibleTypesOfSearch=possibleTypesOfSearch)
Пример #25
0
    def listsItems(self, Index, url, name=''):
        printDBG('Host listsItems begin')
        printDBG('Host listsItems url[%r] ' % url)
        valTab = []
        if name == 'main-menu':
            printDBG('Host listsItems begin name=' + name)
            valTab.append(
                CDisplayListItem(
                    'Episodes', 'http://player.dancetrippin.tv/#dj',
                    CDisplayListItem.TYPE_CATEGORY,
                    ['http://player.dancetrippin.tv/video/list/dj/'],
                    'episodes', '', None))
            valTab.append(
                CDisplayListItem(
                    'Sol sessions', 'http://player.dancetrippin.tv/#sol',
                    CDisplayListItem.TYPE_CATEGORY,
                    ['http://player.dancetrippin.tv/video/list/sol/'],
                    'episodes', '', None))
            valTab.append(
                CDisplayListItem(
                    'Other videos', 'http://player.dancetrippin.tv/#other',
                    CDisplayListItem.TYPE_CATEGORY,
                    ['http://player.dancetrippin.tv/video/list/other/'],
                    'episodes', '', None))
            valTab.append(
                CDisplayListItem(
                    'Ibiza Global Radio', 'http://player.dancetrippin.tv/#igr',
                    CDisplayListItem.TYPE_CATEGORY,
                    ['http://player.dancetrippin.tv/video/list/igr/'],
                    'episodes', '', None))
            return valTab

        # ########## #
        if 'episodes' == name:
            printDBG('Host listsItems begin name=' + name)
            self.MAIN_URL = 'http://player.dancetrippin.tv'
            try:
                data = self.cm.getURLRequestData({
                    'url': url,
                    'use_host': False,
                    'use_cookie': False,
                    'use_post': False,
                    'return_data': True
                })
            except:
                printExc('Host listsItems query error url[%r]' % url)
                return valTab
            #printDBG( 'Host listsItems data: '+data )
            result = simplejson.loads(data)
            if result:
                for item in result:
                    '''
                  printDBG( 'Host listsItems number: '+str(item["number"]) )
                  printDBG( 'Host listsItems title: '+str(item["title"]) )
                  printDBG( 'Host listsItems venue: '+str(item["venue"]) )
                  printDBG( 'Host listsItems location: '+str(item["location"]) )
                  printDBG( 'Host listsItems party: '+str(item["party"]) )
                  printDBG( 'Host listsItems description: '+str(item["description"]) )
                  printDBG( 'Host listsItems dj: '+str(item["dj"]) )
                  '''
                    if self.getStr(item["image"]) <> "":
                        phImage = 'http://www.dancetrippin.tv/media/' + self.getStr(
                            item["image"])
                    else:
                        phImage = "http://player.dancetrippin.tv/media/static/img/system/default_video.png"
                    #printDBG( 'Host listsItems phImage: '+phImage )
                    phUrl = self.MAIN_URL + '/video/' + self.getStr(
                        item["slug"]) + '/'
                    #printDBG( 'Host listsItems phUrl: '+phUrl )
                    desc = '[' + self.getStr(
                        item["venue"]) + '][' + self.getStr(
                            item["dj"]) + '][' + self.getStr(
                                item["location"]) + '][' + self.getStr(
                                    item["party"]) + '][' + self.getStr(
                                        item["description"])
                    desc = clean_html(desc.decode("utf-8")).encode("utf-8")
                    valTab.append(
                        CDisplayListItem(
                            self.getStr(item["number"]) + ' ' +
                            self.getStr(item["title"]), desc,
                            CDisplayListItem.TYPE_VIDEO, [
                                CUrlItem('HIGH', phUrl + '?q=hd', 1),
                                CUrlItem('MEDIUM', phUrl + '?q=sd', 1)
                            ], 0, phImage, None))
            printDBG('Host listsItems end')
            return valTab

        return valTab
Пример #26
0
    def listsItems(self, Index, url, name=''):
        printDBG('Host listsItems begin')
        printDBG('Host listsItems url: ' + url)
        valTab = []
        # ########## #
        if name == 'main-menu':
            printDBG('Host listsItems begin name=' + name)
            self.MAIN_URL = 'http://scs.pl'
            valTab.append(
                CDisplayListItem("Seriale wg. kategorii" + self.konto,
                                 'http://scs.pl/seriale.html',
                                 CDisplayListItem.TYPE_CATEGORY,
                                 ['http://scs.pl/seriale.html'],
                                 'seriale-kategorie', '', None))
            valTab.append(
                CDisplayListItem("Seriale alfabetycznie",
                                 'http://scs.pl/seriale.html',
                                 CDisplayListItem.TYPE_CATEGORY,
                                 ['http://scs.pl/seriale.html'], 'seriale-abc',
                                 '', None))
            valTab.append(
                CDisplayListItem(
                    "Ostatnio aktualizowane seriale",
                    'http://scs.pl/ostatnio_aktualizowane_seriale.html',
                    CDisplayListItem.TYPE_CATEGORY,
                    ['http://scs.pl/ostatnio_aktualizowane_seriale.html'],
                    'seriale-last', '', None))
            valTab.append(
                CDisplayListItem('Szukaj', 'Szukaj',
                                 CDisplayListItem.TYPE_SEARCH,
                                 ['http://scs.pl/serial,szukaj.html'],
                                 'search', '', None))
            valTab.append(
                CDisplayListItem('Historia wyszukiwania',
                                 'Historia wyszukiwania',
                                 CDisplayListItem.TYPE_CATEGORY, [''],
                                 'history', '', None))
            printDBG('Host listsItems end')
            return valTab

        # ########## #
        if 'zaloguj' == name:
            printDBG('Host listsItems begin name=' + name)
            if config.plugins.iptvplayer.scserialePREMIUM.value:
                url = 'http://scs.pl/logowanie.html'
                try:
                    data = self.cm.getURLRequestData(
                        {
                            'url': url,
                            'use_host': True,
                            'host': self.HOST,
                            'use_cookie': True,
                            'save_cookie': True,
                            'load_cookie': False,
                            'cookiefile': self.COOKIEFILE,
                            'use_post': True,
                            'return_data': True
                        }, {
                            'email':
                            config.plugins.iptvplayer.scseriale_login.value,
                            'password':
                            config.plugins.iptvplayer.scseriale_password.value
                        })
                except:
                    printDBG('Host listsItems query error')
                    printDBG('Host listsItems query error url:' + url)
                    printDBG(
                        'Host listsItems query error: Uzywam Player z limitami'
                    )
                    data = None
                if data:
                    self.PREMIUM = True
                    printDBG('Host listsItems: chyba zalogowano do premium...')
                    url = 'http://scs.pl/premium.html'
                    try:
                        data = self.cm.getURLRequestData({
                            'url': url,
                            'use_host': True,
                            'host': self.HOST,
                            'use_cookie': True,
                            'save_cookie': False,
                            'load_cookie': True,
                            'cookiefile': self.COOKIEFILE,
                            'use_post': False,
                            'return_data': True
                        })
                        printDBG('Host listsItems data: ' + data)
                        parse = re.search(
                            'Konto premium ważne do(.*?)".*?;(.*?)<', data,
                            re.S)
                        if parse:
                            self.konto = ' - Twoje konto: ' + parse.group(
                                2) + parse.group(1)
                        else:
                            self.konto = ''
                    except:
                        printDBG(
                            'Host listsItems: blad pobrania danych o koncie premium'
                        )

                if '' == self.konto:
                    self.exSession.open(
                        MessageBox,
                        'Problem z zalogowaniem użytkownika \n"%s" jako VIP.' %
                        config.plugins.iptvplayer.scseriale_login.value,
                        type=MessageBox.TYPE_INFO,
                        timeout=10)

            printDBG('Host listsItems end')
            return self.PREMIUM

        # ########## #
        if 'history' == name:
            printDBG('Host listsItems begin name=' + name)
            for histItem in self.history.getHistoryList():
                valTab.append(
                    CDisplayListItem(histItem['pattern'], 'Szukaj ',
                                     CDisplayListItem.TYPE_CATEGORY,
                                     [histItem['pattern'], histItem['type']],
                                     'search', '', None))
            printDBG('Host listsItems end')
            return valTab

        # ########## #
        if 'search' == name:
            printDBG('Host listsItems begin name=' + name)
            pattern = url
            if Index == -1:
                self.history.addHistoryItem(pattern, 'seriale')
            url = 'http://scs.pl/serial,szukaj.html'
            postdata = {'search': pattern}
            try:
                data = self.cm.getURLRequestData(
                    {
                        'url': url,
                        'use_host': False,
                        'use_cookie': False,
                        'use_post': True,
                        'return_data': True
                    }, postdata)
            except:
                printDBG('Host listsItems query error')
                printDBG('Host listsItems query error url:' + url)
                return valTab
            #printDBG( 'Host listsItems data: '+data )
            match = re.findall(
                '<div class="img_box"><a href="(.*?)">.*?<img src="(.*?)" alt="(.*?)"',
                data, re.S)
            if len(match) > 0:
                for i in range(len(match)):
                    phImage = match[i][1]
                    phUrl = self.MAIN_URL + '/' + match[i][0]
                    phTitle = match[i][2]
                    printDBG('Host listsItems phImage: ' + phImage)
                    printDBG('Host listsItems phUrl: ' + phUrl)
                    printDBG('Host listsItems phTitle: ' + phTitle)
                    valTab.append(
                        CDisplayListItem(phTitle, phTitle,
                                         CDisplayListItem.TYPE_CATEGORY,
                                         [phUrl], 'seriale-sezony', phImage,
                                         None))
            printDBG('Host listsItems end')
            return valTab

        # ########## #
        if 'seriale-last' == name:
            printDBG('Host listsItems begin name=' + name)
            try:
                data = self.cm.getURLRequestData({
                    'url': url,
                    'use_host': False,
                    'use_cookie': False,
                    'use_post': False,
                    'return_data': True
                })
            except:
                printDBG('Host listsItems query error')
                printDBG('Host listsItems query error url:' + url)
                return valTab
            #printDBG( 'Host listsItems data: '+data )
            match = re.compile(
                'online">(.+?)</a></div></div><span class="newest_ep" id=".+?">Ostatnio dodany:<br/><a href="odcinek,(.+?),(.+?),(.+?),(.+?).html">'
            ).findall(data)
            if len(match) > 0:
                for i in range(len(match)):
                    phImage = 'http://static.scs.pl/static/serials/' + match[
                        i][1].replace('.html', '.jpg') + '.jpg'
                    phTitleS = match[i][1]
                    phTitle = match[i][0] + ' - ' + match[i][
                        4] + ' - ' + match[i][2].capitalize().replace(
                            '-', ' ')
                    phUrlS = self.MAIN_URL + '/serial,' + match[i][0]
                    phUrl = self.MAIN_URL + '/odcinek,' + match[i][
                        1] + ',' + match[i][2] + ',' + match[i][
                            3] + ',' + match[i][4] + '.html'
                    printDBG('Host listsItems phImage: ' + phImage)
                    printDBG('Host listsItems phUrl: ' + phUrl)
                    printDBG('Host listsItems phTitle: ' + phTitle)
                    valTab.append(
                        CDisplayListItem(phTitleS, phTitleS,
                                         CDisplayListItem.TYPE_CATEGORY,
                                         [phUrlS], 'seriale-sezony', phImage,
                                         None))
                    valTab.append(
                        CDisplayListItem(phTitle, phTitle,
                                         CDisplayListItem.TYPE_VIDEO,
                                         [CUrlItem('', phUrl, 1)], 0, phImage,
                                         None))
            printDBG('Host listsItems end')
            return valTab
        if 'seriale-kategorie' == name:
            printDBG('Host listsItems begin name=' + name)
            try:
                data = self.cm.getURLRequestData({
                    'url': url,
                    'use_host': False,
                    'use_cookie': False,
                    'use_post': False,
                    'return_data': True
                })
            except:
                printDBG('Host listsItems query error')
                printDBG('Host listsItems query error url:' + url)
                return valTab
            #printDBG( 'Host listsItems data: '+data )
            phMovies = re.findall(
                '<span class="title1">(.*?)</span>(.*?)<.*?href="(.*?)"', data,
                re.S)
            if phMovies:
                for (phTitle, phCount, phUrl) in phMovies:
                    printDBG('Host listsItems phTitle: ' + phTitle)
                    printDBG('Host listsItems phCount: ' + phCount)
                    printDBG('Host listsItems phUrl: ' + phUrl)
                    valTab.append(
                        CDisplayListItem(phTitle + phCount, phTitle,
                                         CDisplayListItem.TYPE_CATEGORY,
                                         [self.MAIN_URL + '/' + phUrl],
                                         'seriale-kategoria', '', None))
            printDBG('Host listsItems end')
            return valTab
        if 'seriale-kategoria' == name:
            printDBG('Host listsItems begin name=' + name)
            try:
                data = self.cm.getURLRequestData({
                    'url': url,
                    'use_host': False,
                    'use_cookie': False,
                    'use_post': False,
                    'return_data': True
                })
            except:
                printDBG('Host listsItems query error')
                printDBG('Host listsItems query error url:' + url)
                return valTab
            #printDBG( 'Host listsItems data: '+data )
            match = re.compile(
                'class="serial_green" href="serial,(.+?)">(.+?)</a><br/>'
            ).findall(data)
            if len(match) > 0:
                for i in range(len(match)):
                    phImage = 'http://static.scs.pl/static/serials/' + match[
                        i][0].replace('.html', '.jpg')
                    phTitle = match[i][1]
                    phUrl = self.MAIN_URL + '/serial,' + match[i][0]
                    printDBG('Host listsItems phImage: ' + phImage)
                    printDBG('Host listsItems phUrl: ' + phUrl)
                    printDBG('Host listsItems phTitle: ' + phTitle)
                    valTab.append(
                        CDisplayListItem(phTitle, phTitle,
                                         CDisplayListItem.TYPE_CATEGORY,
                                         [phUrl], 'seriale-sezony', phImage,
                                         None))
            printDBG('Host listsItems end')
            return valTab
        if 'seriale-abc' == name:
            printDBG('Host listsItems begin name=' + name)
            abcTab = self.cm.makeABCList()
            for i in range(len(abcTab)):
                phTitle = abcTab[i]
                valTab.append(
                    CDisplayListItem(phTitle, phTitle,
                                     CDisplayListItem.TYPE_CATEGORY,
                                     [url, phTitle], 'seriale-alfabet', '',
                                     None))
            printDBG('Host listsItems end')
            return valTab
        if 'seriale-alfabet' == name:
            printDBG('Host listsItems begin name=' + name)
            try:
                data = self.cm.getURLRequestData({
                    'url': url,
                    'use_host': False,
                    'use_cookie': False,
                    'use_post': False,
                    'return_data': True
                })
            except:
                printDBG('Host listsItems query error')
                printDBG('Host listsItems query error url:' + url)
                return valTab
            #printDBG( 'Host listsItems data: '+data )
            letter = self.currList[Index].urlItems[1]
            match = re.compile(
                ' <a class="serial_green" href="serial,(.+?)">(.+?)</a><br/>'
            ).findall(data)
            if len(match) > 0:
                for i in range(len(match)):
                    addItem = False
                    if letter == '0 - 9' and (ord(match[i][1][0]) < 65
                                              or ord(match[i][1][0]) > 91):
                        addItem = True
                    if (letter == match[i][1][0].upper()): addItem = True
                    if (addItem):
                        phImage = 'http://static.scs.pl/static/serials/' + match[
                            i][0].replace('.html', '.jpg')
                        phTitle = match[i][1]
                        phUrl = self.MAIN_URL + '/serial,' + match[i][0]
                        printDBG('Host listsItems phImage: ' + phImage)
                        printDBG('Host listsItems phUrl: ' + phUrl)
                        printDBG('Host listsItems phTitle: ' + phTitle)
                        valTab.append(
                            CDisplayListItem(phTitle, phTitle,
                                             CDisplayListItem.TYPE_CATEGORY,
                                             [phUrl], 'seriale-sezony',
                                             phImage, None))
            printDBG('Host listsItems end')
            return valTab
        if 'seriale-sezony' == name:
            printDBG('Host listsItems begin name=' + name)
            try:
                data = self.cm.getURLRequestData({
                    'url': url,
                    'use_host': False,
                    'use_cookie': False,
                    'use_post': False,
                    'return_data': True
                })
            except:
                printDBG('Host listsItems query error')
                printDBG('Host listsItems query error url:' + url)
                return valTab
            #printDBG( 'Host listsItems data: '+data )
            phMovies = re.compile(
                '<meta itemprop="seasonNumber" content="(.+?)">').findall(data)
            if phMovies:
                phImage = url.replace(
                    self.MAIN_URL + '/serial,',
                    'http://static.scs.pl/static/serials/').replace(
                        '.html', '.jpg')
                printDBG('Host listsItems phImage: ' + phImage)
                for (phTitle) in phMovies:
                    printDBG('Host listsItems phTitle: ' + phTitle)
                    valTab.append(
                        CDisplayListItem('Sezon ' + phTitle,
                                         'Sezon ' + phTitle,
                                         CDisplayListItem.TYPE_CATEGORY,
                                         [url, phTitle], 'seriale-odcinki',
                                         phImage, None))
            printDBG('Host listsItems end')
            return valTab
        if 'seriale-odcinki' == name:
            printDBG('Host listsItems begin name=' + name)
            try:
                data = self.cm.getURLRequestData({
                    'url': url,
                    'use_host': False,
                    'use_cookie': False,
                    'use_post': False,
                    'return_data': True
                })
            except:
                printDBG('Host listsItems query error')
                printDBG('Host listsItems query error url:' + url)
                return valTab
            #printDBG( 'Host listsItems data: '+data )
            sezon = self.currList[Index].urlItems[1]
            r = re.compile(
                '<meta itemprop="seasonNumber" content="' + sezon +
                '">(.+?)</ul></div>', re.DOTALL).findall(data)
            if not r: return []
            phMovies = re.compile(
                'itemprop="episodeNumber">(.+?)<.+?class="aLink " href="(odcinek,.+?,.+?,.+?,.+?.html)"><span itemprop="name">(.+?)</span></a>'
            ).findall(r[0])
            if phMovies:
                phImage = url.replace(
                    self.MAIN_URL + '/serial,',
                    'http://static.scs.pl/static/serials/').replace(
                        '.html', '.jpg')
                serial = url.replace(self.MAIN_URL + '/serial,',
                                     '').replace('.html', '')
                printDBG('Host listsItems phImage: ' + phImage)
                for (phEpizod, phUrl, phName) in phMovies:
                    printDBG('Host listsItems phEpizod: ' + phEpizod)
                    printDBG('Host listsItems phUrl: ' + phUrl)
                    phTitle = '%s S%sE%s - %s' % (serial, sezon, phEpizod,
                                                  phName)
                    printDBG('Host listsItems phTitle: ' + phTitle)
                    valTab.append(
                        CDisplayListItem(
                            phTitle, phTitle, CDisplayListItem.TYPE_CATEGORY,
                            [self.MAIN_URL + '/' + phUrl, phTitle],
                            'seriale-odcinki-wersje', phImage, None))
            printDBG('Host listsItems end')
            return valTab
        if 'seriale-odcinki-wersje' == name:
            printDBG('Host listsItems begin name=' + name)
            try:
                data = self.cm.getURLRequestData({
                    'url': url,
                    'use_host': False,
                    'use_cookie': False,
                    'use_post': False,
                    'return_data': True
                })
            except:
                printDBG('Host listsItems query error')
                printDBG('Host listsItems query error url:' + url)
                return valTab
            #printDBG( 'Host listsItems data: '+data )
            parse = re.search('Wersje:(.*?)Kopie:', data, re.S)
            if not parse: return []
            phMovies = re.findall('<a href="(.+?)">(.+?)<', parse.group(1),
                                  re.S)
            if phMovies:
                phImage = url.replace(
                    self.MAIN_URL + '/serial,',
                    'http://static.scs.pl/static/serials/').replace(
                        '.html', '.jpg')
                printDBG('Host listsItems phImage: ' + phImage)
                for (phUrl, phWersja) in phMovies:
                    printDBG('Host listsItems phUrl: ' + phUrl)
                    printDBG('Host listsItems phWersja: ' + phWersja)
                    valTab.append(
                        CDisplayListItem(phWersja, phWersja,
                                         CDisplayListItem.TYPE_CATEGORY,
                                         [self.MAIN_URL + '/' + phUrl],
                                         'seriale-odcinki-kopie', phImage,
                                         None))
            printDBG('Host listsItems end')
            return valTab
        if 'seriale-odcinki-kopie' == name:
            printDBG('Host listsItems begin name=' + name)
            try:
                data = self.cm.getURLRequestData({
                    'url': url,
                    'use_host': False,
                    'use_cookie': False,
                    'use_post': False,
                    'return_data': True
                })
            except:
                printDBG('Host listsItems query error')
                printDBG('Host listsItems query error url:' + url)
                return valTab
            #printDBG( 'Host listsItems data: '+data )
            parse = re.search('class="mirrors"(.*?)class="switch"', data, re.S)
            if not parse: return []
            phMovies = re.findall(
                '= "(.+?)"; ccc.+?;.+?"(.+?)";.+?"(.+?)";.+?"(.+?)";',
                parse.group(1), re.S)
            if phMovies:
                for (phUrl, phTime, phUser, phComment) in phMovies:
                    printDBG('Host listsItems phUrl: ' + phUrl)
                    printDBG('Host listsItems phTime: ' + phTime)
                    printDBG('Host listsItems phUser: '******' ' + phUser,
                            phTime + ' ' + phUser + ' ' + phComment,
                            CDisplayListItem.TYPE_VIDEO,
                            [CUrlItem('', phUrl, 1)], 0, '', None))
            printDBG('Host listsItems end')
            return valTab

        return valTab
    def listsItems(self, Index, url, name=''):
        printDBG('Host listsItems begin')
        printDBG('Host listsItems url: ' + url)
        valTab = []
        if name == 'main-menu':
            printDBG('Host listsItems begin name=' + name)
            self.MAIN_URL = 'http://zalukaj.tv'
            valTab.append(
                CDisplayListItem('Filmy ' + self.konto, 'http://zalukaj.tv',
                                 CDisplayListItem.TYPE_CATEGORY,
                                 ['http://zalukaj.tv/'], 'filmy', '', None))
            valTab.append(
                CDisplayListItem('Seriale', 'http://zalukaj.tv/seriale',
                                 CDisplayListItem.TYPE_CATEGORY,
                                 ['http://zalukaj.tv/seriale'], 'seriale', '',
                                 None))
            valTab.append(
                CDisplayListItem('Szukaj', 'Szukaj filmów',
                                 CDisplayListItem.TYPE_SEARCH,
                                 ['http://szukaj.zalukaj.tv/szukaj'],
                                 'seriale', '', None))
            valTab.append(
                CDisplayListItem('Historia wyszukiwania',
                                 'Historia wyszukiwania',
                                 CDisplayListItem.TYPE_CATEGORY,
                                 ['http://zalukaj.tv/seriale'], 'history', '',
                                 None))
            printDBG('Host listsItems end')
            return valTab

        # ########## #
        if 'history' == name:
            printDBG('Host listsItems begin name=' + name)
            for histItem in self.history.getHistoryList():
                valTab.append(
                    CDisplayListItem(histItem['pattern'], 'Szukaj ',
                                     CDisplayListItem.TYPE_CATEGORY,
                                     [histItem['pattern'], histItem['type']],
                                     'search', '', None))
            printDBG('Host listsItems end')
            return valTab

        # ########## #
        if 'search' == name:
            printDBG('Host listsItems begin name=' + name)
            pattern = url
            if Index == -1:
                self.history.addHistoryItem(pattern, 'video')
            url = 'http://k.zalukaj.tv/szukaj'
            try:
                data = self.cm.getURLRequestData(
                    {
                        'url': url,
                        'use_host': False,
                        'use_cookie': False,
                        'use_post': True,
                        'return_data': True
                    }, {'searchinput': pattern})
            except:
                printDBG('Host listsItems query error')
                printDBG('Host listsItems query error url:' + url)
                return valTab
            #printDBG( 'Host listsItems data: '+data )
            phMovies = re.findall(
                'class="tivief4".*?src="(.*?)".*?<a href="(.*?)".*?title="(.*?)".*?div style.*?">(.*?)<.*?class="few_more">(.*?)<',
                data, re.S)
            if phMovies:
                for (phImage, phUrl, phTitle, phDescr, phMore) in phMovies:
                    printDBG('Host listsItems phImage: ' + phImage)
                    printDBG('Host listsItems phUrl: ' + phUrl)
                    printDBG('Host listsItems phTitle: ' + phTitle)
                    printDBG('Host listsItems phDescr: ' + phDescr)
                    printDBG('Host listsItems phMore: ' + phMore)
                    valTab.append(
                        CDisplayListItem(phTitle,
                                         phMore + ' | ' + decodeHtml(phDescr),
                                         CDisplayListItem.TYPE_VIDEO,
                                         [CUrlItem('', phUrl, 1)], 0, phImage,
                                         None))
            printDBG('Host listsItems end')
            return valTab

        # ########## #
        if 'seriale' == name:
            printDBG('Host listsItems begin name=' + name)
            self.MAIN_URL = 'http://zalukaj.tv'
            try:
                data = self.cm.getURLRequestData({
                    'url': url,
                    'use_host': False,
                    'use_cookie': False,
                    'use_post': False,
                    'return_data': True
                })
            except:
                printDBG('Host listsItems query error')
                printDBG('Host listsItems query error url:' + url)
                return valTab
            #printDBG( 'Host listsItems data: '+data )
            parse = re.search('<div id="two"(.*?)</table>', data, re.S)
            if not parse: return ''
            phMovies = re.findall(
                '<td class="wef32f"><a href="(.*?)" title="(.*?)"',
                parse.group(1), re.S)
            if phMovies:
                for (phUrl, phTitle) in phMovies:
                    printDBG('Host listsItems phUrl: ' + phUrl)
                    printDBG('Host listsItems phTitle: ' + phTitle)
                    valTab.append(
                        CDisplayListItem(phTitle, phTitle,
                                         CDisplayListItem.TYPE_CATEGORY,
                                         [self.fullUrl(phUrl)],
                                         'seriale-sezony', '', None))
            valTab.insert(
                0,
                CDisplayListItem('--Ostatnio zaktualizowane seriale--',
                                 'Ostatnio zaktualizowane seriale',
                                 CDisplayListItem.TYPE_CATEGORY,
                                 ['http://zalukaj.tv/seriale'], 'seriale-last',
                                 '', None))
            printDBG('Host listsItems end')
            return valTab
        if 'seriale-last' == name:
            printDBG('Host listsItems begin name=' + name)
            self.MAIN_URL = 'http://zalukaj.tv'
            try:
                data = self.cm.getURLRequestData({
                    'url': url,
                    'use_host': False,
                    'use_cookie': False,
                    'use_post': False,
                    'return_data': True
                })
            except:
                printDBG('Host listsItems query error')
                printDBG('Host listsItems query error url:' + url)
                return valTab
            #printDBG( 'Host listsItems data: '+data )
            phMovies = re.findall(
                '<div class="latest tooltip".*?href="(.*?)" title="(.*?)".*?src="(.*?)"',
                data, re.S)
            if phMovies:
                for (phUrl, phTitle, phImage) in phMovies:
                    printDBG('Host listsItems phUrl: ' + phUrl)
                    printDBG('Host listsItems phTitle: ' + phTitle)
                    printDBG('Host listsItems phImage: ' + phImage)
                    valTab.append(
                        CDisplayListItem(phTitle, phTitle,
                                         CDisplayListItem.TYPE_CATEGORY,
                                         [self.fullUrl(phUrl)],
                                         'seriale-sezon', phImage, None))
            printDBG('Host listsItems end')
            return valTab
        if 'seriale-sezony' == name:
            printDBG('Host listsItems begin name=' + name)
            self.MAIN_URL = 'http://zalukaj.tv'
            try:
                data = self.cm.getURLRequestData({
                    'url': url,
                    'use_host': False,
                    'use_cookie': False,
                    'use_post': False,
                    'return_data': True
                })
            except:
                printDBG('Host listsItems query error')
                printDBG('Host listsItems query error url:' + url)
                return valTab
            #printDBG( 'Host listsItems data: '+data )
            phImage = ''
            parse = re.search('<div id="sezony".*?img src="(.*?)"', data, re.S)
            if parse: phImage = parse.group(1)
            printDBG('Host listsItems phImage: ' + phImage)
            phMovies = re.findall('<a class="sezon" href="(.*?)".*?>(.*?)<',
                                  data, re.S)
            if phMovies:
                for (phUrl, phTitle) in phMovies:
                    printDBG('Host listsItems phUrl: ' + phUrl)
                    printDBG('Host listsItems phTitle: ' + phTitle)
                    valTab.append(
                        CDisplayListItem(phTitle, phTitle,
                                         CDisplayListItem.TYPE_CATEGORY,
                                         [self.fullUrl(phUrl)],
                                         'seriale-sezon', phImage, None))
            printDBG('Host listsItems end')
            return valTab
        if 'seriale-sezon' == name:
            printDBG('Host listsItems begin name=' + name)
            self.MAIN_URL = 'http://zalukaj.tv'
            try:
                data = self.cm.getURLRequestData({
                    'url': url,
                    'use_host': False,
                    'use_cookie': False,
                    'use_post': False,
                    'return_data': True
                })
            except:
                printDBG('Host listsItems query error')
                printDBG('Host listsItems query error url:' + url)
                return valTab
            #printDBG( 'Host listsItems data: '+data )
            phImage = ''
            parse = re.search('<img src="(.*?)"', data, re.S)
            if parse: phImage = parse.group(1)
            printDBG('Host listsItems phImage: ' + phImage)
            phMovies = re.findall(
                'id="sezony".*?>(.*?)<.*?href="(.*?)" title="(.*?)"', data,
                re.S)
            if phMovies:
                for (phEpisode, phUrl, phTitle) in phMovies:
                    printDBG('Host listsItems phEpizod: ' + phEpisode)
                    printDBG('Host listsItems phUrl: ' + phUrl)
                    printDBG('Host listsItems phTitle: ' + phTitle)
                    valTab.append(
                        CDisplayListItem(
                            phEpisode + ' - ' + phTitle, phTitle,
                            CDisplayListItem.TYPE_VIDEO,
                            [CUrlItem('', self.fullUrl(phUrl), 1)], 0, phImage,
                            None))
                    printDBG('Host listsItems end')
            return valTab
        if 'filmy' == name:
            printDBG('Host listsItems begin name=' + name)
            self.MAIN_URL = 'http://zalukaj.tv'
            try:
                data = self.cm.getURLRequestData({
                    'url': url,
                    'use_host': False,
                    'use_cookie': False,
                    'use_post': False,
                    'return_data': True
                })
            except:
                printDBG('Host listsItems query error')
                printDBG('Host listsItems query error url:' + url)
                return valTab
            #printDBG( 'Host listsItems data: '+data )
            sts, parse = CParsingHelper.getDataBeetwenMarkers(
                data, '<table id="one"', '</table>', False)
            phMovies = re.findall(
                '<td class="wef32f"><a href="([^"]+?)">([^<]+?)</a>', parse,
                re.S)
            if phMovies:
                for (phUrl, phTitle) in phMovies:
                    printDBG('Host listsItems phUrl: ' + phUrl)
                    printDBG('Host listsItems phTitle: ' + phTitle)
                    valTab.append(
                        CDisplayListItem(phTitle, phTitle,
                                         CDisplayListItem.TYPE_CATEGORY,
                                         [self.fullUrl(phUrl)], 'filmy-clip',
                                         '', None))
            #valTab.insert(0,CDisplayListItem('--Najpopularniejsze--', 'Najpopularniejsze wyswietlenia-miesiac', CDisplayListItem.TYPE_CATEGORY, ['http://zalukaj.tv/#wyswietlenia-miesiac'], 'filmy-last', '', None))
            #valTab.insert(0,CDisplayListItem('--Ostatnio oglądane--', 'Ostatnio oglądane',                      CDisplayListItem.TYPE_CATEGORY, ['http://zalukaj.tv/#lastseen'],             'filmy-last', '', None))
            valTab.insert(
                0,
                CDisplayListItem('--Ostatnio dodane--', 'Ostatnio dodane',
                                 CDisplayListItem.TYPE_CATEGORY,
                                 ['http://zalukaj.tv'], 'filmy-last', '',
                                 None))
            printDBG('Host listsItems end')
            return valTab
        if 'filmy-clip' == name:
            printDBG('Host listsItems begin name=' + name)
            self.MAIN_URL = 'http://zalukaj.tv'
            try:
                data = self.cm.getURLRequestData({
                    'url': url,
                    'use_host': False,
                    'use_cookie': False,
                    'use_post': False,
                    'return_data': True
                })
            except:
                printDBG('Host listsItems query error')
                printDBG('Host listsItems query error url:' + url)
                return valTab
            #printDBG( 'Host listsItems data: '+data )
            phMovies = re.findall(
                'background-image:url(.*?);"><p><span>(.*?)</span>.*?<h3><a href="(.*?)".*?">(.*?)<.*?">(.*?)<.*?class="few_more">(.*?)<',
                data, re.S)
            if phMovies:
                for (phImage, phRok, phUrl, phTitle, phDescr,
                     phMore) in phMovies:
                    printDBG('Host listsItems phImage: ' + phImage)
                    printDBG('Host listsItems phRok: ' + phRok)
                    printDBG('Host listsItems phUrl: ' + phUrl)
                    printDBG('Host listsItems phTitle: ' + phTitle)
                    printDBG('Host listsItems phDescr: ' + phDescr)
                    printDBG('Host listsItems phMore: ' + phMore)
                    valTab.append(
                        CDisplayListItem(
                            phTitle, phRok + ' | ' + phMore + ' | ' +
                            decodeHtml(phDescr), CDisplayListItem.TYPE_VIDEO,
                            [CUrlItem('', phUrl, 1)], 0, phImage[1:-1], None))
            match = re.findall('class="pc_current">.*?href="(.*?)">(.*?)<',
                               data, re.S)
            if match:
                phUrl = match[-1][0]
                phTitle = match[-1][1]
                valTab.append(
                    CDisplayListItem('Strona ' + phTitle, 'Strona: ' + phUrl,
                                     CDisplayListItem.TYPE_CATEGORY,
                                     [self.fullUrl(phUrl)], name, '', None))
            printDBG('Host listsItems end')
            return valTab
        if 'filmy-last' == name:
            printDBG('Host listsItems begin name=' + name)
            self.MAIN_URL = 'http://zalukaj.tv'
            try:
                data = self.cm.getURLRequestData({
                    'url': url,
                    'use_host': False,
                    'use_cookie': False,
                    'use_post': False,
                    'return_data': True
                })
            except:
                printDBG('Host listsItems query error')
                printDBG('Host listsItems query error url:' + url)
                return valTab
            #printDBG( 'Host listsItems data: '+data )
            phMovies = re.findall(
                'class="tivief4".*?src="(.*?)".*?<h3><a href="(.*?)".*?">(.*?)<.*?">(.*?)<.*?class="few_more">(.*?)<',
                data, re.S)
            if phMovies:
                for (phImage, phUrl, phTitle, phDescr, phMore) in phMovies:
                    printDBG('Host listsItems phImage: ' + phImage)
                    printDBG('Host listsItems phUrl: ' + phUrl)
                    printDBG('Host listsItems phTitle: ' + phTitle)
                    printDBG('Host listsItems phDescr: ' + phDescr)
                    printDBG('Host listsItems phMore: ' + phMore)
                    valTab.append(
                        CDisplayListItem(
                            phTitle, phMore + ' | ' + decodeHtml(phDescr),
                            CDisplayListItem.TYPE_VIDEO,
                            [CUrlItem('', self.fullUrl(phUrl), 1)], 0, phImage,
                            None))
            printDBG('Host listsItems end')
            return valTab

        return valTab
Пример #28
0
    def listsItems(self, Index, url, name = ''):
        printDBG( 'Host listsItems begin' )
        valTab = []
        if name == 'main-menu':
           printDBG( 'Host listsItems begin name='+name )
           #valTab.append(CDisplayListItem("Newest (HD-1080p)",  "Newest (HD-1080p)",  CDisplayListItem.TYPE_CATEGORY, ['http://trailers.apple.com/trailers/home/xml/newest_1080p.xml'],  'appletrailers-movies', '', None)) 
           #valTab.append(CDisplayListItem("Current (HD-1080p)", "Current (HD-1080p)", CDisplayListItem.TYPE_CATEGORY, ['http://trailers.apple.com/trailers/home/xml/current_1080p.xml'], 'appletrailers-movies', '', None)) 
           valTab.append(CDisplayListItem("Newest (HD-720p)",   "Newest (HD-720p)",   CDisplayListItem.TYPE_CATEGORY, ['http://trailers.apple.com/trailers/home/xml/newest_720p.xml'],   'appletrailers-movies', '', None)) 
           valTab.append(CDisplayListItem("Current (HD-720p)",  "Current (HD-720p)",  CDisplayListItem.TYPE_CATEGORY, ['http://trailers.apple.com/trailers/home/xml/current_720p.xml'],  'appletrailers-movies', '', None)) 
           valTab.append(CDisplayListItem("Newest (HD-480p)",   "Newest (HD-480p)",   CDisplayListItem.TYPE_CATEGORY, ['http://trailers.apple.com/trailers/home/xml/newest_480p.xml'],   'appletrailers-movies', '', None)) 
           valTab.append(CDisplayListItem("Current (HD-480p)",  "Current (HD-480p)",  CDisplayListItem.TYPE_CATEGORY, ['http://trailers.apple.com/trailers/home/xml/current_480p.xml'],  'appletrailers-movies', '', None)) 
           valTab.append(CDisplayListItem("Newest (SD)",        "Newest (SD)",        CDisplayListItem.TYPE_CATEGORY, ['http://trailers.apple.com/trailers/home/xml/newest.xml'],        'appletrailers-movies', '', None)) 
           valTab.append(CDisplayListItem("Current (SD)",       "Current (SD)",       CDisplayListItem.TYPE_CATEGORY, ['http://trailers.apple.com/trailers/home/xml/current.xml'],       'appletrailers-movies', '', None)) 
           printDBG( 'Host listsItems end' )
           return valTab
        
        # ########## #
        if 'appletrailers-movies' == name:
           printDBG( 'Host listsItems begin name='+name )
           self.MAIN_URL = 'http://trailers.apple.com' 
           query_data = { 'url': url, 'use_host': False, 'use_cookie': False, 'use_post': False, 'return_data': True }
           try:
              data = self.cm.getURLRequestData(query_data)
           except Exception:
              printDBG( 'Host listsItems query error' )
              printDBG( 'Host listsItems query error url:'+url )
              return valTab
           printDBG( 'Host listsItems data: '+data )
           phMovies = re.findall('<movieinfo.*?<title>(.*?)</title>.*?<runtime>(.*?)</runtime>.*?<location>(.*?)</location>.*?<large filesize=".*?">(.*?)</large>', data, re.S)
           if phMovies:
              for (phTitle, phRuntime, phImage, phUrl) in phMovies:
                  phUrl = urlparser.decorateUrl(phUrl, {'User-Agent':'QuickTime/7.6.2'})
                  printDBG( 'Host listsItems phTitle:   ' +phTitle )
                  printDBG( 'Host listsItems phRuntime: ' +phRuntime )
                  printDBG( 'Host listsItems phImage:   ' +phImage )
                  printDBG( 'Host listsItems phUrl:     ' +phUrl )
                  valTab.append(CDisplayListItem(phTitle,'['+phRuntime+'] '+phTitle,CDisplayListItem.TYPE_VIDEO, [CUrlItem('', phUrl, 1)], 0, phImage, None)) 
           printDBG( 'Host listsItems end' )
           return valTab

        return valTab
Пример #29
0
    def getLinksForVideo(self, Index = 0, selItem = None):
        listLen = len(self.host.currList)
        if listLen <= Index or Index < 0:
            printDBG( "ERROR getLinksForVideo - current list is to short len: %d, Index: %d" % (listLen, Index) )
            return RetHost(RetHost.ERROR, value = [])
        
        if self.host.currList[Index]["type"] not in ['video', 'audio', 'picture']:
            printDBG( "ERROR getLinksForVideo - current item has wrong type" )
            return RetHost(RetHost.ERROR, value = [])

        retlist = []
        cItem = self.host.currList[Index]
        url   = self.host.currList[Index].get("url", '')
        name  = self.host.currList[Index].get("name", '')
        
        printDBG(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> [%s] [%s]" % (name, url))
        urlList = None
        
        if -1 != url.find('teledunet'):
            new_url = TeledunetParser().get_rtmp_params(url)
            if 0 < len(url): retlist.append(CUrlItem("Własny link", new_url))
        elif url.startswith('http://goldvod.tv/'): urlList = self.host.getGoldVodTvLink(cItem)
        elif name == 'livemass.net':                urlList = self.host.getLivemassNetLink(cItem)
        elif name == "sport365.live":              urlList = self.host.getSport365LiveLink(cItem)
        elif name == 'wagasworld.com':             urlList = self.host.getWagasWorldLink(cItem)
        elif name == 'others':                     urlList = self.host.getOthersLinks(cItem)
        elif 'weeb.tv' in name:                    url = self.host.getWeebTvLink(url)
        elif name == "filmon_channel":             urlList = self.host.getFilmOnLink(channelID=url)
        elif name == "videostar.pl":               urlList = self.host.getVideostarLink(cItem)
        elif name == 'bilasport.com':              urlList = self.host.getBilaSportPwLink(cItem)
        elif name == 'canlitvlive.io':             urlList = self.host.getCanlitvliveIoLink(cItem)
        elif name == 'djing.com':                  urlList = self.host.getDjingComLink(cItem)
        elif name == 'ustvnow':                    urlList = self.host.getUstvnowLink(cItem)
        elif name == 'wizja.tv':                   urlList = self.host.getWizjaTvLink(cItem)
        elif name == 'meteo.pl':                   urlList = self.host.getMeteoPLLink(cItem)
        elif name == 'edem.tv':                    urlList = self.host.getEdemTvLink(cItem)
        elif name == 'skylinewebcams.com':         urlList = self.host.getWkylinewebcamsComLink(cItem)
        elif name == "webcamera.pl":               urlList = self.host.getWebCameraLink(cItem)
        elif name == "prognoza.pogody.tv":         urlList = self.host.prognozaPogodyLink(url)
        elif name == "mlbstream.tv":               urlList = self.host.getMLBStreamTVLink(cItem)
        elif name == "beinmatch.com":              urlList = self.host.getBeinmatchLink(cItem)
        elif name == "wiz1.net":                   urlList = self.host.getWiz1NetLink(cItem)

        if isinstance(urlList, list):
            for item in urlList:
                retlist.append(CUrlItem(item['name'], item['url'], item.get('need_resolve', 0)))
        elif isinstance(url, basestring):
            if url.endswith('.m3u'):
                tmpList = self.host.getDirectVideoHasBahCa(name, url)
                for item in tmpList:
                    retlist.append(CUrlItem(item['name'], item['url']))
            else:
                url = urlparser.decorateUrl(url)
                iptv_proto = url.meta.get('iptv_proto', '')
                if 'm3u8' == iptv_proto:
                    if '84.114.88.26' == url.meta.get('X-Forwarded-For', ''):
                        url.meta['iptv_m3u8_custom_base_link'] = '' + url
                        url.meta['iptv_proxy_gateway'] = 'http://webproxy.at/surf/printer.php?u={0}&b=192&f=norefer'
                        url.meta['Referer'] =  url.meta['iptv_proxy_gateway'].format(urllib.quote_plus(url))
                        meta = url.meta
                        tmpList = getDirectM3U8Playlist(url, checkExt=False)
                        if 1 == len(tmpList):
                            url = urlparser.decorateUrl(tmpList[0]['url'], meta)
                            
                    tmpList = getDirectM3U8Playlist(url, checkExt=False)
                    for item in tmpList:
                        retlist.append(CUrlItem(item['name'], item['url']))
                elif 'f4m' == iptv_proto:
                    tmpList = getF4MLinksWithMeta(url, checkExt=False)
                    for item in tmpList:
                        retlist.append(CUrlItem(item['name'], item['url']))
                else:
                    if '://' in url:
                        ua  = strwithmeta(url).meta.get('User-Agent', '')
                        if 'balkanstream.com' in url:
                            if '' == ua: url.meta['User-Agent'] = 'Mozilla/5.0'
                                
                        retlist.append(CUrlItem("Link", url))
            
        return RetHost(RetHost.OK, value = retlist)
Пример #30
0
 def listsItems(self, url, clip = True):
     printDBG( 'Host listsItems begin' )
     valTab = []
     query_data = {'url': url, 'use_host': False, 'use_cookie': False, 'use_post': False, 'return_data': True}
     try:
         printDBG( 'Host listsItems begin query' )
         data = self.cm.getURLRequestData(query_data)
         printDBG( 'Host listsItems begin json' )
         result = json.loads(data)
     except:
         printDBG( 'Host listsItems ERROR' )
         return valTab
     if clip:
         printDBG('Host listsItems clip')
         for item in result['clips']:
             minimalAge = 0
             minimalAge = item['minimalAge']
             printDBG('Host listsItems clip Age')
             printDBG('Host listsItems clip Age minimal')
             printDBG(str(minimalAge))
             printDBG('Host listsItems clip Age host')
             printDBG(str(self.Age))
             printDBG('Host listsItems clip Age ==')
             if self.Age >= minimalAge:
                printDBG('Host listsItems clip Age ok')
                valTab.append(CDisplayListItem(item['title'].encode('UTF-8'),  '[minimalAge: '+str(minimalAge)+' ] '+item['description'].encode('UTF-8'),  CDisplayListItem.TYPE_VIDEO, [CUrlItem('', item['clipUrl'].encode('UTF-8'), 0)], 0, item['thumbnail'].encode('UTF-8'), None))
             else:
                printDBG('Host listsItems clip Age nok')
                if self.UkryjAge:
                   printDBG('Host listsItems clip Age nok ukryj')
                else:
                   printDBG('Host listsItems clip Age nok noukryj')
                   valTab.append(CDisplayListItem(item['title'].encode('UTF-8'),  '[minimalAge: '+str(minimalAge)+' ] '+item['description'].encode('UTF-8'),  CDisplayListItem.TYPE_VIDEO, [], 0, item['thumbnail'].encode('UTF-8'), None))
         if result['page'] != result['pageCount']:
             valTab.append(CDisplayListItem('nextpage',  'Następna strona',  CDisplayListItem.TYPE_CATEGORY, [url + "&page=" + str(result['page']+1)], 1, '', None))
         printDBG( 'Host listsItems clip end' )
         return valTab
     else:
         printDBG('Host listsItems clip else')
         for item in result:
             if item['name'] != 'Najnowsze' and item['name'] != 'Wszystkie':
                valTab.append(CDisplayListItem(item['name'].encode('UTF-8'),  item['description'].encode('UTF-8'),  CDisplayListItem.TYPE_CATEGORY, ['http://tosiewytnie.pl/app/cliplist?nid='+str(item['nid'])], 1, item['logo'], None))
         return valTab