aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* remember the current song before waiting for mpvFlorian Fischer2023-06-301-1/+4
|
* fix toggling of playing state in wrms.PlayPauseFlorian Fischer2023-06-301-4/+4
|
* cleanup Wrms._nextFlorian Fischer2023-06-301-5/+9
|
* fix condition in AdjustSongWeightFlorian Fischer2023-06-301-2/+1
|
* serialize player state change though a channelFlorian Fischer2023-06-302-53/+120
| | | | | Only the player.serveCmds and the runMpv goroutines are racing now. But this race should be a benign race.
* synchronize playback controlFlorian Fischer2023-06-012-17/+43
|
* take the lock when adding or modifying songsFlorian Fischer2023-06-011-5/+14
|
* actually increase the expected next event idFlorian Fischer2023-06-011-1/+2
|
* send events in a total orderFlorian Fischer2023-06-013-109/+135
| | | | | | | Move Connection code to wmrs.go. Introduce a RWMutex to synchronize access to the internal Wrms state. Tag each event when it is broadcast with the next event count. Senders will order the broadcasted events. This guarantees that no obsoltete events are ever delivered.
* tag all events with a monotonic id in order to ignore outdated onesFlorian Fischer2023-05-314-28/+22
|
* support skipping the current song while playback is pausedFlorian Fischer2023-05-313-17/+42
|
* create websocket context after successfully identifying the connectionFlorian Fischer2023-05-311-4/+3
| | | | Fixes: d8bdce51c336f3693121202402ee38ff3f12c0e2
* use an atomic pointer to track the current songFlorian Fischer2023-05-314-13/+24
| | | | | Also fix showing finished songs as current playing on new clients.
* send bad request status if the websocket connection has a bad UUID cookieFlorian Fischer2023-05-311-0/+4
|
* add thread saftey TODOFlorian Fischer2023-05-311-0/+1
|
* mark search query distinguishing TODO as doneFlorian Fischer2023-05-311-1/+1
|
* mark admin controlls as doneFlorian Fischer2023-05-311-2/+2
|
* prevent deadlocks when connections are closedFlorian Fischer2023-05-312-19/+59
| | | | | | | | | | | | | | | | | Currently the unbounded Events channel is never closed and Connection are not removed from WRMS therefore any call to Broadcast deadlocks because the wsEndpoint consumer is no longer reading Events. Prevent this deadlock with a combination of announcing the closing of connections and sender counting for each connection. Before a sender is trying to write to the Events channel it checks if it is already closed. If it observes that the connection is open it registers itself as sender send the Event and unregisters itself. The wsEndpoint announces that the connection is closed and consumes Events until no registered senders are left. Then it closed the Events channel and terminates.
* allow admins to skip or delete songsFlorian Fischer2023-05-314-3/+82
|
* add more verbose logging around loading tracks from spotifyFlorian Fischer2023-05-311-0/+2
|
* mention the uplaod backendFlorian Fischer2023-05-301-0/+5
|
* add more TODOsFlorian Fischer2023-05-301-0/+4
|
* log file path on upload errorFlorian Fischer2023-05-301-2/+3
|
* distinguish between search queriesFlorian Fischer2023-05-304-21/+55
| | | | | | | | | | | Introduce a new Id field for events to distinguish between different searches. Since search result reporting is split up a old search could introduce results or terminate the current search. Keep track of a search counter to distinguish between result from the active search and stale ones. Allow to add multiple songs from the current search.
* use 'uploads' instead of 'upload' as default upload dirFlorian Fischer2023-05-281-1/+1
|
* improve mpv argv loggingFlorian Fischer2023-05-281-1/+1
|