cool tech zone zone
DB indexing question - Printable Version

+- cool tech zone zone (https://forum.cooltech.zone)
+-- Forum: Tangara (https://forum.cooltech.zone/forumdisplay.php?fid=3)
+--- Forum: Firmware Development (https://forum.cooltech.zone/forumdisplay.php?fid=7)
+--- Thread: DB indexing question (/showthread.php?tid=196)



DB indexing question - helectrom - 2025-07-31

Hello folks,

I recently forked the Tangara code on codeberg to work on a couple things. Namely, I want to add a view on the device for Genres -> Artists -> Albums -> Songs. Looking at how the other similar views / DB navigation trees were setup, I assumed this would be pretty straightforward. However, my attempt has appeared to replicate instead the "Tracks by Genre" view! I tried a couple different ideas, but all produced the same behaviour.

I am not asking for you kind folks to debug the feature for me of course, but I am asking for where I should start looking in order to figure this out. There's a lot of code in this project! I wonder if there is a limit on navigation depth because of the way the DB is done? I am not sure...

The diff is here in case you are curious: https://codeberg.org/homoelectromagneticus/tangara-fw/commit/32b631a6658dd29a6a029b0d5db76205686a60f8

Thanks all for your time!


RE: DB indexing question - jacqueline - 2025-08-01

Hi! At the moment the indexer works entirely on a track-by-track basis. We have no concept of a particular artist being associated with a genre, so if you're expecting to be able to navigate first to the 'rock' genre, then to a specific artist with rock songs, and then view complete albums associated with that artist (even if some of the tracks in that album don't have that genre) then this likely won't work as you expect.

I think it would be interesting to store additional metadata to allow this sort of use case (e.g. storing a list of genres that we've seen on each artist's tracks). However this would increase indexing time, which people already complain about, so we'd probably need to work out a faster way of doing at least incremental re-indexing first.