Skip to content

Commit

Permalink
do not add - Other to virtual dirnames; add bootleg release type
Browse files Browse the repository at this point in the history
  • Loading branch information
azuline committed Oct 25, 2023
1 parent a2147cd commit 2f6983c
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions rose/cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ class StoredDataFile:
"djmix",
"mixtape",
"other",
"bootleg",
"unknown",
]

Expand Down Expand Up @@ -694,7 +695,7 @@ def _update_cache_for_releases_executor(
if release.year:
release_virtual_dirname += str(release.year) + ". "
release_virtual_dirname += release.title
if release.releasetype not in ["album", "unknown"] and not (
if release.releasetype not in ["album", "other", "unknown"] and not (
release.releasetype == "remix" and "remix" in release.title.lower()
):
release_virtual_dirname += " - " + RELEASE_TYPE_FORMATTER.get(
Expand Down Expand Up @@ -786,7 +787,13 @@ def _update_cache_for_releases_executor(
if t.track_number:
virtual_filename += f"{t.track_number:0>2}. "
virtual_filename += t.title or "Unknown Title"
if release.releasetype in ["compilation", "soundtrack", "remix", "djmix", "mixtape"]:
if release.releasetype in [
"compilation",
"soundtrack",
"remix",
"djmix",
"mixtape",
]:
virtual_filename += f" (by {t.formatted_artists})"
virtual_filename += t.source_path.suffix
virtual_filename = _sanitize_filename(virtual_filename)
Expand Down

0 comments on commit 2f6983c

Please sign in to comment.