[notifications] Add a class for notifications
This commit is contained in:
18
vrobbler/apps/scrobbles/management/commands/dedup_tracks.py
Normal file
18
vrobbler/apps/scrobbles/management/commands/dedup_tracks.py
Normal file
@ -0,0 +1,18 @@
|
||||
from django.core.management.base import BaseCommand
|
||||
from vrobbler.apps.scrobbles.utils import deduplicate_tracks
|
||||
|
||||
|
||||
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
|
||||
dups = deduplicate_tracks(commit=commit)
|
||||
print(f"Deduplicated {dups} music tracks")
|
||||
Reference in New Issue
Block a user