Commit Graph

303 Commits

Author SHA1 Message Date
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
Deluan e03ccb3166 Replace MinInt/MaxInt with generic versions 2022-12-28 15:31:56 -05:00
Deluan 5943e8f953 Rename log.LevelCritical to log.LevelFatal 2022-12-21 14:53:36 -05:00
Deluan 28389fb05e Add command line M3U exporter. Closes #1914 2022-12-21 14:39:40 -05:00
Deluan Quintão 24d520882e Don't cache transcoded files if the request was cancelled (#2041)
* Don't cache transcoded files if the request was cancelled (or there was a transcoding error)

* Add context to logs

* Simplify Wait error handling

* Fix flaky test

* Change log level for "populating cache" error message

* Small cleanups
2022-12-18 12:22:12 -05:00
Kendall Garner 54395e7e6a Enable transcoding of downlods (#1667)
* feat(download): Enable transcoding of downlods - #573

Signed-off-by: Kendall Garner <17521368+kgarner7@users.noreply.github.com>

* feat(download): Make automatic transcoding of downloads optional

Signed-off-by: Kendall Garner <17521368+kgarner7@users.noreply.github.com>

* Fix spelling

* address changes

* prettier

* fix config

* use previous name

Signed-off-by: Kendall Garner <17521368+kgarner7@users.noreply.github.com>
2022-12-18 12:12:37 -05:00
Deluan 6489dd4478 Fix overriding previous logger in context 2022-12-14 11:50:16 -05:00
Deluan f206d81afd Some cleanup, fixes typos and grammar errors 2022-12-06 20:09:03 -05:00
Deluan c5f7cf97f4 Some cleanup, adding missing context handling 2022-12-06 19:57:47 -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 00c6545cb1 Bump github.com/go-chi/jwtauth/v5 from 5.0.2 to 5.1.0 2022-12-02 17:58:53 -05:00
Deluan 2c214154dc Add nakedret linter 2022-11-30 14:16:30 -05:00
Raghd Hamzeh d5fe0f214c fix: send content type header in listenbrainz requests - #1944 (#1994)
fixes #1944

Signed-off-by: Raghd Hamzeh <raghd@rhamzeh.com>

Signed-off-by: Raghd Hamzeh <raghd@rhamzeh.com>
2022-11-27 09:47:13 -05:00
Deluan a69a31a3bf Use custom atomic.Bool, as it is not supported in Go 1.18 2022-11-26 15:14:19 -05:00
Deluan 88823fca76 Fix race conditions in tests 2022-11-26 15:07:53 -05:00
Deluan 0bb133a6ac Kill ffmpeg if context is cancelled 2022-11-26 15:06:59 -05:00
jan666 ab6be8d2dc Listenbrainz Scrobble (#2009)
- send SubmissionClient and SubmissionClientVersion
2022-11-22 09:32:46 -05:00
Deluan 9c433b5d68 Add missing context to logger calls 2022-11-04 11:30:12 -04:00
Deluan f82df70302 Add nilerr linter 2022-09-30 20:18:14 -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
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 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 028723f721 Fix loading overridden translations from ${DataFolder}/resources/i18n 2022-02-10 14:56:39 -05:00
Deluan 20cdd38fc4 Better logging for agents configuration 2021-11-25 15:48:32 -05:00
Deluan ce7940bbfc Allow overriding name and comment when importing NSP playlists 2021-11-19 19:14:38 -05:00
Steve Richter 3bd6f82c80 Rename ListenBrainz config flag and enable by default (#1443) 2021-11-17 21:11:53 -05:00
Deluan 0d9dcebf32 Fix playlist cannot be empty via Subsonic API 2021-11-05 10:23:45 -04:00
Deluan d3a2f769b7 Better logging of GetSimilar call 2021-11-03 15:59:16 -04:00
Deluan 68a84ec832 Smarter cache of external info calls (last.fm / spotify) 2021-11-03 14:13:50 -04:00
Deluan 053909196c More info in scrobbling logs 2021-11-02 12:25:29 -04:00
Deluan 778f474d26 Use new rest lib (Update receives all columns that need to be updated) 2021-11-01 21:27:36 -04:00
Deluan e7202339af Ignore empty lines in M3U files 2021-10-31 20:43:30 -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 66a9cbb7d9 Remove temp folders after tests 2021-10-28 10:40:31 -04:00
Deluan f645c4769c Fix double escaped lyrics and comments 2021-10-26 19:33:21 -04:00
Deluan 63b5191ea7 Fix lint 2021-10-26 10:57:59 -04:00
Deluan af00503b77 Optimize playlist updates 2021-10-26 10:45:14 -04:00
Deluan 76fdcd112b Tweak SimilarSongs algorithm to prioritize the requested main artist 2021-10-24 18:04:40 -04:00
Deluan 18e1c169f9 Don't read the whole smart playlist file in memory 2021-10-24 14:41:08 -04:00
Deluan cc1659aa73 Better way to match top songs from external sources (Last.fm) 2021-10-23 20:26:30 -04:00
Deluan c73f64ee3a Removed unused code 2021-10-23 20:25:28 -04:00
Deluan 806b13cf42 Update stats of Smart Playlist when it is created
Also fix loadTracks
2021-10-23 20:25:28 -04:00
Deluan 2c860edeb5 Don't import invalid .nsp files 2021-10-23 20:25:28 -04:00
Deluan 6a550dab77 Use new Criteria and remove SmartPlaylist struct 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