aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* fix code block in READMEHEADmainFlorian Fischer2024-03-161-1/+2
|
* slightly improve _next log messageFlorian Fischer2024-03-161-1/+1
|
* fix broken indices in songs after Playlist.OrderedList()Florian Fischer2023-08-082-2/+36
| | | | | | | | | | 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.
* run go fmtFlorian Fischer2023-07-311-1/+0
|
* add error reporting when signalling mpv failedFlorian Fischer2023-07-311-1/+4
|
* panic when data to send to a client can not be marshaledFlorian Fischer2023-07-313-14/+7
|
* bumble up a possible error creating the upload directoryFlorian Fischer2023-07-312-4/+6
|
* ignore staticcheck for deprecated strings.Title functionFlorian Fischer2023-07-311-1/+2
| | | | We know the input therefore it is totally save to use strings.Title.
* make time bonus config value usable through yamlFlorian Fischer2023-07-314-8/+9
|
* use Logf() instead of Log(fmt.Sprintf())Florian Fischer2023-07-311-2/+2
|
* use unicode symbols to show song detailsFlorian Fischer2023-07-311-3/+6
|
* remove select on clickFlorian Fischer2023-07-311-4/+4
| | | | | The select on click is awkward on mobile remove it and let the browser handle the form manipulation.
* implement LoadPlaylist for mockPlayerFlorian Fischer2023-07-311-0/+1
|
* fix Playlist.OrderedList() breaking the index of all songsFlorian Fischer2023-07-312-1/+8
| | | | | | | | | | | 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().
* implement initial loading of spotify playlistsFlorian Fischer2023-07-316-5/+95
| | | | | | | | Playlist can now be added to the initial play queue with the -playlists command line flag or the playlists yaml key in the config file. To load a spotify playlist the link obtained when sharing the playlist from spotify is used.
* move song and connection code into separate filesFlorian Fischer2023-07-313-177/+195
|
* update dependenciesFlorian Fischer2023-07-313-101/+11
| | | | Switch to my own librespot-golang fork.
* fix deadlock when ordering the broadcasted eventsFlorian Fischer2023-07-282-31/+51
| | | | | | | Do not increment the global event id when sending "private" events like the initial commands and search results. Fixes: a93c5826172f835db604a2646d470ecfd72484cf
* do not increment the global event count when reporting search eventsFlorian Fischer2023-07-282-4/+4
|
* fix copying of the playlist when creating an ordered listFlorian Fischer2023-07-282-1/+18
| | | | | | 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.
* add debug output for event orderingFlorian Fischer2023-07-281-0/+2
|
* implement advanced search for the spotify backendFlorian Fischer2023-07-232-29/+89
| | | | | The librespot API does not allow advanced search therefore we filter the results according to our advanced patterns.
* fix typo in title form nameFlorian Fischer2023-07-231-1/+1
|
* implement advanced local searchFlorian Fischer2023-07-232-4/+31
|
* show votes and the time bonus in the song detailsFlorian Fischer2023-07-233-5/+16
|
* fix applyTimeBonus by always using Song pointersFlorian Fischer2023-07-2210-76/+96
| | | | | | | | | | | 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.
* add test for flipping a voteFlorian Fischer2023-07-221-0/+17
|
* propagate the time bonus to the client and apply it when adding new songsFlorian Fischer2023-07-222-1/+16
|
* fixup! backend: support an incremental time bonusFlorian Fischer2023-07-221-6/+6
|
* increment the event id when holding the lock and the actual event occursFlorian Fischer2023-07-221-18/+20
|
* backend: support an incremental time bonusFlorian Fischer2023-07-215-1/+18
|
* implement playlist in order traversalFlorian Fischer2023-07-213-11/+50
| | | | This ensures that the initial reported song array is in order.
* do not remove active connections when removing stale onesFlorian Fischer2023-07-162-6/+20
| | | | | | | If the connection is renewed by the client removing the old connection and adding the new one is racy. Fix this by remembering a connection generation number and only to prevent removing the new connection.
* add more song info and preparations for advanced searchFlorian Fischer2023-07-168-32/+81
|
* fixup! client: make songs expandable to show more informationFlorian Fischer2023-07-061-2/+2
|
* fixup! client: add expandable advanced search inputsFlorian Fischer2023-07-061-0/+3
|
* tick the event endpointFlorian Fischer2023-07-061-1/+1
|
* client: add expandable advanced search inputsFlorian Fischer2023-07-061-1/+8
|
* client: make songs expandable to show more informationFlorian Fischer2023-07-061-5/+55
|
* add admin-password and button to become admin from the clientFlorian Fischer2023-07-033-12/+41
|
* do not change playback state when receiving a stop eventFlorian Fischer2023-07-021-5/+1
| | | | Receiving stop means WRMS ran out of songs regardless of its playing state.
* remove vote info when song is playedFlorian Fischer2023-07-021-0/+2
| | | | | This fixes a bug where songs added a second time have bugged vote controls.
* add double add testFlorian Fischer2023-07-021-0/+15
|
* add simple wrms testFlorian Fischer2023-07-012-1/+88
|
* add PL prefix and an additional playlist testFlorian Fischer2023-07-011-4/+50
|
* introduce Player interface to allow multiple player implementationsFlorian Fischer2023-07-017-33/+48
|
* switch from websockets to SSEFlorian Fischer2023-06-303-52/+41
|
* fix double _next call and move mpv termination to NextFlorian Fischer2023-06-302-11/+17
| | | | | Due to an logic error was _next() a second time from runMpv after the mpv subprocess was terminated by the first Next() call.
* print the stacktrace before calling log.FatallnFlorian Fischer2023-06-301-0/+2
|
* add debug message when terminating mpv subprocessFlorian Fischer2023-06-301-0/+1
|