Import multiple tracks from command line

This commit is contained in:
Keith Edmunds 2021-08-21 18:14:47 +01:00
parent ccbe8fdb1b
commit 8fa85dd47f
2 changed files with 6 additions and 2 deletions

View File

@ -62,7 +62,9 @@ def create_track_from_file(session, path, verbose=False):
"""
if verbose:
INFO(f"Importing {path}...")
str = f"Importing {path}"
INFO(str)
INFO("-" * len(str))
track = Tracks.get_or_create(session, path)
if verbose:
INFO("Get track info...")

View File

@ -1,4 +1,6 @@
#!/bin/bash
# cd /home/kae/mm
# MYSQL_CONNECT="mysql+mysqldb://musicmuster:musicmuster@localhost/musicmuster_prod" ROOT="/home/kae/music" direnv exec .
app/songdb.py -i "$1"
for file in "$@"; do
app/songdb.py -i "$file"
done