sane-tag-music: remove special-casing for Singles
This commit is contained in:
@@ -311,24 +311,22 @@ class Tags:
|
||||
self.artist = self.albumartist
|
||||
|
||||
def rewrite_singles(self) -> None:
|
||||
""" idiom is for singles to belong to self-titled album. else each artist's singles get merged into one massive album """
|
||||
"""
|
||||
Singles shouldn't generally have a track number: delete it
|
||||
"""
|
||||
if len(self.album) != 1:
|
||||
return
|
||||
|
||||
for artist in self.albumartist[::-1] + self.artist[::-1]:
|
||||
if loose_compare_str(self.album[0], "Singles") or loose_compare_str(self.album[0], artist):
|
||||
self.album = [ artist ]
|
||||
if loose_compare_str(self.album[0], "Singles"):
|
||||
self.tracknumber = []
|
||||
|
||||
def to_path(self, ext: str) -> str | None:
|
||||
artist = self.albumartist or self.artist
|
||||
is_single = self.album in [self.albumartist, self.artist]
|
||||
# if not (artist and self.album and self.title and (self.tracknumber or is_single) and ext):
|
||||
if not (artist and self.album and self.title and ext):
|
||||
return None
|
||||
|
||||
artist = clean_fields_for_fs(artist, single_fields=False)
|
||||
album = "Singles" if is_single else clean_fields_for_fs(self.album)
|
||||
album = clean_fields_for_fs(self.album)
|
||||
trackno = self.tracknumber and clean_fields_for_fs(self.tracknumber)
|
||||
trackno = [f"{trackno:>02}"] if trackno else []
|
||||
title = clean_fields_for_fs(self.title)
|
||||
|
Reference in New Issue
Block a user