diff --git a/.vscode/launch.json b/.vscode/launch.json index d0afa1ef..c4f10de0 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -14,6 +14,8 @@ "-emp", "-e2dsa", "-e2ts", + "-mtp", + ".bpm=f,bin/mtag/audio-bpm.py", "-a", "ed:wark", "-v", diff --git a/.vscode/launch.py b/.vscode/launch.py new file mode 100644 index 00000000..8bbc7d59 --- /dev/null +++ b/.vscode/launch.py @@ -0,0 +1,26 @@ +# takes arguments from launch.json +# is used by no_dbg in tasks.json +# launches 10x faster than mspython debugpy +# and is stoppable with ^C + +import os +import sys + +sys.path.insert(0, os.getcwd()) + +import jstyleson +from copyparty.__main__ import main as copyparty + +with open(".vscode/launch.json", "r") as f: + tj = f.read() + +oj = jstyleson.loads(tj) +argv = oj["configurations"][0]["args"] +try: + copyparty(argv) +except SystemExit as ex: + if ex.code: + raise + +print("\n\033[32mokke\033[0m") +sys.exit(1) diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 03b7d60e..9cbbeef5 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -9,9 +9,7 @@ { "label": "no_dbg", "type": "shell", - "command": "${config:python.pythonPath} -m copyparty -ed -emp -e2dsa -e2ts -a ed:wark -v srv::r:aed:cnodupe -v dist:dist:r ;exit 1" - // -v ~/Music/mt:mt:r:cmtp=.bpm=~/dev/copyparty/bin/mtag/audio-bpm.py:cmtp=key=~/dev/copyparty/bin/mtag/audio-key.py:ce2tsr - // -v ~/Music/mt:mt:r:cmtp=.bpm=~/dev/copyparty/bin/mtag/audio-bpm.py:ce2tsr + "command": "${config:python.pythonPath} .vscode/launch.py" } ] } \ No newline at end of file