Update rotateMusic.py
This commit is contained in:
parent
40cb0c06c2
commit
3acee4a04b
|
@ -1,7 +1,7 @@
|
||||||
import os
|
import os
|
||||||
import random
|
import random
|
||||||
import shutil
|
import shutil
|
||||||
import sys
|
import argparse
|
||||||
|
|
||||||
|
|
||||||
def get_dir_size(path):
|
def get_dir_size(path):
|
||||||
|
@ -16,11 +16,14 @@ def get_dir_size(path):
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
if len(sys.argv) != 4:
|
parser = argparse.ArgumentParser()
|
||||||
return
|
parser.add_argument("--library")
|
||||||
library = sys.argv[1]
|
parser.add_argument("--playerStorage")
|
||||||
player = sys.argv[2]
|
parser.add_argument("--maxBytes")
|
||||||
amount = int(sys.argv[3])
|
args = parser.parse_args()
|
||||||
|
library = args["library"]
|
||||||
|
player = args["playerStorage"]
|
||||||
|
amount = int(args["maxBytes"])
|
||||||
libraryArtists = os.listdir(library)
|
libraryArtists = os.listdir(library)
|
||||||
playerArtists = os.listdir(player)
|
playerArtists = os.listdir(player)
|
||||||
librarySpace = {}
|
librarySpace = {}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user