3 Commits

8 changed files with 4026 additions and 3506 deletions

View File

@@ -594,7 +594,7 @@ class documentBuffer(feedBuffer):
def download(self, *args, **kwargs):
post = self.get_post()
filename = post["title"]
filename = utils.safe_filename(post["title"])
# If document does not end in .extension we must fix it so the file dialog will save it properly later.
if filename.endswith(post["ext"]) == False:
filename = filename+ "."+post["ext"]

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -73,7 +73,7 @@ class displayAudioPresenter(base.basePresenter):
def get_suggested_filename(self, audio_index):
post = self.post[audio_index]
return "{0} - {1}.mp3".format(post["title"], post["artist"])
return utils.safe_filename("{0} - {1}.mp3".format(post["title"], post["artist"]))
def download(self, audio_index, path):
post = self.post[audio_index]

View File

@@ -90,4 +90,8 @@ def transform_audio_url(url):
url = url.replace("/"+parts[-2], "")
else:
url = url.replace("/"+parts[-3], "")
return url
return url
def safe_filename(filename):
allowed_symbols = ["_", ".", ",", "-", "(", ")"]
return "".join([c for c in filename if c.isalpha() or c.isdigit() or c==' ' or c in allowed_symbols]).rstrip()

View File

@@ -1,4 +1,4 @@
{"current_version": "0.22",
{"current_version": "0.23",
"description": ".",
"downloads":
{"Windows32": "https://code.manuelcortez.net/manuelcortez/socializer/-/jobs/artifacts/v0.22/raw/socializer.zip?job=stable"}}
{"Windows32": "https://code.manuelcortez.net/manuelcortez/socializer/-/jobs/artifacts/v0.23/raw/socializer.zip?job=stable"}}