aboutsummaryrefslogtreecommitdiff
path: root/main.go
Commit message (Collapse)AuthorAgeFilesLines
* prevent deadlocks when connections are closedFlorian Fischer2023-05-311-3/+3
| | | | | | | | | | | | | | | | | 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-311-3/+34
|
* distinguish between search queriesFlorian Fischer2023-05-301-6/+17
| | | | | | | | | | | 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.
* allow loglevel to be specifies in config fileFlorian Fischer2023-05-281-2/+2
|
* continue playback when adding a song to an empty queueFlorian Fischer2023-05-211-1/+0
| | | | | | | 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.
* implement YAML config and admin connectionsFlorian Fischer2023-05-211-20/+75
|
* add info message when startingFlorian Fischer2023-05-211-0/+1
|
* misc cleanupsFlorian Fischer2023-05-211-2/+2
| | | | Reported-By: myOmikron <git@omikron.dev>
* implement incremental search resultsFlorian Fischer2023-05-211-19/+30
| | | | TODO: ensure late search results do not show up for future searches
* paralyze searchingFlorian Fischer2023-05-211-1/+11
|
* export config members and pass the config to the client page templateFlorian Fischer2023-05-211-9/+11
| | | | Add a boolean to check for the upload backend in the template.
* llog: use variable argument listFlorian Fischer2022-12-281-19/+19
| | | | | | | 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.
* port log usage to llogFlorian Fischer2022-12-231-23/+21
|
* make log level configurablev0.0.3-alphaFlorian Fischer2022-12-231-0/+3
|
* implement local storage backendv0.0.2-alphaFlorian Fischer2022-12-231-4/+14
| | | | | | | | 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.
* intermediate commitFlorian Fischer2022-07-271-9/+41
| | | | | | * use more llog * inform clients about their votes when initiating the connection * show song weights
* intermediate commitFlorian Fischer2022-07-261-3/+3
| | | | | | | * 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
* intermediate commitFlorian Fischer2022-07-211-6/+25
| | | | | | | | | * 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
* start implementing song searchFlorian Fischer2022-07-211-4/+14
|
* initial WIP commitFlorian Fischer2022-07-211-0/+162