[music] Add albums to tracks and utility to condense tracks

This commit is contained in:
2025-07-20 21:18:46 -04:00
parent 69401d11c8
commit e8e989bb63
6 changed files with 170 additions and 56 deletions

View File

@ -0,0 +1,19 @@
from django.core.management.base import BaseCommand
from vrobbler.apps.music.utils import condense_albums
class Command(BaseCommand):
def add_arguments(self, parser):
parser.add_argument(
"--commit",
action="store_true",
help="Commit changes",
)
def handle(self, *args, **options):
commit = False
if options["commit"]:
commit = True
print(f"Condensing albums")
album_count = condense_albums(commit)
print(f"Condensed {album_count} albums")