[black] Reformat to use 88 line lengths
This commit is contained in:
@ -88,9 +88,7 @@ def condense_albums(commit: bool = False):
|
||||
track.albums.add(dup_track.album)
|
||||
|
||||
# Find out if this track appears more than once
|
||||
duplicates = Track.objects.filter(
|
||||
title=track.title, artist=track.artist
|
||||
)
|
||||
duplicates = Track.objects.filter(title=track.title, artist=track.artist)
|
||||
if duplicates.count() > 1:
|
||||
logger.info(f"Track appears more than once, condensing: {track}")
|
||||
|
||||
@ -98,9 +96,7 @@ def condense_albums(commit: bool = False):
|
||||
# Find all scrobbles
|
||||
duplicate_ids = duplicates.values_list("id", flat=True)
|
||||
scrobbles = Scrobble.objects.filter(track_id__in=duplicate_ids)
|
||||
logger.info(
|
||||
f"Found {scrobbles.count()} scrobbles to merge onto {track}"
|
||||
)
|
||||
logger.info(f"Found {scrobbles.count()} scrobbles to merge onto {track}")
|
||||
if commit:
|
||||
scrobbles.update(track=track)
|
||||
track.albums.add(*list(set(albums_to_add)))
|
||||
|
||||
Reference in New Issue
Block a user