All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog.
- In sorter.py:
- In
Sorter.sort():album_dirwas renamed to a more accurateparent_dir. (The class methodSorter.move_track()similarly had its argumentalbumrenamed toparent.)- The initial assignment of
self.metadatais now enclosed intry: except TypeError:. I discovered that if all metadata is stripped from a track, its tag becomesNonerather than an emptydictand thus not subscriptable. The file is moved todest/no_tags. See Issue #3. - Tracks that lack both artist and album tags are also moved to
dest/no_tags. See Issue #3.
- In
- Issue #3: Tracks that are missing either all metadata or just both artist and album tags will be moved into a separate
- Issue #4: Total track count is kept during sorting and checked at the end to ensure it matches the pre-sort count.
- In sorter.py:
- The
labelargument forsanitize()did not accurately appear to be optional (i.e. can beNone); as a result and linted withmypy,labelis now of typeOptional[str].- Because of this distinction of
labelbeing possibly empty, the argument order forsanitize()is nowcategory: str, label: Optional[str].
- Because of this distinction of
- The
try: except AttributeError:block might not be necessary now, sincemypyencourages a literalNonecheck at the beginning. - A new method-local variable
artistis used in place ofself.metadata['artist']inSorter.sort(), with anotherNonecheck to ensuremypydoesn't complain about mismatching types.- This allowed me to keep
Sorter.is_artist_orchestra()andSorter.substitute_suffixesrelatively unchanged.
- This allowed me to keep
- The
- The project has now been linted additionally by
mypyon top ofFlake8.
- In sorter.py:
- In
sanitize(),labelwas being incorrectly assignedconfig.CORR[category], when in factconfig.CORR[category][label]is the desired element. Sorter.handle_orchestra()is nowSorter.is_artist_orchestra()and correctly returns aboolas per typing.
- In
- Issue #1:
- If a track lacks an album tag, it will correctly be placed in the next possible tag: the artist tag (group artists).
- Suffixes like
', Jr.'can now coexist with a list of artists, as the comma is swapped with an underscore pre-split and swapped back post-split.
- Issue #2:
- Disc numbers will default to
1if they are somehow missing or zeroed. Users will be alerted to this change. - Missing track numbers can't be fixed, but the user will still be alerted.
- Disc numbers will default to
- Forget the CSV functionality. It only hindered moving over tracks accurately. I thought they could be used as a sort of failsafe, but they actually increased complexity. Everything anyone needs to move files is already present within the ID3 metadata of each MP3 file. Some of the data is absent for some reason (including artists) but overall the effort is tremendously effective.
- Initial version