aboutsummaryrefslogtreecommitdiff
path: root/player.go
Commit message (Collapse)AuthorAgeFilesLines
* bumble up a possible error creating the upload directoryFlorian Fischer2023-07-311-1/+1
|
* implement initial loading of spotify playlistsFlorian Fischer2023-07-311-0/+9
| | | | | | | | 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.
* fix applyTimeBonus by always using Song pointersFlorian Fischer2023-07-221-3/+3
| | | | | | | | | | | 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 more song info and preparations for advanced searchFlorian Fischer2023-07-161-2/+2
|
* introduce Player interface to allow multiple player implementationsFlorian Fischer2023-07-011-19/+34
|
* fix double _next call and move mpv termination to NextFlorian Fischer2023-06-301-2/+2
| | | | | Due to an logic error was _next() a second time from runMpv after the mpv subprocess was terminated by the first Next() call.
* 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
|
* serialize player state change though a channelFlorian Fischer2023-06-301-51/+118
| | | | | Only the player.serveCmds and the runMpv goroutines are racing now. But this race should be a benign race.
* support skipping the current song while playback is pausedFlorian Fischer2023-05-311-10/+23
|
* use an atomic pointer to track the current songFlorian Fischer2023-05-311-2/+2
| | | | | Also fix showing finished songs as current playing on new clients.
* improve mpv argv loggingFlorian Fischer2023-05-281-1/+1
|
* fix building mpv argv when no mpv flags are configuredFlorian Fischer2023-05-281-1/+3
|
* fix building mpv argvFlorian Fischer2023-05-281-1/+1
|
* refactor playing an uri and from stdinFlorian Fischer2023-05-281-10/+17
|
* support custom mpv flagsFlorian Fischer2023-05-281-1/+11
|
* log the output of a failed mpv executionFlorian Fischer2023-05-281-2/+3
|
* continue playback when adding a song to an empty queueFlorian Fischer2023-05-211-4/+2
| | | | | | | 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.
* allow YAML parsing of the spotify configFlorian Fischer2023-05-211-1/+1
|
* implement YAML config and admin connectionsFlorian Fischer2023-05-211-1/+1
|
* add OnSongFinished backend hook allowing to remove uploaded songsFlorian Fischer2023-05-211-3/+7
|
* misc cleanupsFlorian Fischer2023-05-211-3/+3
| | | | Reported-By: myOmikron <git@omikron.dev>
* paralyze searchingFlorian Fischer2023-05-211-4/+19
|
* implement the upload backendFlorian Fischer2023-05-211-1/+3
|
* check errors when signaling the mpv child processFlorian Fischer2023-05-211-2/+8
|
* llog: use variable argument listFlorian Fischer2022-12-281-6/+5
| | | | | | | 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.
* implement youtube search using youtube-dlv0.0.4-alphaFlorian Fischer2022-12-271-1/+1
|
* implement local storage backendv0.0.2-alphaFlorian Fischer2022-12-231-15/+23
| | | | | | | | 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 llog in player.goFlorian Fischer2022-08-011-11/+13
|
* intermediate commitFlorian Fischer2022-07-271-0/+1
| | | | | | * use more llog * inform clients about their votes when initiating the connection * show song weights
* add youtube backendFlorian Fischer2022-07-261-3/+5
|
* intermediate commitFlorian Fischer2022-07-261-5/+59
| | | | | | | * 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
* WIP spotify playback commitFlorian Fischer2022-07-211-2/+2
| | | | | * display spotify search results in search overlay * synchronously play songs added from search
* intermediate commitFlorian Fischer2022-07-211-0/+2
| | | | | | | | | * 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-0/+8
|
* initial WIP commitFlorian Fischer2022-07-211-0/+35