fix: scorometer muscis folder and populate fix

This commit is contained in:
GitBluub
2023-05-30 01:16:35 +09:00
committed by Clément Le Bihan
parent 5c7648541f
commit 9fb165e4ff
3 changed files with 5 additions and 3 deletions

View File

@@ -48,8 +48,8 @@ def populateFile(path, midi, mxl):
print(f"Populating {metadata['Name']}")
res = requests.post(f"{url}/song", json={
"name": metadata["Name"],
"midiPath": f"/assets/musics/{midi}",
"musicXmlPath": f"/assets/musics/{mxl}",
"midiPath": f"/assets/{midi}",
"musicXmlPath": f"/assets/{mxl}",
"difficulties": difficulties,
"artist": artistId,
"album": getOrCreateAlbum(metadata["Album"], artistId),

View File

@@ -0,0 +1,2 @@
-- AlterTable
ALTER TABLE "Song" ADD COLUMN "illustrationPath" TEXT;

View File

@@ -27,7 +27,7 @@ logging.basicConfig(stream=sys.stderr, level=logging.DEBUG)
BACK_URL = os.environ.get("BACK_URL") or "http://back:3000"
MUSICS_FOLDER = os.environ.get("MUSICS_FOLDER") or "/musics/"
MUSICS_FOLDER = os.environ.get("MUSICS_FOLDER") or "/assets/musics/"
RATIO = float(sys.argv[2] if len(sys.argv) > 2 else 1)
OCTAVE = 5