From ed358ef024a469d3884d87f41789a15fbc60f375 Mon Sep 17 00:00:00 2001 From: Daniel Voogsgerd Date: Wed, 27 Mar 2019 16:33:15 +0100 Subject: [PATCH] feat(Spotify): Add argument parser --- resources/custom_modules/mediaplayer.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/resources/custom_modules/mediaplayer.py b/resources/custom_modules/mediaplayer.py index 64809a6..e19ce5b 100755 --- a/resources/custom_modules/mediaplayer.py +++ b/resources/custom_modules/mediaplayer.py @@ -1,4 +1,5 @@ #!/usr/bin/env python3 +import argparse import sys import signal import gi @@ -52,7 +53,14 @@ def signal_handler(sig, frame): sys.exit(0) +def parse_arguments(): + parser = argparse.ArgumentParser() + + return parser.parse_args() + + def main(): + arguments = parse_arguments() manager = Playerctl.PlayerManager() loop = GLib.MainLoop()