Commit Graph

146 Commits

Author SHA1 Message Date
Deluan 7f551a7932 Add make target to build docker image 2024-04-13 13:29:45 -04:00
Deluan Quintão de7f553526
Update Go to 1.22.2 and TagLib to 2.0.1 (#2946) 2024-04-09 19:00:38 -04:00
Deluan 6f4c55dbde Use new ci-goreleaser (with TagLib 2) 2024-02-18 12:52:06 -05:00
Deluan Quintão 7167e5ac87
Upgrade to Go 1.22 and Node v20 (#2861)
* Remove workaround for missing `context.WithoutCancel` in Go 1.20

* Upgrade to Go 1.22

* Upgrade GitHub Actions

* Upgrade Node to v20
2024-02-16 20:29:16 -05:00
Deluan Quintão 781ff40464
Bump Go version to 1.21.5 (#2729) 2023-12-20 20:02:40 -05:00
Deluan 1b4483d32b Remove `tools.go` 2023-11-27 14:06:00 -05:00
Deluan c3efc57259 Use TagLib 1.13.1 for snapshots/releases 2023-11-24 20:35:38 -05:00
Deluan 27a92b05e7 Fixed deprecated GoReleaser options 2023-11-24 18:08:34 -05:00
Deluan 069da5d91c Bump Go to 1.21.4 2023-11-24 17:51:36 -05:00
Matthias Schmidt 1b16e1140f
Jukebox mode (#2289)
* Adding cache directory to ignore-list

* Adding jukebox-related config options

* Adding DevEnableJukebox config option pls. dummy server

* Adding types and routers

* Now without panic

* First draft on parsing the action

* Some cleanups

* Adding playback server

* Verify audio device configuration

* Adding debug-build target to have full symbol support

* Adding beep sound library pls some example code. Not working yet

* Play a fixed mp3 on any interface access for testing purposes

* Put action code into separate file, adding stringer, more debug output, prepare structs, validation

* Put action parameter parser code where it belongs

* Have a single Action transporting all information

* User fmt.Errorf for error-generation

* Adding wide playback interface

* Use action map for parsing, stringer instead switch stmt.

* Use but only one switch case and direct dispatch, refactoring

* Add error handling and pushing to client

* send decent errormessage, no internal server error

* Adding playback devices slice and load it from config

* Combine config-verification and structure init

* Return user-specific device

* Separate playback server from device

* Use dataStore to retrieve mediafile by id

* WIP: Playlist and start/stop handling. Doing start/stop the hard way as of now

* WIP: set, start and stop work on one single song. More to come

* Dont need to wait for the end

* Merge jukebox_action.go into jukebox.go

* Remove getParameterAsInt64(). Use existing requiredParamInt() instead

* Dont need to call newFailure() explicitly

* Remove int64, use int instead.

* Add and set action now accept multiple ids

* Kickout copy of childFromMediaFile(). It is not needed here.

* Refactoring devices and playbackServer

* Turn (internal) playback.DeviceStatus into subsonic JukeboxStatus when rendering output. Indexes int64 -> int

* Now we have a position and playing status

* Switching gain to float32, xs:float is defined as 32 bit. Fixing nasty copy/pointer bug

* Now with volume control

* Start working the queue

* Remove user from device interface

* Rename function GetDevice -> GetDeviceForUser to make intention clearer

* Have a nice stringer for the queue

* User Prepared boolean for now to allow pause/unpause

* Skipping works, but without offsets

* Make ChildFromMediaFile public to be used in jukebox get() implementation

* Return position in seconds and implement offset-skip in seconds

* Default offset to 0

* Adding a simple setGain implementation

* Prepare for transcoding AAC

* WIP: transcode to WAV to use beeps wav decoder. Not done yet.

* WIP: out of sheer desparation: convert to MP3 (which works) rather than WAV to troubleshoot issue.

* Use FLAC as intermediate format to play Apple AAC

* A bit of cleanup

* Catching the end-of-stream event for further reactions

* Have a trackSwitching goroutine waiting on channel when track ends

* Move decoder code into own file. Restructure code a bit

* Now with going on to play the next song in the playlist

* Adding shuffle feature

* Implementing remove action

* Cleanup code

* Remove templates for ffmpeg mp3 generation. Not needed anymore.

* Adding some documentation

* Check whether offset into track is in range. Fixing potential remove track bug. Documentation

* Make golangci-lint happy: handling return values

* Adding test suite and example dummy for playback package

* Adding some basic queue tests

* Only use Jukebox.Enabled config option

* Adding stream closing handling

* Pass context.Context to all PlaybackDevice methods

* Remove unneeded function

* Correct spelling

* Reduce visibility of ChildFromMediaFile

* Decomplicate action-parsing

* Adding simple tempfile-based AAC->FLAC transcoding. No parallel reading and writing yet.

* Try to optimize pipe-writing, tempfile-handling and reading. Not done yet.

* Do a synchronous copy of the tempfile. Racecondition detected

* More debugging statements and fixing the play/pause bug. More work needed

* Start the trackSwitcher() with each device once. Return JSON position even if its 0. More debug-output

* Moving all track-handling code into own module

* Fix typo. Do not pass ctx around when not applicable

* WIP: More refactoring, debugging output

* Fix nil pointer

* Repairing MP3 playback by pinning indirect dependencies: hajimehoshi/go-mp3 and hajimehoshi/oto

* Do not forget to cleanup after a skip action

* Make resync with master easy

* Adding missing mocks

* Adding missing error-handling found by linter

* Updating github.com/hajimehoshi/oto

* Removing duplicate function

* Move BEEP-related code into own package

* Juggle beep-related code around as preparation for interface access

* More refactoring for interface separation

* Gather CloseDevice() behind Track interface.

* Adding skeleton, draft audio-interface using mpv.io

* Adding majority of interface commands using messages to mpv socket.

* Adding end-of-stream handling

* MPV: start/stop are working

* postition is given in float in mpv

* Unify Close() and CloseDevice(). Using temp filename for controlling socket

* Wait until control-socket shows up. Cleanup socket in Close()

* Use canceable command. Rename to Executor

* Skipping tracks works now

* Now with actually setting the position

* Fix regain

* Add missing error-handling found by linter

* Adding retry mode on time-pos property getter

* Remove unneeded code on queue

* Putting build-tag beep onto beep files

* Remove deprecated call to rand.Seed()

"As of Go 1.20 there is no reason to call Seed with a random value. Programs that call Seed with a known value to get a specific sequence of results should use New(NewSource(seed)) to obtain a local random generator."

* Using int32 to conform to Subsonic API spec

* Fix merge error

* Minor style changes

* Get username from context

---------

Co-authored-by: Deluan <deluan@navidrome.org>
2023-09-10 11:25:22 -04:00
Deluan Quintão f941347cf1
Upgrade to Go 1.21 (#2475)
* Upgrade to Go 1.21

* Remove 'replacements' from goreleaser config
2023-08-09 11:39:49 -04:00
Deluan 26aa0f4fff Fix typo 2023-06-19 11:19:43 -04:00
Deluan 4898f31f6d Add `format` target to Makefile 2023-06-19 11:15:51 -04:00
tomleb 257ccc5f43
Allow configuring cache folder (#2357)
* Set all clients to dev_download for make get-music

* Use multiple TranscodingCache instances in tests

This fixes flaky tests. The issue is that the TranscodingCache object
was being reused in tests from media_stream_Internal_test.go and
media_stream_test.go. If tests from the former was run first, the cache
would be filled up, so that when running tests from the latter, the `NON
seekable` test would fail.

* Allow configuring cache folder

This commit introduces a new configuration option to configure the cache
folder. This allows the cache to be in a separate folder such as
/var/cache/navidrome on Linux distributions.

* Fix tests

* Removed unused test setup code

---------

Co-authored-by: Deluan <deluan@deluan.com>
Co-authored-by: Deluan <deluan@navidrome.org>
2023-06-02 17:14:11 -04:00
Deluan 9628b1389d Add help msg for JS formatting errors 2023-04-06 11:45:32 -04:00
Deluan 96c50d369a Upgrade to Go 1.20.3 and GoRelease 1.16.1 2023-04-04 19:10:03 -04:00
Deluan 310c816cdd Use Go 1.20 for local cross-compilation 2023-04-04 15:33:42 -04:00
Deluan c3cc7dee01 Enable SQL migrations 2023-04-04 10:30:28 -04:00
Deluan 7847f19c9d Upgrade goose 2023-04-04 10:05:31 -04:00
Deluan 406554f1c4 Remove some tools from dependencies, reducing the modules dependencies 2023-03-30 15:33:47 -04:00
Julien Voisin 17e0cd5504
Shuffle the tests, just in case (#2272) 2023-03-22 20:12:12 -04:00
Deluan 7e03f8ca82 Upgrade to Go 1.19.5 2023-01-12 21:20:45 -05:00
Deluan 88823fca76 Fix race conditions in tests 2022-11-26 15:07:53 -05:00
Deluan 3a462c7f07 Fix ARM v5 and v6 builds, by going back to armel.
Also upgrades Go to 1.19.3. Closes #1968
2022-11-07 17:16:30 -05:00
Deluan 87feac041b Add make target to download some music for development purposes. Closes #1703 2022-09-30 23:10:33 -04:00
Deluan 413292da6b Reduce go mod download verbosity 2022-09-28 20:27:53 -04:00
Deluan ded9ab53e5 Use armhf for ARM builds 2022-09-27 16:47:47 -04:00
Deluan 416b5c7d13 Fix Linux 32 bits build 2022-09-26 23:54:03 -04:00
Deluan dd57278ba2 Upgrade to GoLang 1.19 and bump golangci-lint version 2022-09-26 22:44:54 -04:00
Deluan 31882abf6f Upgrade Ginkgo to V2 2022-07-26 16:53:17 -04:00
Deluan bde5be347b Build with GoLang 1.18.4 2022-07-24 19:02:09 -04:00
Deluan aae79b4561 Upgrade to GoLang 1.18 2022-07-24 15:31:22 -04:00
whorfin 4bc4daa68f
Improve git-vs-tarball detection (#1423)
* Extract version from directory name if .git dir is missing

* Avoid using shell

* Remove .gitinfo build from pipeline

* Fix git-detecting rule to be robust in presence of setup-git
2021-10-23 21:27:19 -04:00
Deluan 7505b5c554 Bump GoLang to 1.17.2 2021-10-13 09:53:44 -04:00
Deluan 9f00aad216 Upgrade to GoLang 1.17.1 2021-09-12 14:14:33 -04:00
Deluan Quintão c2251e6ddc
Update GoLang to 1.17 (#1295)
* Update GoLang to 1.17

* Rename pipeline jobs
2021-09-09 00:26:56 -04:00
whorfin 173b30cd59
Extract version from directory name if .git dir is missing (#1327)
* Extract version from directory name if .git dir is missing

* Avoid using shell

* Remove .gitinfo build from pipeline
2021-09-06 21:26:04 -04:00
Deluan af7c87dd7b Give a warning on commands that do not build the frontend.
This is to avoid confusions like this:
https://github.com/navidrome/navidrome/issues/1297#issuecomment-913007331
2021-09-05 21:39:19 -04:00
Deluan 6983390ca3 Setup git hooks when running `make setup` 2021-08-21 13:45:34 -04:00
Deluan Quintão 5064cb2a46
Add git version info to release source (#1250) 2021-07-15 09:49:34 -04:00
Deluan 0ec7a305a2 Reorder Makefile dev targets 2021-05-20 13:42:29 -04:00
Deluan 3cac00ad13 Upgrade TagLib to 1.12 2021-05-14 14:31:07 -04:00
Deluan 7d96167abc Upgrade to go-chi 5 2021-05-11 17:21:18 -04:00
Deluan a5fc5f0ff6 Revert "Better way to invoke `make single`"
This reverts commit 73efbd90
2021-05-04 17:05:41 -04:00
Deluan 73efbd90ab Better way to invoke `make single` 2021-05-04 16:47:47 -04:00
Deluan 88105d5c30 Clean-up Makefile, add help 2021-05-01 11:14:24 -04:00
Deluan b180386d23 Simplify build targets 2021-05-01 09:16:45 -04:00
Deluan 70e7bf6b5b Clean up some `make` targets 2021-05-01 08:51:29 -04:00
Deluan 692663680b Uses GoLang 1.16.3
Also add a target to build snapshots for a single platform
2021-04-26 17:21:59 -04:00
Deluan d8a1773d50 Increase golangci-lint timeout. Fix #1001 2021-04-08 10:19:58 -04:00