From 821e44e130a48d69ad609f16cc066f76ee189888 Mon Sep 17 00:00:00 2001 From: Homer S Date: Wed, 30 Jun 2021 21:06:06 +0200 Subject: [PATCH] Added env variable FRITZ_VOICEBOX_PATH --- fritzab2matrix.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/fritzab2matrix.py b/fritzab2matrix.py index d133d1f..a7e660b 100755 --- a/fritzab2matrix.py +++ b/fritzab2matrix.py @@ -17,7 +17,12 @@ load_dotenv() env_user = os.environ.get('FRITZ_USERNAME') env_pass = os.environ.get('FRITZ_PASSWORD') env_ip = os.environ.get('FRITZ_IP') +env_voicebox = os.environ.get('FRITZ_VOICEBOX_PATH') env_tmp = os.environ.get('TEMP_DIR') + +if env_voicebox is None: + env_voicebox = "/fritz.nas/FRITZ/voicebox/" + if env_tmp is None: env_tmp = "/tmp" @@ -39,7 +44,8 @@ def main(): # Build the url to download the message via smb def build_download_url(mid, tam=0): - url = r"//" + env_ip + r"/fritz.nas/FRITZ/voicebox/rec/rec." + str(tam) + r"." + str(mid).zfill(3) + recording = "rec." + str(tam) + r"." + str(mid).zfill(3) + url = os.path.join("//",env_ip,env_voicebox,"rec",recording) return url def download_speex_file(smb_url):