Example #1
0
 def downloadCustomModule(self):
     success = self.customModulesManager.downloadCustomModules()
     if success == True:
         # refresh container if SportsDevil is active
         currContainer = xbmcUtils.getContainerFolderPath()
         common.showNotification('SportsDevil', 'Download successful', 1000)
         if currContainer.startswith(self.base):
             xbmc.executebuiltin('Container.Refresh()')
         return True
     elif success == False:
         common.showNotification('SportsDevil', 'Download failed', 1000)
     return False
Example #2
0
 def downloadCustomModule(self):
     success = self.customModulesManager.downloadCustomModules()
     if success == True:            
         # refresh container if SportsDevil is active
         currContainer = xbmcUtils.getContainerFolderPath()
         common.showNotification('SportsDevil', 'Download successful', 1000)
         if currContainer.startswith(self.base):                
             xbmc.executebuiltin('Container.Refresh()')
         return True
     elif success == False:        
         common.showNotification('SportsDevil', 'Download failed', 1000)
     return False
Example #3
0
 def downloadCustomModule(self):
     success = self.customModulesManager.downloadCustomModules()
     if success == True:
         # refresh container if Dragon Streams is active
         currContainer = xbmcUtils.getContainerFolderPath()
         common.showNotification("Dragon Streams", "Download successful", 1000)
         if currContainer.startswith(self.base):
             xbmc.executebuiltin("Container.Refresh()")
         return True
     elif success == False:
         common.showNotification("Dragon Streams", "Download failed", 1000)
     return False
Example #4
0
    def update(self):
        def checkForUpdates():
            return None

        def doUpdates(typeName, updates):
            count = len(updates)

            head = "ViendoKodiStreaming Updates - %s" % typeName

            msg = common.translate(30277)
            if count == 1:
                msg = common.translate(30276)

            question = ("%s %s: " % (count, msg)) + ', '.join(
                map(lambda u: u.split('/')[-1], updates.keys())) + '\n'
            question += common.translate(30278)

            updates = updates.values()

            countFailed = 0

            dlg = DialogQuestion()
            dlg.head = head
            if dlg.ask(question):
                dlg = DialogProgress()
                firstline = common.translate(30279)
                dlg.create(head, firstline, " ")

                for i in range(0, count):
                    update = updates[i]
                    percent = int((i + 1.0) * 100 / count)
                    dlg.update(percent, firstline, update.name)
                    if not update.do():
                        countFailed += 1

                msg = " "
                if countFailed > 0:
                    msg = "%s %s" % (countFailed, common.translate(30280))

                dlg.update(100, msg, " ")
                xbmc.sleep(500)
                dlg.close()

        allupdates = checkForUpdates()
        count = len(allupdates)
        if count == 0:
            common.showNotification('ViendoKodiStreaming',
                                    common.translate(30273))
            return
        else:
            for key, value in allupdates.items():
                doUpdates(key, value)
Example #5
0
 def update(self):
     
     def checkForUpdates():
         return None
     
     def doUpdates(typeName, updates):
         count = len(updates)
         
         head = "SportsDevil Updates - %s" % typeName
         
         msg = common.translate(30277)
         if count == 1:
             msg = common.translate(30276)
             
         question = ("%s %s: " % (count, msg)) + ', '.join(map(lambda u: u.split('/')[-1], updates.keys())) + '\n'
         question += common.translate(30278)
         
         updates = updates.values()
         
         countFailed = 0
 
         dlg = DialogQuestion()
         dlg.head = head
         if dlg.ask(question):
             dlg = DialogProgress()
             firstline = common.translate(30279)
             dlg.create(head, firstline, " ")
        
             for i in range(0, count):
                 update = updates[i]
                 percent = int((i+1.0)*100/count)
                 dlg.update(percent, firstline, update.name)
                 if not update.do():
                     countFailed += 1
             
             msg = " "
             if countFailed > 0:
                 msg = "%s %s" % (countFailed, common.translate(30280))
                 
             dlg.update(100, msg, " ")
             xbmc.sleep(500)
             dlg.close()
         
     allupdates = checkForUpdates()
     count = len(allupdates)
     if count == 0:
         common.showNotification('SportsDevil', common.translate(30273))
         return
     else:
         for key, value in allupdates.items():
             doUpdates(key, value)
Example #6
0
 def checkForUpdates():
     updates = {}          
     common.showNotification('SportsDevil', common.translate(30275))
     xbmcUtils.showBusyAnimation()
          
     catchersUpdates = self.syncManager.getUpdates(SyncSourceType.CATCHERS, common.Paths.catchersDir)
     if len(catchersUpdates) > 0:
         updates["Catchers"] = catchersUpdates    
     modulesUpdates = self.syncManager.getUpdates(SyncSourceType.MODULES, common.Paths.modulesDir)
     if len(modulesUpdates) > 0:
         updates["Modules"] = modulesUpdates
     
     xbmcUtils.hideBusyAnimation()
     return updates
Example #7
0
 def checkForUpdates():
     updates = {}          
     common.showNotification('PGLiveTV', common.translate(30275))
     xbmcUtils.showBusyAnimation()
          
     catchersUpdates = self.syncManager.getUpdates(SyncSourceType.CATCHERS, common.Paths.catchersDir)
     if len(catchersUpdates) > 0:
         updates["Catchers"] = catchersUpdates    
     modulesUpdates = self.syncManager.getUpdates(SyncSourceType.MODULES, common.Paths.modulesDir)
     if len(modulesUpdates) > 0:
         updates["Modules"] = modulesUpdates
     
     xbmcUtils.hideBusyAnimation()
     return updates
Example #8
0
def _install_addon(url):
    ri = AddonInstaller()
    compressed = ri.download(url)
    if compressed:
        addonId = ri.install(compressed)
        if addonId:
            xbmc.sleep(100)
            xbmc.executebuiltin('UpdateLocalAddons')
            xbmc.sleep(100)
            try:
                _N_ = xbmcaddon.Addon(id=addonId)
                common.showNotification(_N_.getAddonInfo("name"), 'Addon installed', 2000, _N_.getAddonInfo("icon"))
                return True
            except:
                pass
    return False
Example #9
0
    def update(self):               
        common.showNotification('SportsDevil', common.translate(30275))
        xbmcUtils.showBusyAnimation()
        updates = self.syncManager.getUpdates(SyncSourceType.CATCHERS, common.Paths.catchersDir)
        xbmcUtils.hideBusyAnimation()
        count = len(updates)
        
        if count == 0:
            common.showNotification('SportsDevil', common.translate(30273))
            return
        
        head = "SportsDevil Updates"
        
        msg = common.translate(30277)
        if count == 1:
            msg = common.translate(30276)
            
        question = ("%s %s: " % (count, msg)) + ', '.join(updates.keys()) + '\n'
        question += common.translate(30278)
        
        updates = updates.values()
        
        countFailed = 0

        dlg = DialogQuestion()
        dlg.head = head
        if dlg.ask(question):
            dlg = DialogProgress()
            firstline = common.translate(30279)
            dlg.create(head, firstline, " ")
       
            for i in range(0, count):
                update = updates[i]
                percent = int((i+1.0)*100/count)
                dlg.update(percent, firstline, update.name)
                if not update.do():
                    countFailed += 1
            
            msg = " "
            if countFailed > 0:
                msg = "%s %s" % (countFailed, common.translate(30280))
                
            dlg.update(100, msg, " ")
            xbmc.sleep(500)
            dlg.close()
Example #10
0
 def update(self):
     
     def checkForUpdates():
         updates = {}          
         common.showNotification('SportsDevil', common.translate(30275))
         xbmcUtils.showBusyAnimation()
              
         catchersUpdates = self.syncManager.getUpdates(SyncSourceType.CATCHERS, common.Paths.catchersDir)
         if len(catchersUpdates) > 0:
             updates["Catchers"] = catchersUpdates    
         modulesUpdates = self.syncManager.getUpdates(SyncSourceType.MODULES, common.Paths.modulesDir)
         if len(modulesUpdates) > 0:
             updates["Modules"] = modulesUpdates
         
         xbmcUtils.hideBusyAnimation()
         return updates
     
     def doUpdates(typeName, updates):
         count = len(updates)
         
         head = "SportsDevil Updates - %s" % typeName
         
         msg = common.translate(30277)
         if count == 1:
             msg = common.translate(30276)
             
         question = ("%s %s: " % (count, msg)) + ', '.join(map(lambda u: u.split('/')[-1], updates.keys())) + '\n'
         question += common.translate(30278)
         
         updates = updates.values()
         
         countFailed = 0
 
         dlg = DialogQuestion()
         dlg.head = head
         if dlg.ask(question):
             dlg = DialogProgress()
             firstline = common.translate(30279)
             dlg.create(head, firstline, " ")
        
             for i in range(0, count):
                 update = updates[i]
                 percent = int((i+1.0)*100/count)
                 dlg.update(percent, firstline, update.name)
                 if not update.do():
                     countFailed += 1
             
             msg = " "
             if countFailed > 0:
                 msg = "%s %s" % (countFailed, common.translate(30280))
                 
             dlg.update(100, msg, " ")
             xbmc.sleep(500)
             dlg.close()
         
     allupdates = checkForUpdates()
     count = len(allupdates)
     if count == 0:
         common.showNotification('SportsDevil', common.translate(30273))
         return
     else:
         for key, value in allupdates.items():
             doUpdates(key, value)
 def downloadWithJDownloader(self, url, title):
     common.runPlugin(
         'plugin://plugin.program.jdownloader/?action=addlink&url=' + url)
     common.showNotification('Sent to JDownloader:')
Example #12
0
    def update(self):
        def checkForUpdates():
            updates = {}
            common.showNotification('SportsDevil', common.translate(30275))
            xbmcUtils.showBusyAnimation()

            catchersUpdates = self.syncManager.getUpdates(
                SyncSourceType.CATCHERS, common.Paths.catchersDir)
            if len(catchersUpdates) > 0:
                updates["Catchers"] = catchersUpdates
            modulesUpdates = self.syncManager.getUpdates(
                SyncSourceType.MODULES, common.Paths.modulesDir)
            if len(modulesUpdates) > 0:
                updates["Modules"] = modulesUpdates

            xbmcUtils.hideBusyAnimation()
            return updates

        def doUpdates(typeName, updates):
            count = len(updates)

            head = "SportsDevil Updates - %s" % typeName

            msg = common.translate(30277)
            if count == 1:
                msg = common.translate(30276)

            question = ("%s %s: " % (count, msg)) + ', '.join(
                map(lambda u: u.split('/')[-1], updates.keys())) + '\n'
            question += common.translate(30278)

            updates = updates.values()

            countFailed = 0

            dlg = DialogQuestion()
            dlg.head = head
            if dlg.ask(question):
                dlg = DialogProgress()
                firstline = common.translate(30279)
                dlg.create(head, firstline, " ")

                for i in range(0, count):
                    update = updates[i]
                    percent = int((i + 1.0) * 100 / count)
                    dlg.update(percent, firstline, update.name)
                    if not update.do():
                        countFailed += 1

                msg = " "
                if countFailed > 0:
                    msg = "%s %s" % (countFailed, common.translate(30280))

                dlg.update(100, msg, " ")
                xbmc.sleep(500)
                dlg.close()

        allupdates = checkForUpdates()
        count = len(allupdates)
        if count == 0:
            common.showNotification('SportsDevil', common.translate(30273))
            return
        else:
            for key, value in allupdates.items():
                doUpdates(key, value)
Example #13
0
 def downloadWithJDownloader(self, url, title):
     common.runPlugin('plugin://plugin.program.jdownloader/?action=addlink&url=' + url)
     common.showNotification('Sent to JDownloader:')