summaryrefslogtreecommitdiffstats
path: root/packages/meshbay-node/src
diff options
context:
space:
mode:
Diffstat (limited to 'packages/meshbay-node/src')
-rw-r--r--packages/meshbay-node/src/meshbay_node/indexer/enrich_audio.py15
1 files changed, 7 insertions, 8 deletions
diff --git a/packages/meshbay-node/src/meshbay_node/indexer/enrich_audio.py b/packages/meshbay-node/src/meshbay_node/indexer/enrich_audio.py
index 9ecf1b9..5225d4f 100644
--- a/packages/meshbay-node/src/meshbay_node/indexer/enrich_audio.py
+++ b/packages/meshbay-node/src/meshbay_node/indexer/enrich_audio.py
@@ -198,8 +198,8 @@ def _read_tags_and_cover(path: Path) -> tuple[dict, float | None, bytes | None]:
# A folder name used as a last-resort artist/album, cleaned of the
# punctuation-as-separator and release-tag noise this era of rip is full of
-# ("L_Oeuf_Raide_-_Berlin_Eggsile", "Sinsemilia - Premiere Recolte [MP3
-# 320kbps Album]"). Same spirit as title_parse.naive_title for video, kept
+# (underscores standing in for spaces, a bitrate/quality tag still attached
+# to the name). Same spirit as title_parse.naive_title for video, kept
# separate because the junk vocabulary differs (bitrates and rip tags, not
# edition/language tags).
# A whole bracketed/parenthesized group is dropped if it contains any rip-tag
@@ -228,12 +228,11 @@ def _split_top_level_folder(name: str) -> tuple[str, str | None]:
directly under the group's root (§ below) — there is no further
ancestor to call "artist" without leaving the root entirely. The common
convention for a single-release folder at that level is
- "Artist - Album ...junk..." ("GHOST DOG - Soundtrack",
- "cypress_hill_-los_grandes__xitos_en_espa_ol"); split on the first
- " - " when the cleaned name has one. Otherwise the whole (cleaned) name
- becomes the artist alone, which is the *more* common real shape here —
- a flat per-artist folder with no album subfolder at all ("Ben Harper",
- "bob_marley", "Renaud").
+ "Artist - Album ...junk..." (e.g. a soundtrack folder named after the
+ film, or a release folder with the ripper's tags still attached); split
+ on the first " - " when the cleaned name has one. Otherwise the whole
+ (cleaned) name becomes the artist alone, which is the *more* common real
+ shape here — a flat per-artist folder with no album subfolder at all.
"""
cleaned = _clean_folder_name(name)
m = re.match(r"^(.{2,60}?)\s*-\s*(.{2,80})$", cleaned)