Removed API Key for sndup. Closes #109

This commit is contained in:
Manuel Cortez 2017-01-29 17:59:57 -06:00
parent 023e0979c6
commit 4d82ecc8f2
3 changed files with 3 additions and 14 deletions

View File

@ -25,7 +25,6 @@ current_soundpack = string(default="default")
indicate_audio = boolean(default=True) indicate_audio = boolean(default=True)
indicate_geo = boolean(default=True) indicate_geo = boolean(default=True)
indicate_img = boolean(default=True) indicate_img = boolean(default=True)
sndup_api_key = string(default="")
[other_buffers] [other_buffers]
timelines = list(default=list()) timelines = list(default=list())

View File

@ -164,13 +164,7 @@ class accountSettingsController(globalSettingsController):
self.dialog.set_value("sound", "indicate_audio", self.config["sound"]["indicate_audio"]) self.dialog.set_value("sound", "indicate_audio", self.config["sound"]["indicate_audio"])
self.dialog.set_value("sound", "indicate_geo", self.config["sound"]["indicate_geo"]) self.dialog.set_value("sound", "indicate_geo", self.config["sound"]["indicate_geo"])
self.dialog.set_value("sound", "indicate_img", self.config["sound"]["indicate_img"]) self.dialog.set_value("sound", "indicate_img", self.config["sound"]["indicate_img"])
self.dialog.create_services() self.dialog.create_extras()
# if self.config["services"]["pocket_access_token"] == "":
# self.dialog.services.set_pocket(False)
# else:
# self.dialog.services.set_pocket(True)
# widgetUtils.connect_event(self.dialog.services.pocketBtn, widgetUtils.BUTTON_PRESSED, self.manage_pocket)
self.dialog.set_value("services", "apiKey", self.config["sound"]["sndup_api_key"])
self.dialog.realize() self.dialog.realize()
self.dialog.set_title(_(u"Account settings for %s") % (self.user,)) self.dialog.set_title(_(u"Account settings for %s") % (self.user,))
self.response = self.dialog.get_response() self.response = self.dialog.get_response()
@ -245,7 +239,7 @@ class accountSettingsController(globalSettingsController):
self.config["sound"]["indicate_img"] = self.dialog.get_value("sound", "indicate_img") self.config["sound"]["indicate_img"] = self.dialog.get_value("sound", "indicate_img")
self.buffer.session.sound.config = self.config["sound"] self.buffer.session.sound.config = self.config["sound"]
self.buffer.session.sound.check_soundpack() self.buffer.session.sound.check_soundpack()
self.config["sound"]["sndup_api_key"] = self.dialog.get_value("services", "apiKey")
self.config.write() self.config.write()
def toggle_state(self,*args,**kwargs): def toggle_state(self,*args,**kwargs):

View File

@ -52,11 +52,7 @@ class audioUploader(object):
self.uploaderDialog = wx_transfer_dialogs.UploadDialog(self.file) self.uploaderDialog = wx_transfer_dialogs.UploadDialog(self.file)
output.speak(_(u"Attaching...")) output.speak(_(u"Attaching..."))
if self.dialog.get("services") == "SNDUp": if self.dialog.get("services") == "SNDUp":
base_url = "http://sndup.net/post.php" url = "http://sndup.net/post.php"
if len(self.config["sound"]["sndup_api_key"]) > 0:
url = base_url + '?apikey=' + self.config['sound']['sndup_api_key']
else:
url = base_url
elif self.dialog.get("services") == "TwUp": elif self.dialog.get("services") == "TwUp":
url = "http://api.twup.me/post.json" url = "http://api.twup.me/post.json"
self.uploaderFunction = transfer.Upload(obj=self, field='file', url=url, filename=self.file, completed_callback=completed_callback) self.uploaderFunction = transfer.Upload(obj=self, field='file', url=url, filename=self.file, completed_callback=completed_callback)