[music] Add albums to tracks and utility to condense tracks
This commit is contained in:
@ -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")
|
||||
Reference in New Issue
Block a user