<feed xmlns='http://www.w3.org/2005/Atom'>
<title>WRMS/playlist.go, branch main</title>
<subtitle>Wireless Remote Media System</subtitle>
<link rel='alternate' type='text/html' href='https://git.muhq.space/WRMS/'/>
<entry>
<title>fix broken indices in songs after Playlist.OrderedList()</title>
<updated>2023-08-08T16:41:56+00:00</updated>
<author>
<name>Florian Fischer</name>
<email>florian.fischer@muhq.space</email>
</author>
<published>2023-08-08T16:41:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.muhq.space/WRMS/commit/?id=67b25dea819ea27a9229afebee65e4110c4c6678'/>
<id>67b25dea819ea27a9229afebee65e4110c4c6678</id>
<content type='text'>
04205039f24ea6e71d2ce94c7cb7e1395f95179e was not enough to
fix the ordered list issue introduced by
26f0033ebb5f8e7c204a042709e3dfa885eac868.
heap.Pop uses Swap internally which modifies as songs index.

We fix the broken indices by overriding them after the ordered list
was created.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
04205039f24ea6e71d2ce94c7cb7e1395f95179e was not enough to
fix the ordered list issue introduced by
26f0033ebb5f8e7c204a042709e3dfa885eac868.
heap.Pop uses Swap internally which modifies as songs index.

We fix the broken indices by overriding them after the ordered list
was created.
</pre>
</div>
</content>
</entry>
<entry>
<title>fix Playlist.OrderedList() breaking the index of all songs</title>
<updated>2023-07-31T15:28:00+00:00</updated>
<author>
<name>Florian Fischer</name>
<email>florian.fischer@muhq.space</email>
</author>
<published>2023-07-31T15:28:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.muhq.space/WRMS/commit/?id=04205039f24ea6e71d2ce94c7cb7e1395f95179e'/>
<id>04205039f24ea6e71d2ce94c7cb7e1395f95179e</id>
<content type='text'>
Since 26f0033ebb5f8e7c204a042709e3dfa885eac868 and using Song pointers
the copied Playlist in OrderedList actually holds the same
Songs as the originally one.
This and the side effects in Playlist.Pop (setting the index to -1)
breaks the heap because all songs in the original queue now
have a invalid index (-1).

This is fixed by removing the side effect in Playlist.Pop().
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since 26f0033ebb5f8e7c204a042709e3dfa885eac868 and using Song pointers
the copied Playlist in OrderedList actually holds the same
Songs as the originally one.
This and the side effects in Playlist.Pop (setting the index to -1)
breaks the heap because all songs in the original queue now
have a invalid index (-1).

This is fixed by removing the side effect in Playlist.Pop().
</pre>
</div>
</content>
</entry>
<entry>
<title>fix copying of the playlist when creating an ordered list</title>
<updated>2023-07-28T11:07:16+00:00</updated>
<author>
<name>Florian Fischer</name>
<email>florian.fischer@muhq.space</email>
</author>
<published>2023-07-28T11:07:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.muhq.space/WRMS/commit/?id=7471cb64e9b7d8e6b1cabb07751181bbfdf3237c'/>
<id>7471cb64e9b7d8e6b1cabb07751181bbfdf3237c</id>
<content type='text'>
Go's copy builtin does only copy min(len(dest), len(src)) elements,
since we create an empty destination slice with a big enough capacity
copy does not actually copy anything.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Go's copy builtin does only copy min(len(dest), len(src)) elements,
since we create an empty destination slice with a big enough capacity
copy does not actually copy anything.
</pre>
</div>
</content>
</entry>
<entry>
<title>fix applyTimeBonus by always using Song pointers</title>
<updated>2023-07-22T13:15:47+00:00</updated>
<author>
<name>Florian Fischer</name>
<email>florian.fischer@muhq.space</email>
</author>
<published>2023-07-22T13:15:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.muhq.space/WRMS/commit/?id=26f0033ebb5f8e7c204a042709e3dfa885eac868'/>
<id>26f0033ebb5f8e7c204a042709e3dfa885eac868</id>
<content type='text'>
Storing song objects in the Songs slice and using pointers to the
underlying array slots breaks if the underlying array must be grown.
When the array is grown the objects are copied to the new array and
the pointers used in queue point to the old objects.
This causes that Playlist.applyTimeBonus may not correctly apply
to the most recent list of songs.

This is fixed by always using Song pointers.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Storing song objects in the Songs slice and using pointers to the
underlying array slots breaks if the underlying array must be grown.
When the array is grown the objects are copied to the new array and
the pointers used in queue point to the old objects.
This causes that Playlist.applyTimeBonus may not correctly apply
to the most recent list of songs.

This is fixed by always using Song pointers.
</pre>
</div>
</content>
</entry>
<entry>
<title>backend: support an incremental time bonus</title>
<updated>2023-07-21T13:56:34+00:00</updated>
<author>
<name>Florian Fischer</name>
<email>florian.fischer@muhq.space</email>
</author>
<published>2023-07-21T13:56:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.muhq.space/WRMS/commit/?id=d1558cf352f24c311b8505661143973d11d9edba'/>
<id>d1558cf352f24c311b8505661143973d11d9edba</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>implement playlist in order traversal</title>
<updated>2023-07-21T08:50:07+00:00</updated>
<author>
<name>Florian Fischer</name>
<email>florian.fischer@muhq.space</email>
</author>
<published>2023-07-21T08:50:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.muhq.space/WRMS/commit/?id=9cb08df11d7446357c5d480d08d256b906d4988e'/>
<id>9cb08df11d7446357c5d480d08d256b906d4988e</id>
<content type='text'>
This ensures that the initial reported song array is in order.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This ensures that the initial reported song array is in order.
</pre>
</div>
</content>
</entry>
<entry>
<title>allow admins to skip or delete songs</title>
<updated>2023-05-31T16:14:25+00:00</updated>
<author>
<name>Florian Fischer</name>
<email>florian.fischer@muhq.space</email>
</author>
<published>2023-05-31T16:14:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.muhq.space/WRMS/commit/?id=0a8e25ea698333c73c50fc84e3334e1079606a10'/>
<id>0a8e25ea698333c73c50fc84e3334e1079606a10</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>llog: use variable argument list</title>
<updated>2022-12-28T12:27:05+00:00</updated>
<author>
<name>Florian Fischer</name>
<email>florian.fischer@muhq.space</email>
</author>
<published>2022-12-28T12:27:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.muhq.space/WRMS/commit/?id=aa5c7fc159b0f5175ede96d46b8d2a2669a176a4'/>
<id>aa5c7fc159b0f5175ede96d46b8d2a2669a176a4</id>
<content type='text'>
Mirror more closely the fmt interface and reduce the verbosity
of the log call sites.
Additionally the log message is only created if we are actually going
to log it.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Mirror more closely the fmt interface and reduce the verbosity
of the log call sites.
Additionally the log message is only created if we are actually going
to log it.
</pre>
</div>
</content>
</entry>
<entry>
<title>implement local storage backend</title>
<updated>2022-12-23T07:51:37+00:00</updated>
<author>
<name>Florian Fischer</name>
<email>florian.fischer@muhq.space</email>
</author>
<published>2022-12-23T07:51:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.muhq.space/WRMS/commit/?id=b7f5ed4e5fcb3b51636a9dad79e7e80f7ebbb102'/>
<id>b7f5ed4e5fcb3b51636a9dad79e7e80f7ebbb102</id>
<content type='text'>
The 'local' backend is able to serve the music from a path specified
by '-server-music-dir'.

Add command line options to select the server port as well as a list
of backends.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The 'local' backend is able to serve the music from a path specified
by '-server-music-dir'.

Add command line options to select the server port as well as a list
of backends.
</pre>
</div>
</content>
</entry>
<entry>
<title>add logging and tests fo playlist</title>
<updated>2022-07-27T18:15:05+00:00</updated>
<author>
<name>Florian Fischer</name>
<email>florian.fischer@muhq.space</email>
</author>
<published>2022-07-27T18:15:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.muhq.space/WRMS/commit/?id=2fd1af916a333ca2ecaaa01bae2e43b922a4ca2e'/>
<id>2fd1af916a333ca2ecaaa01bae2e43b922a4ca2e</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
