Multiple fixes
- Fixed pwa location in manifest.json - made database generator check the .env for location rather than runtime attribute - fixed dark mode preference based on cookie/browser preference - changed to socketio.sleep for compatibility
This commit is contained in:
parent
419eed375c
commit
f95ecc78d4
4 changed files with 13 additions and 10 deletions
|
|
@ -11,18 +11,18 @@ parser=argparse.ArgumentParser(description="Options for the generation of the so
|
|||
# parser.add_argument('-k','--apikey', help='String: LastFM api key', default="")
|
||||
parser.add_argument('-m', '--mode', help='new/update: Remake database or update current', default= "update")
|
||||
parser.add_argument('-a', '--art', help="True/False: Add art to the database using LastFm (takes minimum 0.25s per song)", default="True")
|
||||
parser.add_argument('-d','--directory',help="Directory of the song files", default="./sound/")
|
||||
# parser.add_argument('-d','--directory',help="Directory of the song files", default="./sound/")
|
||||
args = parser.parse_args()
|
||||
dotenv.load_dotenv()
|
||||
apikeylastfm = os.getenv("API_KEY")
|
||||
soundLocation = os.getenv("DIRECTORY")
|
||||
# apikeylastfm = args.apikey
|
||||
if args.directory[-1] == "/" or args.directory[-1] == "\\":
|
||||
soundLocation = args.directory
|
||||
elif "/" in args.directory:
|
||||
soundLocation = args.directory + "/"
|
||||
if soundLocation[-1] == "/" or soundLocation[-1] == "\\":
|
||||
soundLocation = soundLocation
|
||||
elif "/" in soundLocation:
|
||||
soundLocation = soundLocation + "/"
|
||||
else:
|
||||
soundLocation = args.directory + "\\"
|
||||
soundLocation = soundLocation + "\\"
|
||||
|
||||
songFiles = os.listdir(soundLocation)
|
||||
fileOfDB = sql.connect("songDatabase.db")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue