From 424712a1bd04272ab2f7dcacc2eb2567cceaf3aa Mon Sep 17 00:00:00 2001 From: Aethor Date: Sun, 6 Jun 2021 00:44:09 +0200 Subject: [PATCH] pas si malin --- .gitignore | 3 ++- next_song.py | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) mode change 100644 => 100755 next_song.py diff --git a/.gitignore b/.gitignore index e4e5f6c..d684990 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -*~ \ No newline at end of file +*~ +state.json \ No newline at end of file diff --git a/next_song.py b/next_song.py old mode 100644 new mode 100755 index deea092..b9d5085 --- a/next_song.py +++ b/next_song.py @@ -23,3 +23,6 @@ if __name__ == "__main__": print(random.choice(glob.glob(f"{script_dir}/songs/*.ogg"))) else: exit(1) + + with open(f"{script_dir}/state.json", "w") as f: + json.dump(state, f, indent=4)