Commit Graph

341 Commits

Author SHA1 Message Date
Deluan c831dc4cdf Use `structs` lib to map models to DB. Fix #1266 2021-08-01 12:04:45 -04:00
Deluan 8afa2cd833 Remove dependency of deprecated `ioutil` package 2021-07-20 20:12:28 -04:00
Deluan 774ad65155 Use fs.FS in MergeFS implementation 2021-07-20 19:54:44 -04:00
Deluan 7540881695 Small refactorings 2021-07-20 19:18:29 -04:00
Deluan bc6b175414 Make `getGenre` Subsonic endpoint returns genres sorted by counts 2021-07-20 17:45:08 -04:00
Deluan b6e9ec4db4 Optimize GetAll genres query 2021-07-20 17:45:08 -04:00
Deluan 20b7e5c49b Add Genre filters to UI 2021-07-20 17:45:08 -04:00
Deluan 1d8607ef6a Remove unnecessary repositories methods 2021-07-20 17:45:08 -04:00
Deluan 5e54925520 Add multiple genres to Albums 2021-07-20 17:45:08 -04:00
Deluan 39da741a80 Add multiple genres to MediaFile 2021-07-20 17:45:08 -04:00
Deluan 7cd3a8ba67 Add genre tables, read multiple-genres from tags 2021-07-20 17:45:08 -04:00
Deluan 8d56ec898e Use AlbumArtist tag even for compilations, when it is specified.
If the tracks' AlbumArtists are different, then use "Various Artists"
2021-07-15 11:53:08 -04:00
Deluan cfb113bd33 Disable Last.FM features based on `LastFM.Enabled` config option 2021-07-02 10:04:41 -04:00
Deluan ed286c7103 Don't rely on goroutines to send keepalive events 2021-07-01 13:31:46 -04:00
Deluan 0c2ca2a5e4 Assign event ids in the main loop, to avoid out-of-order events 2021-07-01 10:58:41 -04:00
Deluan 5bd33455a1 Fix deadlock situation when events are sent too fast to the broker 2021-07-01 10:42:00 -04:00
Deluan a73f885afb Add option to disable album cover animation in the player. Closes #1185 2021-06-28 17:11:05 -04:00
Deluan 94533e585c Add tests to `/scrobble` endpoint 2021-06-26 13:52:29 -04:00
Deluan 26bcf0b877 Enable Last.fm scrobbling by default (still requires user's authorization) 2021-06-25 23:09:09 -04:00
Deluan 056f0b944f Refactor: Consolidate scrobbling logic in play_tracker 2021-06-23 11:01:58 -04:00
Deluan a7509c9ff7 Send NowPlaying and Scrobbles to Last.fm 2021-06-23 11:01:58 -04:00
Deluan d5461d0ae9 Refactor Agents to be singleton
Initial work for Last.fm scrobbler
2021-06-23 11:01:58 -04:00
Deluan 743e469795 Use singleton in other places as well 2021-06-21 18:59:26 -04:00
Deluan 1f997357a9 Expose Last.fm's ApiKey to UI 2021-06-21 18:14:01 -04:00
Deluan 502a719e96 Implement Last.FM Desktop Auth flow endpoints 2021-06-21 18:14:01 -04:00
Steve Richter 8ee5c1f245 Initial Last.fm UI implementation 2021-06-21 18:14:01 -04:00
Deluan ffa76bba6a Add flag to disable Scrobble config in the UI 2021-06-21 18:14:01 -04:00
Deluan 877f01bd38 Show notification if server is updated 2021-06-21 13:48:39 -04:00
Deluan 47bcf719f2 Fix cookie warning 2021-06-20 13:27:50 -04:00
Deluan 197d430d15 Fix lint error 2021-06-20 12:07:34 -04:00
Deluan 80b2c2f3cf Try to register all playing music in GetNowPlaying 2021-06-20 11:25:15 -04:00
Deluan 97434c1789 Fix GetNowPlaying endpoint showing only the last play 2021-06-20 10:39:19 -04:00
Deluan f8ee6db72a New implementation of NowPlaying 2021-06-20 10:39:16 -04:00
Deluan c09468e135 Option to allow auto-login during development. 2021-06-19 10:56:39 -04:00
Deluan 31ea033880 Fix subsonic token when authenticating by Header 2021-06-18 19:00:13 -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 d42dfafad4 Add username to request.Context 2021-06-18 18:28:51 -04:00
Deluan 86271f0412 Optimize refresh events for scrobble endpoint 2021-06-16 10:23:34 -04:00
Deluan fb7229a53e Refech using getMany, reducing the number of API calls 2021-06-16 10:01:09 -04:00
Deluan 521d1ff2bf Disable `realip` middleware when using the reverse proxy authentication feature
Should fix https://github.com/navidrome/navidrome/pull/1152#issuecomment-862306847
2021-06-16 10:01:09 -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 8383527aab Only refetch changed resources when receive a "refreshResource" event 2021-06-15 16:12:13 -04:00
Deluan 667701be02 Less `warning` messages when first running it.
They are actually `info` messages
2021-06-13 19:27:01 -04:00
Deluan 59b99d2206 No need to check for first time when authenticating. One less SQL call per request 2021-06-13 19:26:25 -04:00
Deluan d54129ecd2 Rename `app` package to `nativeapi` 2021-06-13 19:15:41 -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
Igor Rzegocki 6bd4c0f6bf
Reverse proxy authentication support (#1152)
* feat(auth): reverse proxy authentication support - #176

* address PR remarks

* Fix redaction of UI appConfig

Co-authored-by: Deluan <deluan@navidrome.org>
2021-06-11 23:17:21 -04:00
Deluan e31802d2d3 Only send "refresh" event if `SetRating` was successful 2021-06-10 15:03:30 -04:00
Deluan cefc939909 Trigger UI refresh on media annotation events: `star`, `setRating` and `scrobble` 2021-06-10 12:20:52 -04:00
Deluan 7f85ecd515 Trigger a UI refresh when the scanner finds changes.
Closes #1025
2021-06-09 21:02:20 -04:00