Fix Single/Album Dedup flagging EP tracks as redundant singles
EPs are no longer classified as singles — removing EP tracks would break the release and conflict with album completeness checks. Only actual singles (album_type='single' or unknown type with <=2 tracks) are flagged as redundant when the same song exists on an album.
This commit is contained in:
parent
e1b203405f
commit
0dd0d50837
1 changed files with 5 additions and 5 deletions
|
|
@ -105,16 +105,16 @@ class SingleAlbumDedupJob(RepairJob):
|
||||||
'artist_thumb_url': artist_thumb or None,
|
'artist_thumb_url': artist_thumb or None,
|
||||||
}
|
}
|
||||||
|
|
||||||
# Classify: single = album_type 'single' or total_tracks <= 3
|
# Classify: only actual singles — EPs are intentional multi-track releases
|
||||||
# EPs (4-6 tracks) are borderline — only flag as "single" if explicitly typed
|
# that should stay complete (removing tracks would break the EP and
|
||||||
|
# conflict with album completeness checks)
|
||||||
is_single = (
|
is_single = (
|
||||||
entry['album_type'] == 'single' or
|
entry['album_type'] == 'single' or
|
||||||
(entry['album_type'] == 'ep' and entry['total_tracks'] <= 6) or
|
(entry['album_type'] not in ('album', 'compilation', 'ep') and entry['total_tracks'] <= 2)
|
||||||
(entry['album_type'] not in ('album', 'compilation') and entry['total_tracks'] <= 3)
|
|
||||||
)
|
)
|
||||||
if is_single:
|
if is_single:
|
||||||
singles.append(entry)
|
singles.append(entry)
|
||||||
elif entry['total_tracks'] > 3:
|
elif entry['total_tracks'] > 2:
|
||||||
album_tracks.append(entry)
|
album_tracks.append(entry)
|
||||||
|
|
||||||
logger.info("Single/Album dedup: %d singles/EPs, %d album tracks", len(singles), len(album_tracks))
|
logger.info("Single/Album dedup: %d singles/EPs, %d album tracks", len(singles), len(album_tracks))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue