def stopAllDownloads(self): yes = xbmcgui.Dialog().yesno( 'Cancel Downloads', 'Cancel current download and', 'all queued downloads?' ) if yes: servicecontrol.ServiceControl().stopAllDownloads()
def handleDownload(info, duration=None, bg=False, path=None): """ Download the selected video in vidinfo to a path the user chooses. Displays a progress dialog and ok/error message when finished. Set bg=True to download in the background. Returns a DownloadResult object for foreground transfers. """ info = _convertInfo(info) path = StreamUtils.getDownloadPath() if bg: servicecontrol.ServiceControl().download(info, path, duration) else: return _handleDownload(info, path, duration=duration, bg=False)
def isDownloading(): """ Returns true if background download service is handling downloads. """ return servicecontrol.ServiceControl().isDownloading()
def manageQueue(self): servicecontrol.ServiceControl().manageQueue()
def stopDownload(self): yes = xbmcgui.Dialog().yesno( 'Cancel Download', 'Cancel current download?') if yes: servicecontrol.ServiceControl().stopDownload()