596 Commits

Author SHA1 Message Date
Deluan
1467036efd Add DefaultUIVolume option. Closes #1679 2022-11-11 16:31:28 -05:00
Deluan
9c433b5d68 Add missing context to logger calls 2022-11-04 11:30:12 -04:00
Deluan
76517cab12 Fix potential nil pointer dereference 2022-11-04 10:39:25 -04:00
Deluan
8f02daf337 Reduce spurious error/warn messages, if loglevel != debug 2022-11-03 12:38:05 -04:00
Deluan
80b7311453 Add TrackNumber to "fake" generated filenames. Fixes #1912 2022-11-02 12:11:01 -04:00
Deluan
ca2cb26d8e Add played field to Subsonic API responses. Fix #1971
This is not an "official" field in the specification, but I guess it does not hurt to expose this ;)
2022-11-02 11:20:51 -04:00
Deluan
aab4925dfc Restore DefaultLanguage case-sensitiveness by reverting commit bfeb8ef6b3e5756d72b230abdbb96f8a31b2e2f.
Language code should be case-sensitive. Fix #1946. Supersedes #1947.
2022-10-19 09:14:02 -04:00
Deluan
77dbafff0f Add errorlint linter 2022-09-30 19:33:39 -04:00
Deluan
db67c1277e Fix error comparisons 2022-09-30 18:54:25 -04:00
Deluan
7b0a8f47de Add exportloopref linter 2022-09-30 18:23:47 -04:00
Deluan
bfeb8ef6b3 DefaultLanguage is now case-insensitive 2022-09-28 11:30:22 -04:00
Andy Klimczak
2f7a3c5eda
feat: Add listenbrainz base url configuration (#1774)
* feat: Add listenbrainz base url configuration

- ListenBrainz.BaseURL config value

* Don't need to store baseUrl

* Use `url.JoinPath` to concatenate url paths

* Replace url.JoinPath (Go 1.19 only) with custom function

Co-authored-by: Deluan <deluan@navidrome.org>
2022-09-27 21:06:28 -04:00
Deluan
cb3ba23fce New config DefaultLanguage. Closes #1561 2022-09-27 19:31:09 -04:00
Manuel
72cde6dfde
fix:(middlewares.go) - Set Cookie SameSite mode to Strict - 1776 (#1777)
* None is deprecated and will fallback to Lax in the future.
* Using Strict is future proof and provides additional CSR protection

Signed-off-by: Manuel Kroeber <manuel.kroeber@gmail.com>

Signed-off-by: Manuel Kroeber <manuel.kroeber@gmail.com>
2022-09-27 17:58:47 -04:00
Kendall Garner
751e42c705
Fix creating server (#1894) 2022-09-27 16:53:40 -04: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
16afd3a490 Remove //+build tags, as the code does not compile on older versions of Go anymore 2022-07-29 08:41:28 -04:00
Deluan
ebf7354df4 Add more info in search log message 2022-07-27 14:59:01 -04:00
Deluan
c0066ebd85 Add log warn when request is cancelled/interrupted 2022-07-27 14:27:18 -04:00
Deluan
cd5bce7b16 Speed up /search subsonic endpoints by parallelizing the queries 2022-07-27 13:56:04 -04:00
Deluan
d613b19306 Simplify Singleton usage by leveraging Go 1.18's generics 2022-07-27 12:15:05 -04:00
Deluan
31882abf6f Upgrade Ginkgo to V2 2022-07-26 16:53:17 -04:00
Deluan
9c3b14c5c4 Return 501 for "not implemented". Fixes #1785 2022-07-26 13:18:08 -04:00
Deluan
8cd405d15e Add IP to Subsonic API's invalid login log messages. Closes #1814 2022-07-25 23:54:49 -04:00
Deluan
7665478a52 Upgrade golangci-lint and fix new lint error 2022-07-24 19:30:23 -04:00
Deluan
028723f721 Fix loading overridden translations from ${DataFolder}/resources/i18n 2022-02-10 14:56:39 -05:00
Deluan
910091f1f1 Fix playCount casing 2021-12-14 09:33:34 -05:00
Deluan
20cdd38fc4 Better logging for agents configuration 2021-11-25 15:48:32 -05:00
Deluan
30d3f1eda0 Add userRating to Subsonic Album/Artist responses. Closes #1486 2021-11-23 21:50:57 -05:00
Brice Johnson
6d947f6f7e
Allowing 3rd party UIs to access x-total-count http header (#1470)
* Adding 'x-content-duratin' and 'x-total-count' to CORS exposed headers

* Moving cors setup to middlewares.go

* adding x-nd-authorization to exposed headers
2021-11-19 10:07:54 -05:00
Steve Richter
3bd6f82c80
Rename ListenBrainz config flag and enable by default (#1443) 2021-11-17 21:11:53 -05:00
Deluan
804fb716db Show in the logs how long it took to startup 2021-11-04 13:49:05 -04:00
Deluan
9712a5b1c6 Fix error codes for required parameters in getAlbumList 2021-11-02 21:38:08 -04:00
Deluan
9422373be0 Optimize AlbumRepository.GetAll and add a GetAllWithoutGenres method specifically for Subsonic API, where multiple-genres are not required 2021-11-02 21:19:49 -04:00
Deluan
12818fb590 Make song/album/artist endpoints read-only 2021-11-02 14:44:50 -04:00
Deluan
133fed344f Add owner_id to playlist 2021-10-31 15:08:06 -04:00
Steve Richter
a56d5bc850
Listenbrainz scrobbling (#1424)
* Refactor session_keys to its own package

* Adjust play_tracker

- Don't send external NowPlaying/Scrobble for tracks with unknown artist
- Continue to the next agent on error

* Implement ListenBrainz Agent and Auth Router

* Implement frontend for ListenBrainz linking

* Update listenBrainzRequest

- Don't marshal Player to json
- Rename Track to Title

* Return ErrRetryLater on ListenBrainz server errors

* Add tests for listenBrainzAgent

* Add tests for ListenBrainz Client

* Adjust ListenBrainzTokenDialog to handle errors better

* Refactor listenbrainz.formatListen and listenBrainzRequest structs

* Refactor agent auth_routers

* Refactor session_keys to agents package

* Add test for listenBrainzResponse

* Add tests for ListenBrainz auth_router

* Update ListenBrainzTokenDialog and auth_router

* Adjust player scrobble toggle
2021-10-30 12:17:42 -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
9072412812 Fix translations on Windows 2021-10-28 09:41:37 -04:00
Deluan
f645c4769c Fix double escaped lyrics and comments 2021-10-26 19:33:21 -04:00
Deluan
5dce499d6d Fix/Optimized Playlist tracks deletion 2021-10-26 14:05:28 -04:00
Deluan
af00503b77 Optimize playlist updates 2021-10-26 10:45:14 -04:00
Deluan
2e2a647e67 Make SmartPlaylists read-only 2021-10-23 20:25:28 -04:00
Deluan
1a96e9fe65 Import smart playlists (extension .nsp) 2021-10-23 20:25:28 -04:00
Deluan
c72add516a Add methods to Playlist model
Also, don't load genres for Playlists tracks (not necessary for now)
2021-10-23 20:25:28 -04:00
Deluan
d200933b68 Reduce number of queries for some playlists operations.
Also allow admins to update/delete playlists from other users in the Subsonic API. Closes #1366
2021-10-23 20:25:28 -04:00
Dheeraj Lalwani
5621551dd0
Adds Lyrics Support to Subsonic API (#1379)
* Add function 'isSynced' that identifies if lyrics are synced or not and add tests for the same

* implement 'getLyrics' which returns lyrics if they exist

Signed-off-by: Dheeraj Lalwani <lalwanidheeraj1234@gmail.com>

* remove timestamps frorom the the lyrics if they are synced, fix filters & clean up code

Signed-off-by: Dheeraj Lalwani <lalwanidheeraj1234@gmail.com>

* add snapshot tests for the 'Lyrics' response & add some clean up

Signed-off-by: Dheeraj Lalwani <lalwanidheeraj1234@gmail.com>

* add tests for 'GetLyrics' function

Signed-off-by: Dheeraj Lalwani <lalwanidheeraj1234@gmail.com>

* update the snapshot test & the test for 'GetLyrics' function

Signed-off-by: Dheeraj Lalwani <lalwanidheeraj1234@gmail.com>
2021-10-19 16:33:06 -04:00
Deluan
b6e30cd01f Return playlists sorted in getPlaylists Subsonic endpoint 2021-10-05 14:47:57 -04:00
Deluan
6c3e45de41 Add songs to playlists with drag and drop 2021-10-02 13:14:33 -04:00