<feed xmlns='http://www.w3.org/2005/Atom'>
<title>WRMS/playlist_test.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 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>add PL prefix and an additional playlist test</title>
<updated>2023-07-01T16:54:26+00:00</updated>
<author>
<name>Florian Fischer</name>
<email>florian.fischer@muhq.space</email>
</author>
<published>2023-07-01T16:54:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.muhq.space/WRMS/commit/?id=a95fc844baf1f96510d59ba77a05755cd24fb777'/>
<id>a95fc844baf1f96510d59ba77a05755cd24fb777</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</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>
