| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| |
|
|
|
|
|
| |
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.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
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.
|
| | |
|
| |
|
|
| |
Fixes: d8bdce51c336f3693121202402ee38ff3f12c0e2
|
| |
|
|
|
| |
Also fix showing finished songs as current playing on new
clients.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| |
|
|
|
|
|
| |
Now WRMS only switches the playback state when an admin calls the
/playpause endpoint.
When the queue runs out of songs the state is kept and continues
when a new song is added.
|
| | |
|
| | |
|
| |
|
|
| |
Reported-By: myOmikron <git@omikron.dev>
|
| |
|
|
| |
TODO: ensure late search results do not show up for future searches
|
| | |
|
| |
|
|
| |
Add a boolean to check for the upload backend in the template.
|
| |
|
|
|
|
|
| |
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.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
* use more llog
* inform clients about their votes when initiating the connection
* show song weights
|
| |
|
|
|
|
|
| |
* use mpv to play songs
* fix CurrentSong being a pointer to a changing slot in the playlist array
* wire up play and pause
* continue playing after a song is finished
|
| |
|
|
|
|
|
|
|
| |
* add dummy backend
* enable spotify searching
* JS: use let instead of var
* improve logging
* support adding new songs from search
* rename Song.Id to Song.Uri
|
| | |
|
| |
|