diff options
Diffstat (limited to 'packages/meshbay-node/src/meshbay_node/daemon.py')
| -rw-r--r-- | packages/meshbay-node/src/meshbay_node/daemon.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/packages/meshbay-node/src/meshbay_node/daemon.py b/packages/meshbay-node/src/meshbay_node/daemon.py index 913ad68..ae4e1f0 100644 --- a/packages/meshbay-node/src/meshbay_node/daemon.py +++ b/packages/meshbay-node/src/meshbay_node/daemon.py @@ -1168,11 +1168,18 @@ class NodeDaemon: if not file_path or not file_path.exists(): continue self._enriched_attempted.add(entry.id) + # The entry's own named root, so the ancestor walk + # (enrich_audio._artist_album_from_ancestors) can tell "a + # top-level folder under this root" from "one level deeper" — + # without this boundary it used to read the root's own + # directory name as an artist for every flat top-level folder. + split = indexer.roots.split(entry.path) + root_path = split[0].path if split else None async def on_done(file_id: str, fields: dict, _indexer=indexer) -> None: await self._on_enriched(_indexer, file_id, fields) - self._audio_enricher.spawn(entry, file_path, on_done) + self._audio_enricher.spawn(entry, file_path, on_done, root_path) async def _enrich_music_now(self, group_id: str) -> None: """ |