def directDownload(self): n = self.searchResults.Selection if self.search.get_views(n) is None: return url = self.search.get_url(self.searchResults.Selection) title = self.search.get_title(self.searchResults.Selection) dlg = DownloadProgress(self.Parent, title) direct_download(int(config_get('defaultformat')), url, dlg)
def onDownloadChannel(self, event): n = self.searchResults.Selection channel = self.search.get_channel(n) title = channel["name"] url = channel["url"] download_type = "channel" dlg = DownloadProgress(self.Parent, title) direct_download(int(config_get('defaultformat')), url, dlg, download_type)
def onDirect(self, event): dlg = DownloadProgress(self.Parent.Parent, self.title) direct_download(int(config_get('defaultformat')), self.url, dlg)
def onVideoDownload(self, event): dlg = DownloadProgress(self.Parent.Parent, self.title) direct_download(0, self.url, dlg)
def onVideoDownload(self, event): url = self.search.get_url(self.searchResults.Selection) title = self.search.get_title(self.searchResults.Selection) dlg = DownloadProgress(self.Parent, title) direct_download(0, url, dlg)
def onMp3Download(self, event): dlg = DownloadProgress(self.Parent.Parent) direct_download(2, self.url, dlg)
def onMp3Download(self, event): url = self.search.get_url(self.searchResults.Selection) title = self.search.get_title(self.searchResults.Selection) download_type = self.search.get_type(self.searchResults.Selection) dlg = DownloadProgress(self.Parent, title) direct_download(2, url, dlg, download_type)