diff --git a/happy_ripper.py b/happy_ripper.py index 302234b..cde97bb 100644 --- a/happy_ripper.py +++ b/happy_ripper.py @@ -17,9 +17,9 @@ from mutagen.mp3 import MP3 from mutagen.id3 import ID3, APIC from flask import Flask, render_template, request, jsonify -MUSIC_FOLDER = os.environ["HAPPY_RIPPER_MUSIC_DIR"] -ACCESS_URL = os.environ["HAPPY_RIPPER_ACCESS_URL"] -PORT = int(os.environ["HAPPY_RIPPER_MUSIC_PORT"]) +MUSIC_FOLDER = os.environ.get("HAPPY_RIPPER_MUSIC_DIR", "Music") +ACCESS_URL = os.environ.get("HAPPY_RIPPER_ACCESS_URL", "https://test.test.test") +PORT = int(os.environ.get("HAPPY_RIPPER_MUSIC_PORT", 5000)) @dataclass @@ -173,6 +173,9 @@ def find_release_info(url: str) -> ReleaseInfo: art_url = thumbnails[1]["url"] + if not is_album: + artist = "Various Artists" + return ReleaseInfo(artist, title, art_url, is_album, is_topic) diff --git a/templates/index.html b/templates/index.html index 5bdf49f..6ca544e 100644 --- a/templates/index.html +++ b/templates/index.html @@ -157,7 +157,7 @@ } finishTableBody.innerHTML = ""; - for (const q of statusJson.finishedQueue) { + for (const q of statusJson.finishedQueue.toReversed()) { finishTableBody.innerHTML += createFinishCard(q.artist, q.title, q.status, q.art_url, q.destinations); } }