def send(self, *args, **kwargs): if self.dialog.get("summary") == "" or self.dialog.get( "description") == "" or self.dialog.get( "first_name") == "" or self.dialog.get("last_name") == "": self.dialog.no_filled() return if self.dialog.get("agree") == False: self.dialog.no_checkbox() return title = self.dialog.get("summary") body = self.dialog.get("description") issue_type = "issue" # for now just have issue app_type = storage.app_type app_version = application.version reporter_name = "{first_name} {last_name}".format( first_name=self.dialog.get("first_name"), last_name=self.dialog.get("last_name")) reporter_contact_type = "email" # For now just email is supported in the issue reporter reporter_contact_handle = self.dialog.get("email") operating_system = platform.platform() json = dict(title=title, issue_type=issue_type, body=body, operating_system=operating_system, app_type=app_type, app_version=app_version, reporter_name=reporter_name, reporter_contact_handle=reporter_contact_handle, reporter_contact_type=reporter_contact_type) auth = HTTPBasicAuth(application.bts_name, application.bts_access_token) url = "{bts_url}/issue/new".format(bts_url=application.bts_url) call_threaded(self.do_report, url, json=json, auth=auth) self.dialog.show_progress() self.dialog.EndModal(wx.ID_OK)
def on_search(self, *args, **kwargs): text = self.window.get_text() if text == "": return extractor = self.window.extractor.GetValue() self.change_status(_(u"Searching {0}... ").format(text)) utils.call_threaded(self.search, text=text, extractor=extractor)
def on_download(self, *args, **kwargs): item = self.results[self.window.get_item()] log.debug("Starting requested download: {0} (using extractor: {1})".format(item.title, self.extractor.name)) f = "{0}.mp3".format(item.format_track()) if item.download_url == "": item.get_download_url() path = self.window.get_destination_path(f) if path != None: log.debug("User has requested the following path: {0}".format(path,)) if self.extractor.needs_transcode == True: # Send download to vlc based transcoder utils.call_threaded(player.player.transcode_audio, item, path) else: log.debug("downloading %s URL to %s filename" % (item.download_url, path,)) utils.call_threaded(utils.download_file, item.download_url, path)
def on_download(self, *args, **kwargs): item = self.results[self.window.get_item()] if item.download_url == "": item.get_download_url() log.debug("Starting requested download: {0} (using extractor: {1})".format(item.title, self.extractor.name)) f = "{item_name}.{item_extension}".format(item_name=item.format_track(), item_extension=item.extractor.get_file_format()) path = self.window.get_destination_path(utils.safe_filename(f)) if path != None: log.debug("User has requested the following path: {0}".format(path,)) if self.extractor.transcoder_enabled() == True: # Send download to vlc based transcoder utils.call_threaded(player.player.transcode_audio, item, path, _format=item.extractor.get_file_format(), metadata=item.get_metadata()) else: log.debug("downloading %s URL to %s filename" % (item.download_url, path,)) utils.call_threaded(utils.download_file, item.download_url, path, metadata=item.get_metadata())
def on_play(self, *args, **kwargs): items = self.results[::] playing_item = self.window.get_item() self.window.play.SetLabel(_(u"Pause")) return utils.call_threaded( player.player.play_all, items, playing=playing_item, shuffle=self.window.player_shuffle.IsChecked())
def __init__(self): super(Controller, self).__init__() log.debug("Starting main controller...") # Setting up the player object player.setup() # Get main window self.window = mainWindow.mainWindow(extractors=[i.interface.name for i in get_services()]) log.debug("Main window created") self.window.change_status(_(u"Ready")) # Here we will save results for searches as song objects. self.results = [] self.connect_events() self.timer = wx.Timer(self.window) self.window.Bind(wx.EVT_TIMER, self.on_timer, self.timer) self.timer.Start(75) self.window.vol_slider.SetValue(player.player.volume) # Shows window. utils.call_threaded(updater.do_update) log.debug("Music DL is ready") self.window.Show()
def __init__(self): super(Controller, self).__init__() log.debug("Starting main controller...") # Setting up the player object player.setup() # Get main window self.window = mainWindow.mainWindow() log.debug("Main window created") self.window.change_status(_(u"Ready")) # Here we will save results for searches as song objects. self.results = [] self.connect_events() self.timer = wx.Timer(self.window) self.window.Bind(wx.EVT_TIMER, self.on_timer, self.timer) self.timer.Start(75) self.window.vol_slider.SetValue(player.player.volume) # Shows window. utils.call_threaded(updater.do_update) log.debug("Music DL is ready") self.window.Show()
def on_download(self, *args, **kwargs): item = self.results[self.window.get_item()] log.debug( "Starting requested download: {0} (using extractor: {1})".format( item.title, self.extractor.name)) f = "{0}.mp3".format(item.format_track()) if item.download_url == "": item.get_download_url() path = self.window.get_destination_path(f) if path != None: log.debug("User has requested the following path: {0}".format( path, )) if self.extractor.needs_transcode == True: # Send download to vlc based transcoder utils.call_threaded(player.player.transcode_audio, item, path) else: log.debug("downloading %s URL to %s filename" % ( item.download_url, path, )) utils.call_threaded(utils.download_file, item.download_url, path)
def send(self, *args, **kwargs): if self.dialog.get("summary") == "" or self.dialog.get("description") == "" or self.dialog.get("first_name") == "" or self.dialog.get("last_name") == "": self.dialog.no_filled() return if self.dialog.get("agree") == False: self.dialog.no_checkbox() return title = self.dialog.get("summary") body = self.dialog.get("description") issue_type = "issue" # for now just have issue app_type = storage.app_type app_version = application.version reporter_name = "{first_name} {last_name}".format(first_name=self.dialog.get("first_name"), last_name=self.dialog.get("last_name")) reporter_contact_type = "email" # For now just email is supported in the issue reporter reporter_contact_handle = self.dialog.get("email") operating_system = platform.platform() json = dict(title=title, issue_type=issue_type, body=body, operating_system=operating_system, app_type=app_type, app_version=app_version, reporter_name=reporter_name, reporter_contact_handle=reporter_contact_handle, reporter_contact_type=reporter_contact_type) auth=HTTPBasicAuth(application.bts_name, application.bts_access_token) url = "{bts_url}/issue/{project_id}/new".format(bts_url=application.bts_url, project_id=application.bts_project_id) call_threaded(self.do_report, url, json=json, auth=auth) self.dialog.show_progress() self.dialog.EndModal(wx.ID_OK)
def on_search(self, *args, **kwargs): utils.call_threaded(self.search)
def on_previous(self, *args, **kwargs): return utils.call_threaded(player.player.previous)
def on_next(self, *args, **kwargs): return utils.call_threaded(player.player.next)
def on_play(self, *args, **kwargs): items = self.results[::] playing_item = self.window.get_item() self.window.play.SetLabel(_(u"Pause")) return utils.call_threaded(player.player.play_all, items, playing=playing_item, shuffle=self.window.player_shuffle.IsChecked())
def on_check_for_updates(self, *args, **kwargs): utils.call_threaded(updater.do_update)
def end_callback(self, event, *args, **kwargs): #https://github.com/ZeBobo5/Vlc.DotNet/issues/4 call_threaded(self.next)
def on_previous(self, *args, **kwargs): return utils.call_threaded(player.player.previous)
def end_callback(self, event, *args, **kwargs): #https://github.com/ZeBobo5/Vlc.DotNet/issues/4 call_threaded(self.next)
def on_search(self, *args, **kwargs): utils.call_threaded(self.search)
def on_check_for_updates(self, *args, **kwargs): utils.call_threaded(updater.do_update)
def on_next(self, *args, **kwargs): return utils.call_threaded(player.player.next)