<feed xmlns='http://www.w3.org/2005/Atom'>
<title>tangara-fw/src/tangara/database/database.hpp, branch main</title>
<subtitle>Tangara firmware</subtitle>
<link rel='alternate' type='text/html' href='https://grim.freemyip.com/cgit/tangara-fw/'/>
<entry>
<title>Resolve some issues with dangling index records (#193)</title>
<updated>2025-01-24T00:40:48+00:00</updated>
<author>
<name>cooljqln</name>
<email>cooljqln@noreply.codeberg.org</email>
</author>
<published>2025-01-24T00:40:48+00:00</published>
<link rel='alternate' type='text/html' href='https://grim.freemyip.com/cgit/tangara-fw/commit/?id=580712acd11d5afdacd51c2e8d29313efc93d520'/>
<id>580712acd11d5afdacd51c2e8d29313efc93d520</id>
<content type='text'>
- 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 &lt;ailuruxx@gmail.com&gt;
Reviewed-on: https://codeberg.org/cool-tech-zone/tangara-fw/pulls/193
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- 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 &lt;ailuruxx@gmail.com&gt;
Reviewed-on: https://codeberg.org/cool-tech-zone/tangara-fw/pulls/193
</pre>
</div>
</content>
</entry>
<entry>
<title>Improvements to the queue for shuffling/playing all (#170)</title>
<updated>2025-01-07T00:00:00+00:00</updated>
<author>
<name>ailurux</name>
<email>ailuruxx@gmail.com</email>
</author>
<published>2025-01-07T00:00:00+00:00</published>
<link rel='alternate' type='text/html' href='https://grim.freemyip.com/cgit/tangara-fw/commit/?id=829d033a448107f1bc610cf735ce9f7222de564b'/>
<id>829d033a448107f1bc610cf735ce9f7222de564b</id>
<content type='text'>
Queue now has a separate 'ready' property to indicate it's ready to be used, which is independent from whether it's still loading tracks in. This also improves the response time for shuffling all tracks (we will initially pick a random track in the first 100 tracks whilst the rest of the tracks are loading). This should also fix issues where one song will start playing and then repeat itself when the queue finishes loading, and hopefully solve #160 as well (though I couldn't actually repro this myself).

Co-authored-by: jacqueline &lt;me@jacqueline.id.au&gt;
Reviewed-on: https://codeberg.org/cool-tech-zone/tangara-fw/pulls/170
Reviewed-by: cooljqln &lt;cooljqln@noreply.codeberg.org&gt;
Co-authored-by: ailurux &lt;ailuruxx@gmail.com&gt;
Co-committed-by: ailurux &lt;ailuruxx@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Queue now has a separate 'ready' property to indicate it's ready to be used, which is independent from whether it's still loading tracks in. This also improves the response time for shuffling all tracks (we will initially pick a random track in the first 100 tracks whilst the rest of the tracks are loading). This should also fix issues where one song will start playing and then repeat itself when the queue finishes loading, and hopefully solve #160 as well (though I couldn't actually repro this myself).

Co-authored-by: jacqueline &lt;me@jacqueline.id.au&gt;
Reviewed-on: https://codeberg.org/cool-tech-zone/tangara-fw/pulls/170
Reviewed-by: cooljqln &lt;cooljqln@noreply.codeberg.org&gt;
Co-authored-by: ailurux &lt;ailuruxx@gmail.com&gt;
Co-committed-by: ailurux &lt;ailuruxx@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Add a new track tag + index for multiple artists</title>
<updated>2024-12-30T03:59:54+00:00</updated>
<author>
<name>jacqueline</name>
<email>me@jacqueline.id.au</email>
</author>
<published>2024-12-23T05:08:47+00:00</published>
<link rel='alternate' type='text/html' href='https://grim.freemyip.com/cgit/tangara-fw/commit/?id=e9e608cfa09792a64fbda0946c92ec396622a088'/>
<id>e9e608cfa09792a64fbda0946c92ec396622a088</id>
<content type='text'>
We still mostly use the singular 'Artist' tag for e.g. displaying a nice
name in the now playing screen, but where a track has an 'ARTISTS=' tag,
we'll split by semicolon and then use the resulting list to populate an
index of tracks by artist
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We still mostly use the singular 'Artist' tag for e.g. displaying a nice
name in the now playing screen, but where a track has an 'ARTISTS=' tag,
we'll split by semicolon and then use the resulting list to populate an
index of tracks by artist
</pre>
</div>
</content>
</entry>
<entry>
<title>Introduce a MediaType for each track and index</title>
<updated>2024-09-19T06:32:11+00:00</updated>
<author>
<name>jacqueline</name>
<email>me@jacqueline.id.au</email>
</author>
<published>2024-09-18T03:07:42+00:00</published>
<link rel='alternate' type='text/html' href='https://grim.freemyip.com/cgit/tangara-fw/commit/?id=57af3e64c8d6b13ac03192d9a8429dc801558a6b'/>
<id>57af3e64c8d6b13ac03192d9a8429dc801558a6b</id>
<content type='text'>
Initially set based on filepath, or by genre if the filepath doesn't
match one of our presets
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Initially set based on filepath, or by genre if the filepath doesn't
match one of our presets
</pre>
</div>
</content>
</entry>
<entry>
<title>WIP: Add last_position field to track data and start on implementation</title>
<updated>2024-09-12T07:35:22+00:00</updated>
<author>
<name>ailurux</name>
<email>ailuruxx@gmail.com</email>
</author>
<published>2024-09-12T07:35:22+00:00</published>
<link rel='alternate' type='text/html' href='https://grim.freemyip.com/cgit/tangara-fw/commit/?id=43537798108ce240f1d1131db8611d0bf11a3e0c'/>
<id>43537798108ce240f1d1131db8611d0bf11a3e0c</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Use libogg + our own parser for ogg files</title>
<updated>2024-09-03T01:17:13+00:00</updated>
<author>
<name>jacqueline</name>
<email>me@jacqueline.id.au</email>
</author>
<published>2024-09-03T01:17:13+00:00</published>
<link rel='alternate' type='text/html' href='https://grim.freemyip.com/cgit/tangara-fw/commit/?id=e6921dc0556d567557b5673a475199121898421f'/>
<id>e6921dc0556d567557b5673a475199121898421f</id>
<content type='text'>
This is somewhat faster than relying on libtags to parse these, and also better handles cornercases such as tags that cross physical page boundaries.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is somewhat faster than relying on libtags to parse these, and also better handles cornercases such as tags that cross physical page boundaries.
</pre>
</div>
</content>
</entry>
<entry>
<title>Shard searching for new tracks across multiple tasks</title>
<updated>2024-08-12T03:20:08+00:00</updated>
<author>
<name>jacqueline</name>
<email>me@jacqueline.id.au</email>
</author>
<published>2024-08-09T01:43:48+00:00</published>
<link rel='alternate' type='text/html' href='https://grim.freemyip.com/cgit/tangara-fw/commit/?id=2ad83cb2108dc55c9eb0573b0645513a1e8a61f5'/>
<id>2ad83cb2108dc55c9eb0573b0645513a1e8a61f5</id>
<content type='text'>
This also has the effect of breaking up the enormous 'updateIndexes'
method into one call per file, which means database updates also no
longer monopolise a single background task for their entire duration.

avg. time per new file is now &lt;140ms for a completely fresh database,
which is pretty good i think!
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This also has the effect of breaking up the enormous 'updateIndexes'
method into one call per file, which means database updates also no
longer monopolise a single background task for their entire duration.

avg. time per new file is now &lt;140ms for a completely fresh database,
which is pretty good i think!
</pre>
</div>
</content>
</entry>
<entry>
<title>Make FileGatherer shaped more like a normal iterator</title>
<updated>2024-08-12T03:20:08+00:00</updated>
<author>
<name>jacqueline</name>
<email>me@jacqueline.id.au</email>
</author>
<published>2024-08-08T06:08:46+00:00</published>
<link rel='alternate' type='text/html' href='https://grim.freemyip.com/cgit/tangara-fw/commit/?id=28cf749951a8f811606bb233efecfd36738c3c89'/>
<id>28cf749951a8f811606bb233efecfd36738c3c89</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Batch up the db operations associated with adding new tracks</title>
<updated>2024-08-12T03:20:08+00:00</updated>
<author>
<name>jacqueline</name>
<email>me@jacqueline.id.au</email>
</author>
<published>2024-08-08T04:35:53+00:00</published>
<link rel='alternate' type='text/html' href='https://grim.freemyip.com/cgit/tangara-fw/commit/?id=30aaefca64445efa421edb93403036d59382920f'/>
<id>30aaefca64445efa421edb93403036d59382920f</id>
<content type='text'>
This is ostensibly yet another 'prepare for multithreaded updates'
commit, however it does actually save us another 60(!!) odd milliseconds
per track.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is ostensibly yet another 'prepare for multithreaded updates'
commit, however it does actually save us another 60(!!) odd milliseconds
per track.
</pre>
</div>
</content>
</entry>
<entry>
<title>Derive the next track id from stored track data, instead of tracking it explicitly</title>
<updated>2024-08-12T03:20:08+00:00</updated>
<author>
<name>jacqueline</name>
<email>me@jacqueline.id.au</email>
</author>
<published>2024-08-08T02:30:49+00:00</published>
<link rel='alternate' type='text/html' href='https://grim.freemyip.com/cgit/tangara-fw/commit/?id=b5dc53670a259c3fdf2d3f20f52880f2218221d7'/>
<id>b5dc53670a259c3fdf2d3f20f52880f2218221d7</id>
<content type='text'>
This saves about 1ms per new track right now, but more importantly means
that minting a new track id is now a single atomic operation, rather
than being its own database write. This is a useful property that will
come in handy in a few commits time.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This saves about 1ms per new track right now, but more importantly means
that minting a new track id is now a single atomic operation, rather
than being its own database write. This is a useful property that will
come in handy in a few commits time.
</pre>
</div>
</content>
</entry>
</feed>
