Esempio n. 1
0
    def setBookmark(self):
        oInputParameterHandler = cInputParameterHandler()

        #         Pour quelle raison ? A expliquer en commentaire si cela est toujours vrai
        #         if oInputParameterHandler.getValue('sId') == 'kepliz_com':
        #             self.DIALOG.VSinfo('Error', self.ADDON.VSlang(30037))
        #             return

        if int(oInputParameterHandler.getValue('sCat')) < 1:
            self.DIALOG.VSinfo('Error', self.ADDON.VSlang(30038))
            return

        meta = {}
        meta['siteurl'] = oInputParameterHandler.getValue('siteUrl')
        meta['site'] = oInputParameterHandler.getValue('sId')
        meta['fav'] = oInputParameterHandler.getValue('sFav')
        meta['cat'] = oInputParameterHandler.getValue('sCat')

        # ListItem.title contient des code de couleurs, sMovieTitle le titre en plus "propre"
        # Inutile a la prochaine version, car plus de couleurs a la base.
        if oInputParameterHandler.getValue('sMovieTitle'):
            meta['title'] = oInputParameterHandler.getValue('sMovieTitle')
        else:
            meta['title'] = xbmc.getInfoLabel('ListItem.title')

        meta['icon'] = xbmc.getInfoLabel('ListItem.Art(thumb)')
        meta['fanart'] = xbmc.getInfoLabel('ListItem.Art(fanart)')
        try:
            cDb().insert_bookmark(meta)
        except:
            pass
Esempio n. 2
0
    def setFavorite(self):
        oInputParameterHandler = cInputParameterHandler()
        #cConfig().log(str(oInputParameterHandler.getAllParameter()))

        if oInputParameterHandler.getValue('sId') == 'kepliz_com':
            cConfig().showInfo('Error', 'Non possible pour ce site')
            return

        if int(oInputParameterHandler.getValue('sCat')) < 1:
            cConfig().showInfo('Error',
                               'Mise en Favoris non possible pour ce lien')
            return

        meta = {}
        meta['siteurl'] = oInputParameterHandler.getValue('siteUrl')
        meta['site'] = oInputParameterHandler.getValue('sId')
        meta['fav'] = oInputParameterHandler.getValue('sFav')
        meta['cat'] = oInputParameterHandler.getValue('sCat')

        #ListItem.title contient des code de couleurs, sMovieTitle le titre en plus "propre"
        #Inutile a la prochaine version, car plus de couleurs a la base.
        if oInputParameterHandler.getValue('sMovieTitle'):
            meta['title'] = oInputParameterHandler.getValue('sMovieTitle')
        else:
            meta['title'] = xbmc.getInfoLabel('ListItem.title')

        meta['icon'] = xbmc.getInfoLabel('ListItem.Art(thumb)')
        meta['fanart'] = xbmc.getInfoLabel('ListItem.Art(fanart)')
        try:
            cDb().insert_favorite(meta)
        except:
            pass
Esempio n. 3
0
    def setFavorite(self):
        oInputParameterHandler = cInputParameterHandler()
        #cConfig().log(str(oInputParameterHandler.getAllParameter()))

        if oInputParameterHandler.getValue('sId') == 'kepliz_com':
            cConfig().showInfo('Error', 'Non possible pour ce site')
            return

        if int(oInputParameterHandler.getValue('sCat')) < 1:
            cConfig().showInfo('Error',
                               'Mise en Favoris non possible pour ce lien')
            return

        meta = {}
        meta['siteurl'] = oInputParameterHandler.getValue('siteUrl')
        meta['site'] = oInputParameterHandler.getValue('sId')
        meta['fav'] = oInputParameterHandler.getValue('sFav')
        meta['cat'] = oInputParameterHandler.getValue('sCat')

        meta['title'] = xbmc.getInfoLabel('ListItem.title')
        meta['icon'] = xbmc.getInfoLabel('ListItem.Art(thumb)')
        meta['fanart'] = xbmc.getInfoLabel('ListItem.Art(fanart)')
        try:
            cDb().insert_favorite(meta)
        except:
            pass
Esempio n. 4
0
    def setBookmark(self):
        oInputParameterHandler = cInputParameterHandler()

        sCat = oInputParameterHandler.getValue('sCat') if oInputParameterHandler.exist('sCat') else xbmc.getInfoLabel('ListItem.Property(sCat)')
        if int(sCat) not in (1, 2, 5):
            self.DIALOG.VSinfo('Error', self.ADDON.VSlang(30038))
            return

        meta = {}
        
        sSiteUrl = oInputParameterHandler.getValue('siteUrl') if oInputParameterHandler.exist('siteUrl') else xbmc.getInfoLabel('ListItem.Property(siteUrl)')
        sTitle = oInputParameterHandler.getValue('sMovieTitle') if oInputParameterHandler.exist('sMovieTitle') else xbmc.getInfoLabel('ListItem.Property(sCleanTitle)')
        sSite = oInputParameterHandler.getValue('sId') if oInputParameterHandler.exist('sId') else xbmc.getInfoLabel('ListItem.Property(sId)')
        sFav = oInputParameterHandler.getValue('sFav') if oInputParameterHandler.exist('sFav') else xbmc.getInfoLabel('ListItem.Property(sFav)')

        meta['siteurl'] = sSiteUrl
        meta['title'] = sTitle
        meta['site'] = sSite
        meta['fav'] = sFav
        meta['cat'] = sCat

        meta['icon'] = xbmc.getInfoLabel('ListItem.Art(thumb)')
        meta['fanart'] = xbmc.getInfoLabel('ListItem.Art(fanart)')
        try:
            cDb().insert_bookmark(meta)
        except:
            pass
Esempio n. 5
0
    def StopDownloadList(self):

        #oInputParameterHandler = cInputParameterHandler()
        #path = oInputParameterHandler.getValue('sPath')
        #status = oInputParameterHandler.getValue('sStatus')

        #WINDOW_PROGRESS = xbmcgui.Window( 10101 )
        #WINDOW_PROGRESS.close()
        #xbmcgui.Window(10101).setProperty('arret', '1')
        #xbmc.executebuiltin("Dialog.Close(%s, true)" % 10101)
        #xbmc.getCondVisibility('Window.IsActive(10101)'))

        #thread actif
        if xbmcgui.Window(10101).getProperty('arret') == '0':
            xbmcgui.Window(10101).setProperty('arret', '1')
        #si bug
        else:
            cDownloadProgressBar().StopAll()

        #On remet tout les status a 0 ou 2
        cDb().Cancel_download()

        cConfig().update()

        return
Esempio n. 6
0
    def StopDownloadList(self):
        
        #oInputParameterHandler = cInputParameterHandler()
        #path = oInputParameterHandler.getValue('sPath')
        #status = oInputParameterHandler.getValue('sStatus')
        

        #WINDOW_PROGRESS = xbmcgui.Window( 10101 )
        #WINDOW_PROGRESS.close()        
        #xbmcgui.Window(10101).setProperty('arret', '1')
        #xbmc.executebuiltin("Dialog.Close(%s, true)" % 10101)
        #xbmc.getCondVisibility('Window.IsActive(10101)'))
        
        #thread actif
        if xbmcgui.Window(10101).getProperty('arret') == '0':
            xbmcgui.Window(10101).setProperty('arret', '1')
        #si bug
        else:
            cDownloadProgressBar().StopAll()
        
        #On remet tout les status a 0 ou 2
        cDb().Cancel_download()
        
        cConfig().update()
  
        return
Esempio n. 7
0
 def __init__(self):
     parental_check = cParentalCheck()._cache_search()
     if (parental_check == True):
         self.parseUrl()
         cDb()._create_tables()
     else:
         exitPlugin()
Esempio n. 8
0
    def setFavorite(self):
        oInputParameterHandler = cInputParameterHandler()

        if oInputParameterHandler.getValue('sId') == 'kepliz_com':
            self.DIALOG.VSinfo('Error', 'Non possible pour ce site')
            return

        if int(oInputParameterHandler.getValue('sCat')) < 1:
            self.DIALOG.VSinfo('Error', 'Mise en Favoris non possible pour ce lien')
            return

        meta = {}
        meta['siteurl'] = oInputParameterHandler.getValue('siteUrl')
        meta['site'] = oInputParameterHandler.getValue('sId')
        meta['fav'] = oInputParameterHandler.getValue('sFav')
        meta['cat'] = oInputParameterHandler.getValue('sCat')

        #ListItem.title contient des code de couleurs, sMovieTitle le titre en plus "propre"
        #Inutile a la prochaine version, car plus de couleurs a la base.
        if oInputParameterHandler.getValue('sMovieTitle'):
            meta['title'] = oInputParameterHandler.getValue('sMovieTitle')
        else:
            meta['title'] = xbmc.getInfoLabel('ListItem.title')

        meta['icon'] = xbmc.getInfoLabel('ListItem.Art(thumb)')
        meta['fanart'] =  xbmc.getInfoLabel('ListItem.Art(fanart)')
        try:
            cDb().insert_favorite(meta)
        except:
            pass
    def getAvailablePlugins(self):

        addons = addon()
        sText = self.getText()
        if not sText:
            return False
        sCat =  self.getCat()
        if not sCat:
            return False

        # historique
        try:
            if (addons.getSetting("history-view") == 'true'):
                meta = {}
                meta['title'] = sText
                meta['disp'] = sCat
                cDb().insert_history(meta)
        except: pass

        sFolder = "special://home/addons/plugin.video.vstream/resources/sites"

        sFolder = sFolder.replace('\\', '/')
        VSlog("Sites Folder: " + sFolder)

        aFileNames = self.__getFileNamesFromFolder(sFolder)

        aPlugins = []
        for sFileName in aFileNames:
            sPluginSettingsName = 'plugin_' + sFileName
            bPlugin = addons.getSetting(sPluginSettingsName)
            if (bPlugin == 'true'):
                aPlugin = self.importPlugin(sFileName, sCat)
                if aPlugin:
                    aPlugins.append(aPlugin)
        return aPlugins
Esempio n. 10
0
    def searchMovie(self):
        oGui = cGui()
        oInputParameterHandler = cInputParameterHandler()
        sSearchText = oInputParameterHandler.getValue('searchtext')
        sReadDB = oInputParameterHandler.getValue('readdb')
        sDisp = oInputParameterHandler.getValue('disp')

        oHandler = cRechercheHandler()
        aPlugins = oHandler.getAvailablePlugins(sDisp)
        if not sSearchText:
            sSearchText = oGui.showKeyBoard()
            sSearchText = urllib.quote(sSearchText)
        if (sSearchText != False):
            if (sReadDB != 'False'):
                meta = {}      
                meta['title'] = sSearchText
                meta['disp'] = sDisp
                cDb().insert_history(meta)
            #print aPlugins
            for aPlugin in aPlugins:
                    try:                   
                        oOutputParameterHandler = cOutputParameterHandler()
                        oOutputParameterHandler.addParameter('siteUrl', 'http://venom')
                        oGui.addDir(SITE_IDENTIFIER, 'showSearch', '[COLOR olive]'+ aPlugin[1] +'[/COLOR]', 'search.png', oOutputParameterHandler)
                    
                        exec "from resources.sites import "+aPlugin[1]+" as search"
                        sUrl = aPlugin[0]+sSearchText
                        searchUrl = "search.%s('%s')" % (aPlugin[2], sUrl)
                        exec searchUrl
                    except:       
                        pass
        else: return
        oGui.setEndOfDirectory()
Esempio n. 11
0
 def __setWatched(self):
     meta = {}      
     meta['title'] = self.sTitle
     meta['site'] = self.sSite
     
     try:
         cDb().insert_watched(meta)
     except:
         pass
Esempio n. 12
0
    def __setWatched(self):
        meta = {}
        meta['title'] = self.sTitle
        meta['site'] = self.sSite

        try:
            cDb().insert_watched(meta)
        except:
            pass
Esempio n. 13
0
    def CleanDownloadList(self):

        try:
            cDb().clean_download()
            self.DIALOG.VSinfo(self.ADDON.VSlang(30071))
        except:
            pass

        return
    def getAvailablePlugins(self):
        oConfig = cConfig()
        sText = self.getText()
        if not sText:
            return False
        sLabel = self.getDisp()
        if not sLabel:
            return

        #historique
        try:
            if (cConfig().getSetting("history-view") == 'true'
                    and self.__sRead != "False"):
                meta = {}
                meta['title'] = sText
                meta['disp'] = sLabel
                cDb().insert_history(meta)
        except:
            pass

        sFolder = self.getRootFolder()
        sFolder = os.path.join(sFolder, 'resources/sites')

        # xbox hack
        sFolder = sFolder.replace('\\', '/')
        cConfig().log("Sites Folder: " + sFolder)

        aFileNames = self.__getFileNamesFromFolder(sFolder)
        #multiselect
        if sLabel == 'search5':
            dialog = xbmcgui.Dialog()
            ret = dialog.multiselect(cConfig().getlanguage(30094), aFileNames)
            NewFileNames = []
            if ret > -1:
                for i in ret:
                    NewFileNames.append(aFileNames[i])

            aFileNames = NewFileNames
        #fin multiselect
        aPlugins = []

        total = len(aFileNames)
        dialog = cConfig().createDialog("vStream")
        xbmcgui.Window(10101).setProperty('search', 'true')

        for sFileName in aFileNames:

            cConfig().updateDialogSearch(dialog, total, sFileName)
            if dialog.iscanceled():
                break

            aPlugin = self.__importPlugin(sFileName, sLabel, sText)

        xbmcgui.Window(10101).setProperty('search', 'false')
        cConfig().finishDialog(dialog)
        return True
Esempio n. 15
0
 def __setResume(self):
     meta = {}
     meta['title'] = self.sTitle
     #meta['hoster'] = self.sHosterIdentifier
     meta['site'] = self.sSite
     meta['point'] = str(self.currentTime)
     try:
         cDb().insert_resume(meta)
     except:
         pass
Esempio n. 16
0
    def CleanDownloadList(self):

        try:
            cDb().clean_download()
            cConfig().showInfo('OTV_MEDIA', 'aktualisierte Liste')
            #cConfig().update()
        except:
            pass

        return
Esempio n. 17
0
    def CleanDownloadList(self):

        try:
            cDb().clean_download()
            cConfig().showInfo('TvWatch', 'Liste mise a jour')
            #cConfig().update()
        except:
            pass

        return
Esempio n. 18
0
 def __setResume(self):
     meta = {}      
     meta['title'] = self.sTitle
     #meta['hoster'] = self.sHosterIdentifier
     meta['site'] = self.sSite
     meta['point'] = str(self.currentTime)
     try:
         cDb().insert_resume(meta)
     except:
         pass
Esempio n. 19
0
    def CleanDownloadList(self):

        try:
            cDb().clean_download()
            self.DIALOG.VSinfo('Liste mise a jour')
            #VSupdate()
        except:
            pass

        return
Esempio n. 20
0
    def delBookmarkMenu(self):
        if not self.DIALOG.VSyesno(self.ADDON.VSlang(30456)):
            return False

        sTitle = xbmc.getInfoLabel('ListItem.Property(sCleanTitle)')
        siteUrl = xbmc.getInfoLabel('ListItem.Property(siteUrl)')

        cDb().del_bookmark(siteUrl, sTitle)

        return True
Esempio n. 21
0
    def CleanDownloadList(self):
        
        try:
            cDb().clean_download()
            cConfig().showInfo('vStream', 'Liste mise a jour')
            #cConfig().update()
        except:
            pass

        return
Esempio n. 22
0
    def CleanDownloadList(self):

        try:
            cDb().clean_download()
            self.DIALOG.VSinfo('Liste mise à jour')
            #VSupdate()
        except:
            pass

        return
Esempio n. 23
0
    def delBookmark(self):
        oInputParameterHandler = cInputParameterHandler()
        if not self.DIALOG.VSyesno(self.ADDON.VSlang(30456)):
            return False

        sAll = oInputParameterHandler.exist('sAll')
        sCat = oInputParameterHandler.getValue('sCat')
        siteUrl = oInputParameterHandler.getValue('siteUrl')
        sTitle = oInputParameterHandler.getValue('sCleanTitle')
        # sTitle = cUtil().CleanName(sTitle)

        cDb().del_bookmark(siteUrl, sTitle, sCat, sAll)
        return True
Esempio n. 24
0
    def getAvailablePlugins(self):

        oConfig = cConfig()
        sText = self.getText()
        if not sText:
            return False
        sCat = self.getCat()
        if not sCat:
            return False

        #historique
        try:
            if (cConfig().getSetting("history-view") == 'true'):
                meta = {}
                meta['title'] = sText
                meta['disp'] = sCat
                cDb().insert_history(meta)
        except:
            pass

        sFolder = self.getRootFolder()
        sFolder = os.path.join(sFolder, 'resources/sites')

        # xbox hack
        sFolder = sFolder.replace('\\', '/')
        cConfig().log("Sites Folder: " + sFolder)

        aFileNames = self.__getFileNamesFromFolder(sFolder)

        aPlugins = []
        for sFileName in aFileNames:
            aPlugin = self.__importPlugin(sFileName, sCat)
            if aPlugin:
                aPlugins.append(aPlugin)

        # #multiselect
        # if sLabel == 'search5':
        #     multi = []
        #     for plugin in aPlugins:
        #         multi.append(plugin['identifier'])
        #     dialog = xbmcgui.Dialog()
        #     ret = dialog.multiselect(cConfig().getlanguage(30094), multi)
        #     NewFileNames = []
        #     if ret > -1:
        #         for i in ret:
        #             NewFileNames.append(aPlugins[i])
        #
        #     aPlugins = NewFileNames
        # #fin multiselect

        return aPlugins
Esempio n. 25
0
    def ResetDownload(self):
        oInputParameterHandler = cInputParameterHandler()
        url = oInputParameterHandler.getValue('sUrl')
        meta = {}
        meta['url'] = url
        
        try:
            cDb().reset_download(meta)
            cConfig().showInfo('vStream', 'Liste mise a jour')
            cConfig().update()
        except:
            pass

        return
Esempio n. 26
0
    def ResetDownload(self):
        oInputParameterHandler = cInputParameterHandler()
        url = oInputParameterHandler.getValue('sUrl')
        meta = {}
        meta['url'] = url

        try:
            cDb().reset_download(meta)
            self.DIALOG.VSinfo('Liste mise à jour')
            VSupdate()
        except:
            pass

        return
Esempio n. 27
0
    def ResetDownload(self):
        oInputParameterHandler = cInputParameterHandler()
        url = oInputParameterHandler.getValue('sUrl')
        meta = {}
        meta['url'] = url

        try:
            cDb().reset_download(meta)
            self.DIALOG.VSinfo(self.ADDON.VSlang(30071))
            VSupdate()
        except:
            pass

        return
Esempio n. 28
0
    def ResetDownload(self):
        oInputParameterHandler = cInputParameterHandler()
        url = oInputParameterHandler.getValue('sUrl')
        meta = {}
        meta['url'] = url

        try:
            cDb().reset_download(meta)
            self.DIALOG.VSinfo('Liste mise a jour')
            VSupdate()
        except:
            pass

        return
Esempio n. 29
0
    def ResetDownload(self):
        oInputParameterHandler = cInputParameterHandler()
        url = oInputParameterHandler.getValue('sUrl')
        meta = {}
        meta['url'] = url

        try:
            cDb().reset_download(meta)
            cConfig().showInfo('TvWatch', 'Liste mise a jour')
            cConfig().update()
        except:
            pass

        return
Esempio n. 30
0
    def ResetDownload(self):
        oInputParameterHandler = cInputParameterHandler()
        url = oInputParameterHandler.getValue('sUrl')
        meta = {}
        meta['url'] = url

        try:
            cDb().reset_download(meta)
            cConfig().showInfo('OTV_MEDIA', 'aktualisierte Liste')
            cConfig().update()
        except:
            pass

        return
Esempio n. 31
0
    def delFavourites(self):

        oInputParameterHandler = cInputParameterHandler()
        siteUrl = oInputParameterHandler.getValue('siteUrl')
        sMovieTitle = oInputParameterHandler.getValue('sMovieTitle')

        meta = {}
        meta['title'] = xbmc.getInfoLabel('ListItem.title')
        meta['siteurl'] = siteUrl
        try:
            cDb().del_favorite(meta)
        except:
            pass

        return
Esempio n. 32
0
    def delFavourites(self):
        
        oInputParameterHandler = cInputParameterHandler()
        siteUrl = oInputParameterHandler.getValue('siteUrl')
        sMovieTitle = oInputParameterHandler.getValue('sMovieTitle')

        meta = {}      
        meta['title'] = xbmc.getInfoLabel('ListItem.title')
        meta['siteurl'] = siteUrl
        try:
            cDb().del_favorite(meta)
        except:
            pass
        
        return
Esempio n. 33
0
    def __updatedb(self, TotDown, iTotalSize):
        #percent 3 chiffre
        percent = '{0:.2f}'.format(min(100 * float(TotDown) / float(iTotalSize), 100))
        if percent in ['0.00','10.00','20.00','30.00','40.00','50.00','60.00','70.00','80.00','90.00']:
            meta = {}
            meta['path'] = self.__fPath
            meta['size'] = TotDown
            meta['totalsize'] = iTotalSize
            meta['status'] = 1

            try:
                cDb().update_download(meta)
                self.RefreshDownloadList()
            except:
                pass
Esempio n. 34
0
    def __updatedb(self, TotDown, iTotalSize):
        #percent 3 chiffre
        percent = '{0:.2f}'.format(min(100 * float(TotDown) / float(iTotalSize), 100))
        if percent in ['0.00', '10.00', '20.00', '30.00', '40.00', '50.00', '60.00', '70.00', '80.00', '90.00']:
            meta = {}
            meta['path'] = self.__fPath
            meta['size'] = TotDown
            meta['totalsize'] = iTotalSize
            meta['status'] = 1

            try:
                cDb().update_download(meta)
                self.RefreshDownloadList()
            except:
                pass
Esempio n. 35
0
    def AddDownload(self, meta):

        sTitle = meta['title']
        sUrl = meta['url']

        oGui = cConfig()

        #titre fichier
        sTitle = self.__createTitle(sUrl, sTitle)
        sTitle = self.__createDownloadFilename(sTitle)
        sTitle = oGui.showKeyBoard(sTitle)

        if (sTitle != False and len(sTitle) > 0):

            #chemin de sauvegarde
            sPath2 = xbmc.translatePath(
                cConfig().getSetting('download_folder'))

            dialog = xbmcgui.Dialog()
            sPath = dialog.browse(3, 'Downloadfolder', 'files', '', False,
                                  False, sPath2)

            if (sPath != ''):
                cConfig().setSetting('download_folder', sPath)
                sDownloadPath = xbmc.translatePath(sPath + '%s' % (sTitle, ))

                if xbmcvfs.exists(sDownloadPath):
                    cConfig().showInfo('Nom deja utilise', sTitle)
                    return self.AddDownload(meta)
                else:
                    xbmcvfs.File(sDownloadPath, 'w')

                try:
                    cConfig().log("Rajout en liste de telechargement " +
                                  str(sUrl))
                    meta['title'] = sTitle
                    meta['path'] = sDownloadPath

                    cDb().insert_download(meta)

                    return True

                except:
                    #print_exc()
                    cConfig().showInfo('Telechargement impossible', sTitle)
                    cConfig().log("Telechargement impossible")

        return False
    def getFav(self):
        oGui = cGui()

        oInputParameterHandler = cInputParameterHandler()

        #aParams = oInputParameterHandler.getAllParameter()

        if (oInputParameterHandler.exist('sCat')):
            sCat = oInputParameterHandler.getValue('sCat')
        else:
            sCat = '5'
        
        try:
            row = cDb().get_favorite()

            for data in row:

                title = data[1]
                siteurl = urllib.unquote_plus(data[2])
                site = data[3]
                function = data[4]
                cat = data[5]
                thumbnail = data[6]
                fanart = data[7]

                oOutputParameterHandler = cOutputParameterHandler()
                oOutputParameterHandler.addParameter('siteUrl', siteurl)
                oOutputParameterHandler.addParameter('sMovieTitle', title)
                oOutputParameterHandler.addParameter('sThumbnail', 'False')
                
                if (function == 'play'):
                    oHoster = cHosterGui().checkHoster(siteurl)
                    oOutputParameterHandler.addParameter('sHosterIdentifier', oHoster.getPluginIdentifier())
                    oOutputParameterHandler.addParameter('sFileName', oHoster.getFileName())
                    oOutputParameterHandler.addParameter('sMediaUrl', siteurl)

                if (cat == sCat):
                    oGuiElement = cGuiElement()
        
                    oGuiElement.setSiteName(site)
                    oGuiElement.setFunction(function)
                    oGuiElement.setTitle(title)
                    oGuiElement.setIcon("mark.png")
                    oGuiElement.setMeta(0)
                    oGuiElement.setThumbnail(thumbnail)
                    oGuiElement.setFanart(fanart)
                    
                    oGui.createContexMenuDelFav(oGuiElement, oOutputParameterHandler)
                    
                    if (function == 'play'):
                        oGui.addFolder(oGuiElement, oOutputParameterHandler, False)
                    else:
                        oGui.addFolder(oGuiElement, oOutputParameterHandler)
                        
                    #oGui.addFav(site, function, title, "mark.png", thumbnail, fanart, oOutputParameterHandler)
               
            
            oGui.setEndOfDirectory()
        except: pass
        return
Esempio n. 37
0
    def getWatched(self):
        meta = {}
        meta['title'] = urllib.quote_plus(self.getTitle())
        meta['site'] = self.getSiteUrl()

        data = cDb().get_watched(meta)
        return data
Esempio n. 38
0
    def delDownload(self):

        oInputParameterHandler = cInputParameterHandler()
        url = oInputParameterHandler.getValue('sUrl')
        meta = {}
        meta['url'] = url
        meta['path'] = ''

        try:
            cDb().del_download(meta)
            cConfig().showInfo('vStream', 'Liste mise a jour')
            cConfig().update()
        except:
            pass

        return
    def getFavourites(self):
        oGui = cGui()

        row = cDb().get_countfavorite()
        sTitle = '[COLOR khaki]Vous avez %s marque page[/COLOR]' % (str(row))
        oOutputParameterHandler = cOutputParameterHandler()
        oOutputParameterHandler.addParameter('siteUrl', 'http://')
        oGui.addText(SITE_IDENTIFIER, sTitle, oOutputParameterHandler)
        
        oOutputParameterHandler = cOutputParameterHandler()
        oOutputParameterHandler.addParameter('sCat', '1')
        oGui.addDir(SITE_IDENTIFIER, 'getFav', 'Films', 'mark.png', oOutputParameterHandler)
        
        oOutputParameterHandler = cOutputParameterHandler()
        oOutputParameterHandler.addParameter('sCat', '2')
        oGui.addDir(SITE_IDENTIFIER, 'getFav', 'Séries', 'mark.png', oOutputParameterHandler)

        # oOutputParameterHandler = cOutputParameterHandler()
        # oOutputParameterHandler.addParameter('sCat', '3')
        # oGui.addDir(SITE_IDENTIFIER, 'getFav()', 'Pages', 'news.png', oOutputParameterHandler)

        oOutputParameterHandler = cOutputParameterHandler()
        oOutputParameterHandler.addParameter('sCat', '4')
        oGui.addDir(SITE_IDENTIFIER, 'getFav', 'Sources', 'mark.png', oOutputParameterHandler)

        oOutputParameterHandler = cOutputParameterHandler()
        oOutputParameterHandler.addParameter('sCat', '5')
        oGui.addDir(SITE_IDENTIFIER, 'getFav', 'Divers', 'mark.png', oOutputParameterHandler)
        
        oOutputParameterHandler = cOutputParameterHandler()
        oOutputParameterHandler.addParameter('sCat', '6')
        oGui.addDir(SITE_IDENTIFIER, 'getFav', 'TV', 'mark.png', oOutputParameterHandler)
        
        oGui.setEndOfDirectory()
Esempio n. 40
0
    def getFavourites(self):
        oGui = cGui()

        row = cDb().get_countfavorite()
        sTitle = '[COLOR khaki]Vous avez %s marque page[/COLOR]' % (str(row))
        oOutputParameterHandler = cOutputParameterHandler()
        oOutputParameterHandler.addParameter('siteUrl', 'http://')
        oGui.addText(SITE_IDENTIFIER, sTitle, oOutputParameterHandler)
        
        oOutputParameterHandler = cOutputParameterHandler()
        oOutputParameterHandler.addParameter('sCat', '1')
        oGui.addDir(SITE_IDENTIFIER, 'getFav', 'Films', 'search.png', oOutputParameterHandler)
        
        oOutputParameterHandler = cOutputParameterHandler()
        oOutputParameterHandler.addParameter('sCat', '2')
        oGui.addDir(SITE_IDENTIFIER, 'getFav', 'Séries', 'tv.png', oOutputParameterHandler)

        # oOutputParameterHandler = cOutputParameterHandler()
        # oOutputParameterHandler.addParameter('sCat', '3')
        # oGui.addDir(SITE_IDENTIFIER, 'getFav()', 'Pages', 'news.png', oOutputParameterHandler)

        oOutputParameterHandler = cOutputParameterHandler()
        oOutputParameterHandler.addParameter('sCat', '4')
        oGui.addDir(SITE_IDENTIFIER, 'getFav', 'Sources', 'views.png', oOutputParameterHandler)

        oOutputParameterHandler = cOutputParameterHandler()
        oOutputParameterHandler.addParameter('sCat', '5')
        oGui.addDir(SITE_IDENTIFIER, 'getFav', 'Divers', 'views.png', oOutputParameterHandler)
        
        oOutputParameterHandler = cOutputParameterHandler()
        oOutputParameterHandler.addParameter('sCat', '6')
        oGui.addDir(SITE_IDENTIFIER, 'getFav', 'TV', 'views.png', oOutputParameterHandler)
        
        oGui.setEndOfDirectory()
Esempio n. 41
0
    def getFav(self):
        oGui = cGui()

        oInputParameterHandler = cInputParameterHandler()

        #aParams = oInputParameterHandler.getAllParameter()

        if (oInputParameterHandler.exist('sCat')):
            sCat = oInputParameterHandler.getValue('sCat')
        else:
            sCat = '5'
        
        try:
            row = cDb().get_favorite()

            for data in row:

                title = data[1]
                siteurl = urllib.unquote_plus(data[2])
                site = data[3]
                function = data[4]
                cat = data[5]
                thumbnail = data[6]
                fanart = data[7]

                oOutputParameterHandler = cOutputParameterHandler()
                oOutputParameterHandler.addParameter('siteUrl', siteurl)
                oOutputParameterHandler.addParameter('sMovieTitle', title)
                oOutputParameterHandler.addParameter('sThumbnail', 'False')
                
                if (function == 'play'):
                    oHoster = cHosterGui().checkHoster(siteurl)
                    oOutputParameterHandler.addParameter('sHosterIdentifier', oHoster.getPluginIdentifier())
                    oOutputParameterHandler.addParameter('sFileName', oHoster.getFileName())
                    oOutputParameterHandler.addParameter('sMediaUrl', siteurl)

                if (cat == sCat):
                    oGuiElement = cGuiElement()
        
                    oGuiElement.setSiteName(site)
                    oGuiElement.setFunction(function)
                    oGuiElement.setTitle(title)
                    oGuiElement.setIcon("mark.png")
                    oGuiElement.setMeta(0)
                    oGuiElement.setThumbnail(thumbnail)
                    oGuiElement.setFanart(fanart)
                    
                    oGui.createContexMenuDelFav(oGuiElement, oOutputParameterHandler)
                    
                    if (function == 'play'):
                        oGui.addFolder(oGuiElement, oOutputParameterHandler, False)
                    else:
                        oGui.addFolder(oGuiElement, oOutputParameterHandler)
                        
                    #oGui.addFav(site, function, title, "mark.png", thumbnail, fanart, oOutputParameterHandler)
               
            
            oGui.setEndOfDirectory()
        except: pass
        return
Esempio n. 42
0
    def getWatched(self):
        meta = {}
        meta['title'] = urllib.quote_plus(self.getTitle())
        meta['site'] = self.getSiteUrl()

        data = cDb().get_watched(meta)
        return data   
Esempio n. 43
0
    def AddtoDownloadList(self):

        oInputParameterHandler = cInputParameterHandler()
        sMediaUrl = oInputParameterHandler.getValue('sMediaUrl')
        sFileName = oInputParameterHandler.getValue('sFileName')
        # sHosterIdentifier = oInputParameterHandler.getValue('sHosterIdentifier')
        #bGetRedirectUrl = oInputParameterHandler.getValue('bGetRedirectUrl')

        #if (bGetRedirectUrl == 'True'):
        #    sMediaUrl = self.__getRedirectUrl(sMediaUrl)

        VSlog('Téléchargement ' + sMediaUrl)

        meta = {}
        meta['url'] = sMediaUrl
        meta['cat'] = oInputParameterHandler.getValue('sCat')
        meta['title'] = sFileName
        meta['icon'] = xbmc.getInfoLabel('ListItem.Art(thumb)')

        if (self.AddDownload(meta)):
            #telechargement direct ou pas?
            if not self.isDownloading():
                row = cDb().get_Download(meta)
                if row:
                    self.StartDownloadOneFile(row[0])

        return
Esempio n. 44
0
    def AddtoDownloadList(self):

        oInputParameterHandler = cInputParameterHandler()
        
        sHosterIdentifier = oInputParameterHandler.getValue('sHosterIdentifier')
        sMediaUrl = oInputParameterHandler.getValue('sMediaUrl')
        #bGetRedirectUrl = oInputParameterHandler.getValue('bGetRedirectUrl')
        sFileName = oInputParameterHandler.getValue('sFileName')

        #if (bGetRedirectUrl == 'True'):
        #    sMediaUrl = self.__getRedirectUrl(sMediaUrl)

        cConfig().log("Telechargement " + sMediaUrl)

        meta = {}
        meta['url'] = sMediaUrl
        meta['cat'] = oInputParameterHandler.getValue('sCat')
        meta['title'] = sFileName
        meta['icon'] = xbmc.getInfoLabel('ListItem.Art(thumb)')
    
        if (self.AddDownload(meta)):
            #telechargement direct ou pas ?
            if not self.isDownloading(): 
                row = cDb().get_Download(meta)
                if row:
                    self.StartDownloadOneFile(row[0])
            
        return
Esempio n. 45
0
    def setWatched(self):
        if True:
            # Use matrix database
            oInputParameterHandler = cInputParameterHandler()
            sSite = oInputParameterHandler.getValue('siteUrl')
            sTitle = oInputParameterHandler.getValue('sTitleWatched')
            if not sTitle:
                return

            meta = {}
            meta['title'] = sTitle
            meta['site'] = sSite

            db = cDb()
            row = db.get_watched(meta)
            if row:
                db.del_watched(meta)
                db.del_resume(meta)
            else:
                db.insert_watched(meta)
            # To test
            # xbmc.executebuiltin('Container.Refresh')

        else:
            # Use kodi buildin feature
            xbmc.executebuiltin('Action(ToggleWatched)')
Esempio n. 46
0
 def setFavorite(self):
     oInputParameterHandler = cInputParameterHandler()
     #aParams = oInputParameterHandler.getAllParameter()
     
     meta = {}
     meta['siteurl'] = oInputParameterHandler.getValue('siteUrl')
     meta['site'] = oInputParameterHandler.getValue('sId')
     meta['fav'] = oInputParameterHandler.getValue('sFav')
     meta['cat'] = oInputParameterHandler.getValue('sCat')
     
     meta['title'] = xbmc.getInfoLabel('ListItem.title')
     meta['icon'] = xbmc.getInfoLabel('ListItem.Art(thumb)')
     meta['fanart'] =  xbmc.getInfoLabel('ListItem.Art(fanart)')
     try:
         cDb().insert_favorite(meta)
     except:
         pass
Esempio n. 47
0
    def AddDownload(self,meta):
        
        sTitle = meta['title']
        sUrl = meta['url']
        
        oGui = cConfig()
        
        #titre fichier
        sTitle = self.__createTitle(sUrl, sTitle)
        sTitle = self.__createDownloadFilename(sTitle)
        sTitle = oGui.showKeyBoard(sTitle)
        
        if (sTitle != False and len(sTitle) > 0):

            #chemin de sauvegarde
            sPath2 = xbmc.translatePath(cConfig().getSetting('download_folder'))

            dialog = xbmcgui.Dialog()
            sPath = dialog.browse(3, 'Downloadfolder', 'files', '', False, False , sPath2)
            
            if (sPath != ''):
                cConfig().setSetting('download_folder',sPath)
                
                sDownloadPath = xbmc.translatePath(sPath +  '%s' % (sTitle, ))
                if xbmcvfs.exists(sDownloadPath):
                    cConfig().showInfo('Téléchargement en double', sTitle)
                    return self.AddDownload(meta)
                else:
                    xbmcvfs.File(sDownloadPath, 'w')

                try:
                    cConfig().log("Rajout en liste de telechargement " + str(sUrl))
                    meta['title'] = sTitle
                    meta['path'] = sDownloadPath
                    cDb().insert_download(meta)
                    
                    #telechargement direct ou pas ?
                    if not self.isDownloading(): 
                        row = cDb().get_Download(meta)
                        if row:
                            self.StartDownloadOneFile(row[0])
                except:
                    #print_exc()
                    cConfig().showInfo('Telechargement impossible', sTitle)
                    cConfig().log("Telechargement impossible")
                    pass
Esempio n. 48
0
    def DelFile(self):
        oInputParameterHandler = cInputParameterHandler()
        path = oInputParameterHandler.getValue('sPath')

        oDialog = self.DIALOG.VSyesno('Voulez vous vraiment supprimer ce fichier ? Operation non reversible.')
        if (oDialog == 1):
            meta = {}
            meta['url'] = ''
            meta['path'] = path

            try:
                cDb().del_download(meta)
                xbmcvfs.delete(path)
                self.DIALOG.VSinfo('Fichier supprimé')
                VSupdate()
            except:
                self.DIALOG.VSinfo('Erreur, fichier non supprimable')
Esempio n. 49
0
 def DelFile(self):
     oInputParameterHandler = cInputParameterHandler()
     path = oInputParameterHandler.getValue('sPath')
     
     oDialog = cConfig().createDialogYesNo('Voulez vous vraiment supprimer ce fichier ? Operation non reversible.')
     if (oDialog == 1):
         meta = {}
         meta['url'] = ''
         meta['path'] = path
         
         try:
             cDb().del_download(meta)
             xbmcvfs.delete(path)
             cConfig().showInfo('vStream', 'Fichier supprimé')
             cConfig().update()
         except:
             cConfig().showInfo('vStream', 'Erreur, fichier non supprimable')
Esempio n. 50
0
    def setWatched(self):
        oInputParameterHandler = cInputParameterHandler()
        
        #aParams = oInputParameterHandler.getAllParameter()
        sSite = oInputParameterHandler.getValue('siteUrl')
        sTitle = oInputParameterHandler.getValue('sTitle')

        meta = {}      
        meta['title'] = sTitle
        meta['site'] = sSite

        row = cDb().get_watched(meta)
        if row:
            cDb().del_watched(meta)
        else:
            cDb().insert_watched(meta)
        xbmc.executebuiltin( 'Container.Refresh' )
Esempio n. 51
0
    def setWatched(self):
        if (True):
            #Use database
            oInputParameterHandler = cInputParameterHandler()

            aParams = oInputParameterHandler.getAllParameter()

            sSite = oInputParameterHandler.getValue('siteUrl')
            sTitle = xbmc.getInfoLabel('ListItem.label')

            meta = {}
            meta['title'] = sTitle
            meta['site'] = sSite

            row = cDb().get_watched(meta)
            if row:
                cDb().del_watched(meta)
                cDb().del_resume(meta)
            else:
                cDb().insert_watched(meta)
                
            xbmc.executebuiltin( 'Action(ToggleWatched)' )
            
        else:
            # Use kodi buildin feature
            xbmc.executebuiltin( 'Action(ToggleWatched)' )
Esempio n. 52
0
    def GetNextFile(self):
        row = cDb().get_Download()

        for data in row:
            status = data[8]
            
            if status == '0':
                return data
                
        return None
Esempio n. 53
0
    def searchMovie(self):
        oGui = cGui()
        oInputParameterHandler = cInputParameterHandler()
        sSearchText = oInputParameterHandler.getValue('searchtext')
        sReadDB = oInputParameterHandler.getValue('readdb')
        sDisp = oInputParameterHandler.getValue('disp')

        oHandler = cRechercheHandler()
        oHandler.setText(sSearchText)
        oHandler.setDisp(sDisp)
        aPlugins = oHandler.getAvailablePlugins()
        
        if (sReadDB != 'False' and aPlugins == True):
            meta = {}      
            meta['title'] = oHandler.getText()
            meta['disp'] = oHandler.getDisp()
            cDb().insert_history(meta)

        oGui.setEndOfDirectory()
Esempio n. 54
0
    def AddDownload(self,meta):

        sTitle = meta['title']
        sUrl = meta['url']

        #titre fichier
        sTitle = self.__createTitle(sUrl, sTitle)
        sTitle = self.__createDownloadFilename(sTitle)
        sTitle =  cGui().showKeyBoard(sTitle)

        if (sTitle != False and len(sTitle) > 0):

            #chemin de sauvegarde
            sPath2 = xbmc.translatePath(self.ADDON.getSetting('download_folder'))

            dialog = xbmcgui.Dialog()
            sPath = dialog.browse(3, 'Downloadfolder', 'files', '', False, False , sPath2)

            if (sPath != ''):
                self.ADDON.setSetting('download_folder',sPath)
                sDownloadPath = xbmc.translatePath(sPath +  '%s' % (sTitle, ))

                if xbmcvfs.exists(sDownloadPath):
                    self.DIALOG.VSinfo('Nom deja utilise', sTitle)
                    return self.AddDownload(meta)
                else:
                    xbmcvfs.File(sDownloadPath, 'w')

                try:
                    VSlog("Rajout en liste de telechargement " + str(sUrl))
                    meta['title'] = sTitle
                    meta['path'] = sDownloadPath

                    cDb().insert_download(meta)

                    return True

                except:
                    #print_exc()
                    self.DIALOG.VSinfo('Telechargement impossible', sTitle)
                    VSlog("Telechargement impossible")

        return False
Esempio n. 55
0
    def showSearch(self):

        if (cConfig().getSetting("history-view") == 'true'):
            readdb = 'True'
        else:
            readdb = 'False'

        oGui = cGui()
        
        oOutputParameterHandler = cOutputParameterHandler()
        oOutputParameterHandler.addParameter('siteUrl', 'http://venom')
        oOutputParameterHandler.addParameter('disp', 'search1')
        oOutputParameterHandler.addParameter('readdb', readdb)
        oGui.addDir(SITE_IDENTIFIER, 'searchMovie', cConfig().getSetting('search1_label'), 'search.png', oOutputParameterHandler)

        oOutputParameterHandler = cOutputParameterHandler()
        oOutputParameterHandler.addParameter('siteUrl', 'http://venom')
        oOutputParameterHandler.addParameter('disp', 'search2')
        oOutputParameterHandler.addParameter('readdb', readdb)
        oGui.addDir(SITE_IDENTIFIER, 'searchMovie', cConfig().getSetting('search2_label'), 'search.png', oOutputParameterHandler)
        
        oOutputParameterHandler = cOutputParameterHandler()
        oOutputParameterHandler.addParameter('siteUrl', 'http://venom')
        oOutputParameterHandler.addParameter('disp', 'search3')
        oOutputParameterHandler.addParameter('readdb', readdb)
        oGui.addDir(SITE_IDENTIFIER, 'searchMovie', cConfig().getSetting('search3_label'), 'search.png', oOutputParameterHandler)
        
        oOutputParameterHandler = cOutputParameterHandler()
        oOutputParameterHandler.addParameter('siteUrl', 'http://venom')
        oOutputParameterHandler.addParameter('disp', 'search4')
        oOutputParameterHandler.addParameter('readdb', readdb)
        oGui.addDir(SITE_IDENTIFIER, 'searchMovie', cConfig().getSetting('search4_label'), 'search.png', oOutputParameterHandler)
        

        #history
        if (cConfig().getSetting("history-view") == 'true'):

            row = cDb().get_history()
            for match in row:
                
                oOutputParameterHandler = cOutputParameterHandler()
                oOutputParameterHandler.addParameter('siteUrl', 'http://venom')      
                oOutputParameterHandler.addParameter('searchtext', match[1])
                oOutputParameterHandler.addParameter('disp', match[2])
                oOutputParameterHandler.addParameter('readdb', 'False')
                oGui.addDir(SITE_IDENTIFIER, 'searchMovie', match[1], 'search.png', oOutputParameterHandler)
             
            if row:

                oOutputParameterHandler = cOutputParameterHandler()
                oOutputParameterHandler.addParameter('siteUrl', 'http://venom')
                oGui.addDir(SITE_IDENTIFIER, 'delSearch', '[COLOR red]Supprimer l\'historique[/COLOR]', 'search.png', oOutputParameterHandler)
                

        oGui.setEndOfDirectory()
Esempio n. 56
0
 def onPlayBackStarted(self):       
     meta = {}      
     meta['title'] = self.sTitle
     #meta['hoster'] = self.sHosterIdentifier
     meta['site'] = self.sSite
     try:
         data = cDb().get_resume(meta)
         if not data == '':
             seekTime = float(data[0][3])
             self.seekTime(seekTime)
     except:
         pass
Esempio n. 57
0
 def setFavorite(self):
     oInputParameterHandler = cInputParameterHandler()
     #xbmc.log(str(oInputParameterHandler.getAllParameter()))
     
     if int(oInputParameterHandler.getValue('sCat')) < 1:
         cConfig().showInfo('Error','Mise en Favoris non possible pour ce lien')
         return
     
     meta = {}
     meta['siteurl'] = oInputParameterHandler.getValue('siteUrl')
     meta['site'] = oInputParameterHandler.getValue('sId')
     meta['fav'] = oInputParameterHandler.getValue('sFav')
     meta['cat'] = oInputParameterHandler.getValue('sCat')
     
     meta['title'] = xbmc.getInfoLabel('ListItem.title')
     meta['icon'] = xbmc.getInfoLabel('ListItem.Art(thumb)')
     meta['fanart'] =  xbmc.getInfoLabel('ListItem.Art(fanart)')
     try:
         cDb().insert_favorite(meta)
     except:
         pass
Esempio n. 58
0
    def searchMovie(self):
        oGui = cGui()
        oInputParameterHandler = cInputParameterHandler()
        sSearchText = oInputParameterHandler.getValue("searchtext")
        sReadDB = oInputParameterHandler.getValue("readdb")
        sDisp = oInputParameterHandler.getValue("disp")

        oHandler = cRechercheHandler()
        aPlugins = oHandler.getAvailablePlugins(sDisp)
        if not sSearchText:
            sSearchText = oGui.showKeyBoard()
            sSearchText = urllib.quote(sSearchText)
        if sSearchText != False:
            if sReadDB != "False":
                meta = {}
                meta["title"] = sSearchText
                meta["disp"] = sDisp
                cDb().insert_history(meta)
            # print aPlugins
            for aPlugin in aPlugins:
                try:
                    oOutputParameterHandler = cOutputParameterHandler()
                    oOutputParameterHandler.addParameter("siteUrl", "http://venom")
                    oGui.addDir(
                        SITE_IDENTIFIER,
                        "showSearch",
                        "[COLOR olive]" + aPlugin[1] + "[/COLOR]",
                        "search.png",
                        oOutputParameterHandler,
                    )

                    exec "from resources.sites import " + aPlugin[1] + " as search"
                    sUrl = aPlugin[0] + sSearchText
                    searchUrl = "search.%s('%s')" % (aPlugin[2], sUrl)
                    exec searchUrl
                except:
                    pass
        else:
            return
        oGui.setEndOfDirectory()
Esempio n. 59
0
    def GetOnefile(self):
        oInputParameterHandler = cInputParameterHandler()
        url = oInputParameterHandler.getValue('sUrl')

        meta = {}      
        meta['url'] = url
    
        row = cDb().get_Download(meta)
        
        if not (row):
            return None
        
        return row[0]
Esempio n. 60
0
    def getFavourites(self):
        oGui = cGui()

        #Comptages des favoris
        row = cDb().get_favorite()

        compt = [0,0,0,0,0,0,0,0]
        for i in row:
            compt[int(i[5])] = compt[int(i[5])] + 1
        
        sTitle = '[COLOR khaki]Vous avez %s marque page[/COLOR]' % (len(row))
        oOutputParameterHandler = cOutputParameterHandler()
        oOutputParameterHandler.addParameter('siteUrl', 'http://')
        oGui.addText(SITE_IDENTIFIER, sTitle, oOutputParameterHandler)
        
        oOutputParameterHandler = cOutputParameterHandler()
        oOutputParameterHandler.addParameter('sCat', '1')
        oGui.addDir(SITE_IDENTIFIER, 'getFav', 'Films (' + str(compt[1]) + ')', 'mark.png', oOutputParameterHandler)
        
        oOutputParameterHandler = cOutputParameterHandler()
        oOutputParameterHandler.addParameter('sCat', '2')
        oGui.addDir(SITE_IDENTIFIER, 'getFav', 'Séries (' + str(compt[2]) + ')', 'mark.png', oOutputParameterHandler)

        # oOutputParameterHandler = cOutputParameterHandler()
        # oOutputParameterHandler.addParameter('sCat', '3')
        # oGui.addDir(SITE_IDENTIFIER, 'getFav()', 'Pages', 'news.png', oOutputParameterHandler)
        
        oOutputParameterHandler = cOutputParameterHandler()
        oOutputParameterHandler.addParameter('sCat', '6')
        oGui.addDir(SITE_IDENTIFIER, 'getFav', 'TV (' + str(compt[6]) + ')', 'mark.png', oOutputParameterHandler)
        
        oOutputParameterHandler = cOutputParameterHandler()
        oOutputParameterHandler.addParameter('sCat', '4')
        oGui.addDir(SITE_IDENTIFIER, 'getFav', 'Sources (' + str(compt[4]) + ')', 'mark.png', oOutputParameterHandler)
        
        oOutputParameterHandler = cOutputParameterHandler()
        oOutputParameterHandler.addParameter('sCat', '7')
        oGui.addDir(SITE_IDENTIFIER, 'getFav', 'Recherche Visuelle (' + str(compt[7]) + ')', 'mark.png', oOutputParameterHandler)
        
        oOutputParameterHandler = cOutputParameterHandler()
        oOutputParameterHandler.addParameter('sCat', '5')
        oGui.addDir(SITE_IDENTIFIER, 'getFav', 'Divers (' + str(compt[5]) + ')', 'mark.png', oOutputParameterHandler)
        
        #A virer dans les versions future, pour le moment c'est juste pr supprimer les liens bugges
        if compt[0] > 0:
            oOutputParameterHandler = cOutputParameterHandler()
            oOutputParameterHandler.addParameter('sCat', '0')
            oGui.addDir(SITE_IDENTIFIER, 'getFav', '[COLOR red]Erreur /!\ lien a supprimer !!! (' + str(compt[0]) + ')[/COLOR]', 'mark.png', oOutputParameterHandler)
        
        oGui.setEndOfDirectory()