diff --git a/.gitignore b/.gitignore index b2da24d..c148cce 100644 --- a/.gitignore +++ b/.gitignore @@ -130,3 +130,6 @@ node_modules/ back/.users user/.env +user/cmd +user/exemple.plist +user/test2.applescript diff --git a/README.md b/README.md index 77faf50..7d75540 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,11 @@ ![music player](Music-Player.gif) ![diagramme](Diagramme.drawio.png) +![test](Diagramme.drawio) + # To do : -- SHA-256 -- not playing state (js) \ No newline at end of file +- readme +- make script proper +- comment + +tail -f logfile.log \ No newline at end of file diff --git a/user/export.py b/user/export.py index 5b946e7..4b4cd7b 100644 --- a/user/export.py +++ b/user/export.py @@ -10,6 +10,7 @@ from dotenv import load_dotenv load_dotenv() USER = os.getenv("USER") PASSWORD = os.getenv("PASSWORD") +URL_API = os.getenv("URL_API") stdout_file = 'logfile.log' stderr_file = 'error_logfile.log' @@ -57,7 +58,7 @@ def post(currentsong): currentsong['password'] = PASSWORD data = json.dumps(currentsong) try: - r = requests.post(url+'/music/set', data=data, headers=headers) + r = requests.post(URL_API+'/music/set', data=data, headers=headers) if r.status_code != 200: return r.status_code else : @@ -65,10 +66,6 @@ def post(currentsong): except Exception as e: print(f"An error occurred: {str(e)}", file=sys.stderr) -url = "https://api.noh.am" #RUN WEB -url = "http://127.0.0.1:5000" #DEV -url = "http://0.0.0.0:3005" - headers = {'Content-Type': 'application/json'} def main():