From 580712acd11d5afdacd51c2e8d29313efc93d520 Mon Sep 17 00:00:00 2001 From: cooljqln Date: Fri, 24 Jan 2025 00:40:48 +0000 Subject: Resolve some issues with dangling index records (#193) - The tag parser's cache is now cleared between indexing runs, preventing stale data from being used - Multi-value tag fields (genres, all artists) are now properly ingested in the tag value cache - Cleaning up removed index records now properly handles the case where only a subset of the records for multi-value tags need to be deleted. - Synthesizing missing tag values is now done in the tag parser instead of TrackTags, which resolves some issues with multi-value tag callbacks from libtags not being handled properly These fixes seem to address all the issues with stale index records we were able to repro (including the issues in https://codeberg.org/cool-tech-zone/tangara-fw/issues/191), but if you've got any more cases with consistent repros then lmk! Co-authored-by: ailurux Reviewed-on: https://codeberg.org/cool-tech-zone/tangara-fw/pulls/193 --- src/tangara/database/track.hpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/tangara/database/track.hpp') diff --git a/src/tangara/database/track.hpp b/src/tangara/database/track.hpp index 71eb44ce..c7dff425 100644 --- a/src/tangara/database/track.hpp +++ b/src/tangara/database/track.hpp @@ -117,6 +117,7 @@ class TrackTags { auto allArtists() const -> std::span; auto allArtists(const std::string_view) -> void; + auto singleAllArtists(const std::string_view) -> void; auto album() const -> const std::optional&; auto album(std::string_view) -> void; @@ -144,8 +145,6 @@ class TrackTags { auto Hash() const -> uint64_t; private: - auto maybeSynthesizeAllArtists() -> void; - Container encoding_; std::optional title_; -- cgit v1.2.3