Commit Graph

88 Commits

Author SHA1 Message Date
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
Zane van Iperen 9b7fac5147
Update default transcoding commands (#2325)
Changes the default transcoding commands to only use the first audio
stream, instead of the first arbitrary stream.

Co-authored-by: Deluan Quintão <deluan@navidrome.org>
2023-05-19 10:49:29 -04:00
Deluan 3ce3185118 Don't retrieve Various Artists and Unknown Artist info from Last.fm 2023-02-04 21:18:51 -05:00
Deluan f4b50c493c When retrieving images from external sources, avoid calling it again if data is already cached locally.
Relates to https://github.com/navidrome/navidrome/issues/2130#issuecomment-1412742918
2023-02-02 10:38:17 -05:00
Deluan 128b626ec9 Add option to change max playlists shown in UI's sidebar, `MaxSidebarPlaylists`. Fix #2077 2023-02-01 10:25:25 -05:00
selfhoster1312 1e24809ed6
Create accounts automatically when authenticating from HTTP header (#2087)
* Create accounts automatically when authenticating from HTTP header

* Disable password check when header auth is enabled

* Formatting

* Password change is valid when no password (old or new) is provided

* Test suite runs with header auth disabled (mock config)
Prevents nil pointer access (panic) while testing password validating logic

* Use a constant prefix for autogenerated passwords (header auth case)

* Add tests

* Add context to log messages

Co-authored-by: Deluan <deluan@navidrome.org>
2023-01-24 20:18:10 -05:00
Deluan dbf80d8592 Change public/share path to `/share` - DSub does not use the URL from the API response... :( 2023-01-24 18:36:46 -05:00
Deluan 84aa094e56 More work on Shares 2023-01-24 18:36:45 -05:00
Deluan ab04e33da6 Initial work on Shares 2023-01-24 18:36:45 -05:00
Deluan 17eab6a88d Fix resized image cache key 2023-01-17 20:58:38 -05:00
Kendall Garner 93adda66d9
Get album info (when available) from Last.fm, add getAlbumInfo endpoint (#2061)
* lastfm album.getInfo, getAlbuminfo(2) endpoints

* ... for description and reduce not found log level

* address first comments

* return all images

* Update migration timestamp

* Handle a few edge cases

* Add CoverArtPriority option to retrieve albumart from external sources

* Make agents methods more descriptive

* Use Last.fm name consistently

Co-authored-by: Deluan <deluan@navidrome.org>
2023-01-17 20:22:54 -05:00
Deluan 3f2d24695e PreCache artist images 2023-01-13 22:18:34 -05:00
Deluan 8f0d002922 Add local TopSongs 2023-01-13 22:18:34 -05:00
Deluan bf461473ef Add local agent, only for images 2023-01-13 22:18:34 -05:00
Deluan 28e7371d93 Moved logic of collapsing songs into albums to model package
(it should really be called domain.... maybe will rename it later)
2022-12-28 15:31:56 -05:00
gauth-fr 55ba39cb79
Add global Downsampling feature (#1575)
* Add global downsampling feature

* Default to Opus &  consider player transcoder

* Add a test case for DefaultDownsamplingFormat

Co-authored-by: Deluan <deluan@navidrome.org>
2022-12-06 19:41:16 -05:00
Deluan 195f39182d Host default login background images in Navidrome's own website 2022-11-27 21:37:33 -05:00
Zane van Iperen 472f99b2b5
Add AAC default transcoding (#2010) 2022-11-23 10:20:40 -05:00
Deluan 1467036efd Add `DefaultUIVolume` option. Closes #1679 2022-11-11 16:31:28 -05:00
Deluan 2a3cd08f20 Fix GO-S2114 security issue
See https://deepsource.io/directory/analyzers/go/issues/GO-S2114
2022-09-26 22:33:42 -04:00
Deluan 4cf43ed735 Only compute version once 2022-09-14 21:09:39 -04:00
Deluan e966d94c0b Force correct mime-type for JS and CSS files 2022-02-08 15:17:35 -05:00
Deluan afe1e4cfcd Fix lint for public credentials 2021-11-25 15:55:53 -05:00
Deluan 68a84ec832 Smarter cache of external info calls (last.fm / spotify) 2021-11-03 14:13:50 -04:00
Deluan 1823159b25 New config to disable all external integrations. Closes #102 2021-10-30 18:03:46 -04:00
Deluan fa3471f527 Simplify `resources` code, enabling any resource to be overridden (not just translations) 2021-10-28 10:25:25 -04:00
Deluan 85d48478e8 Add `.mka` file format. Only works with `ffmpeg` extractor 2021-10-27 15:00:32 -04:00
Deluan ab2912b4fa Only import playlists from configured paths in option `PlaylistsPath`. Closes #1181
Syntax is Ant-style Globs, with support for '**' (any subfolder). Default: '.:**' (or '.;**' in Windows`, meaning all folders and subfolders under `MusicFolder`
2021-09-12 21:07:51 -04:00
caiocotts 54f98497c2
Use wchar_t for TagLib filenames on Windows (#1310)
* Use wchar_t for tagLib filenames on Windows

* Make TagLib default extractor for all platforms.

* Organize imports

Co-authored-by: Deluan <deluan@navidrome.org>
2021-08-28 19:35:54 -04:00
Deluan 7540881695 Small refactorings 2021-07-20 19:18:29 -04:00
Deluan 44e7502aef Log warning when artist has a MBID of Various Artists 2021-07-18 18:28:51 -04:00
Deluan 334068c8bf Refactor mime-types configuration 2021-07-08 11:38:29 -04:00
Deluan a7509c9ff7 Send NowPlaying and Scrobbles to Last.fm 2021-06-23 11:01:58 -04:00
Deluan 1f997357a9 Expose Last.fm's ApiKey to UI 2021-06-21 18:14:01 -04:00
Deluan Quintão 66b74c81f1
Encrypt passwords in DB (#1187)
* Encode/Encrypt passwords in DB

* Only decrypts passwords if it is necessary

* Add tests for encryption functions
2021-06-18 18:38:38 -04:00
Deluan b65e76293a Only send events to clients who need it
- User events (star, rating, plays) only sent to same user
- Don't send to the client (browser window) that originated the event
2021-06-15 18:59:26 -04:00
Deluan Quintão 03efc48137
Refactor routing, changes API URLs (#1171)
* Make authentication part of the server, so it can be reused outside the Native API

This commit has broken tests after a rebase

* Serve frontend assets from `server`, and not from Native API

* Change Native API URL

* Fix auth tests

* Refactor server authentication

* Simplify authProvider, now subsonic token+salt comes from the server

* Don't send JWT token to UI when authenticated via Request Header

* Enable ReverseProxyWhitelist to be read from environment
2021-06-13 12:46:36 -04:00
Deluan 4e0177ee53 Always update artist info, even if info is fresh 2021-05-27 20:32:26 -04:00
Deluan da30923a95 Replace default Login backgrounds with Navidrome's collection 2021-04-20 15:26:24 -04:00
Deluan 9913b92905 Get lossless format list from server 2021-04-06 22:18:48 -04:00
Deluan 46d4c48d44 Login backgrounds from unsplash collection (#936) 2021-03-31 00:49:12 -04:00
Deluan 4b68260b83 Move constant to `consts.go` file 2021-03-24 10:21:31 -04:00
Deluan 28cdf1e693 Add a cached http client 2021-02-08 16:54:51 -05:00
Deluan 6ee45a9ccc Move project to Navidrome GitHub organization 2021-02-06 21:46:35 -05:00
Deluan cdae4347a6 Make ServerStart variable global 2020-12-21 11:39:38 -05:00
Deluan cfad35544b Add artistImageUrl available in getArtists endpoint
Also cache artist info in the DB for 1 hour
2020-11-01 14:37:29 -05:00
Deluan 04fd72e1fa Change avatar placeholder to new logo 2020-10-23 21:37:53 -04:00
Deluan 61d0bd4729 Add support for WavPack files 2020-10-20 10:47:29 -04:00
Deluan 7a3bd935c2 Change default Opus transcoding format name to `opus`. Closes #521 2020-09-24 12:27:13 -04:00
Deluan 6c8535c54a Add support for reading webp artwork 2020-08-21 11:33:23 -04:00