Commit Graph

235 Commits

Author SHA1 Message Date
Aleksey Lobanov 552989a05b
Add basic Prometheus metrics handler (#1830)
* feat: Add Prometheus configuration options

* feat: Add Prometheus metrics handler

* build: prometheus became direct dependency

* docs: change description for prometheus metrics path
2022-10-02 19:59:53 -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
Deluan 20cdd38fc4 Better logging for agents configuration 2021-11-25 15:48:32 -05:00
Steve Richter 3bd6f82c80
Rename ListenBrainz config flag and enable by default (#1443) 2021-11-17 21:11:53 -05:00
Deluan b2acec0a09 When externals services are disabled, only disable UILoginBackgroundURL if it is not set by the user 2021-11-01 09:11:32 -04:00
Deluan 1823159b25 New config to disable all external integrations. Closes #102 2021-10-30 18:03:46 -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 0d2a8f5338 Enable new Artist Page by default 2021-10-17 11:07:59 -04:00
Deluan 2b105ca77b Enable DevSidebarPlaylists by default.
Closes #771
2021-10-02 13:56:42 -04:00
Deluan 6752e0a17d Fix harmless error message in logs when ScanSchedule set was "0"
Message:
`ERRO[0000] Error scheduling periodic scan                error="expected exactly 5 fields, found 1: [0]"`
2021-09-26 15:57:27 -04:00
Dnouv 482c2dec0c
Artist Detail Page (first cut) (#1287)
* Configure fetching from API and route

* pretty

* Remove errors

* Remove errors

* Remove errors

* Complete page for Desktop view

* Fix error

* Add xs Artist page

* Remove unused import

* Add styles for theme

* Change route path

* Remove artId useEffect array

* Remove array

* Fix cover load err

* Add redirect on err

* Remove route

* What's in a name? consistency :)

* Fix err

* Fix UI changes

* Fetch album from resource

* Renaming done

* Review changes

* Some touch-up

* Small refactor, to make naming and structure more consistent with AlbumShow

* Make artist's album list similar to original implementation

* Reuse AlbumGridView, to avoid duplication

* Add feature flag to enable new Artist Page, default false

* Better biography styling. Small refactorings,

* Don't encode quotes and other symbols

* Moved AlbumShow to correct folder

Co-authored-by: Deluan <deluan@navidrome.org>
2021-09-26 15:32:40 -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
Deluan Quintão 79363d6c07
Move Playlists to the sidebar menu (#1339)
* Show playlists in sidebar menu

* Fix menu

* Refresh playlist submenu when adding new playlist

* Group shared playlists below user's playlists

* Fix text overflow in menu options

* Add button in playlist menu to go to Playlists list

* Add config option `DevSidebarPlaylists` to enable this feature (default false)
2021-09-11 13:11:15 -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 b44ef81c6f Allow `0` value to disable ScanSchedule.
Seems that Viper does not recognize empty environment vars as valid values

Closes #1274
2021-08-03 19:37:36 -04:00
Deluan 4ed01bad86 Use `ffmpeg` extractor by default on Windows
This is to avoid issue with unicode chars in filenames. See #810
2021-07-24 11:35:49 -04:00
Deluan 4f9d546da4 Abort startup if config file is invalid 2021-07-20 22:35:22 -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 19c2ef3803 Enable buffered scrobbles by default 2021-07-19 16:10:37 -04:00
Deluan f78257235e Add option to have different loglevels per source folder/file 2021-07-14 18:44:14 -04:00
Deluan 94e36d7f60 Remove old feature flag for cache layout 2021-07-02 10:04:41 -04:00
Deluan f49205733b Add feature flag for buffered scrobbling 2021-07-02 10:04:41 -04:00
Deluan cfb113bd33 Disable Last.FM features based on `LastFM.Enabled` config option 2021-07-02 10:04:41 -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 d2fcab78a5 Fix ND_DEVFASTACCESSCOVERART flag not available as env var 2021-06-26 15:40:12 -04:00
Deluan 26bcf0b877 Enable Last.fm scrobbling by default (still requires user's authorization) 2021-06-25 23:09:09 -04:00
Deluan 1f997357a9 Expose Last.fm's ApiKey to UI 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 c09468e135 Option to allow auto-login during development. 2021-06-19 10:56:39 -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 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 ead2095dd0 Respect EnableLogRedacting config when pretty printing configuration 2021-05-30 16:02:23 -04:00
Yash Jipkate 7b05c49215
Add devEnableShare config option (#1141)
* add devEnableShare config option

* Toggle in config.js
2021-05-30 15:36:10 -04:00
Deluan b398053223 Include a shared Last.FM api key, providing zero conf ArtistInfo (bio/top songs/similar artists) 2021-05-27 16:14:24 -04:00
Deluan 39d68e8287 Restore pretty formatted config options in debug level 2021-05-12 14:43:09 -04:00
Deluan 751e2d6147 Make ScanInterval=0 disable the periodic scan 2021-05-12 14:08:38 -04:00
Deluan 47f4e0a4de Refactor to remove some nesting 2021-05-06 20:49:26 -04:00
Deluan f8dbc41b6d Breaking change: Add `ScanSchedule`, allows interval and cron based configurations.
See https://pkg.go.dev/github.com/robfig/cron#hdr-CRON_Expression_Format for expression syntax.

`ScanInterval` will still work for the time being. The only situation it does not work is when you want to disable periodic scanning by setting `ScanInterval=0`. If you want to disable it, please set `ScanSchedule=""`

Closes #1085
2021-05-06 17:56:10 -04:00
Deluan 7feda4bea4 Add `EnableUserEditing`, to control whether a regular user can change their own details (default `true`) 2021-05-02 17:11:12 -04:00
Deluan 2ff1c79b64 Fix `EnableLogRedacting` case 2021-05-02 16:49:20 -04:00
Deluan cfbc39fb7f Add log redacting, controlled by the new `EnableLogRedacting` config option (default `true`)
Imported redacting code from https://github.com/whuang8/redactrus (thanks William Huang)
Didn't use it as a dependency as it was too small and we want to keep dependencies at a minimum
2021-05-02 16:45:16 -04:00
Deluan f63a912341 Add config option to set default theme 2021-04-18 13:51:00 -04:00
Neil Chauhan 48ae4f7479
Add 5-star rating system(#986)
* Added Star Rating functionality for Songs

* Added Star Rating functionality for Artists

* Added Star Rating functionality for AlbumListView

* Added Star Rating functionality for AlbumDetails and improved typography for title

* Added functionality to turn on/off Star Rating functionality for Songs

* Added functionality to turn on/off Star Rating functionality for Artists

* Added functionality to turn on/off Star Rating functionality for Albums

* Added enableStarRating to server config

* Resolved the bugs and improved the ratings functionality.

* synced repo and removed duplicate key

* changed the default rating size to small, and changed the color to match the theme.

* Added translations for ratings, and Top Rated tab in side menu.

* Changed rating translation to topRated in albumLists, and added has_rating filter to topRated.

* Added empty stars icon to RatingField.

* Added sortable=false in AlbumSongs and added sortByOrder=DESC in all List components.

* Added translations for rating, for artists and albums, and removed the sortByOrder=DESC from SimpleLists.
2021-04-07 16:02:52 -04:00
Neil Chauhan 404253a881
Enable turn on/off Favorites/Loved feature. (#917)
* Added option to enable/disable favorites in Song

* Added option to enable/disable favorites in Artist

* Added option to enable/disable favorites in Albums and Favorites tab in sidebar

* Added option to enable/disable favorites in Player

* Set default value of enableFavourites as true

* Improved the functionality to enable/disable Favorites

* Add `EnableFavourites` config option

Co-authored-by: Deluan <deluan@navidrome.org>
2021-03-28 20:35:49 -04:00
Deluan 4b68260b83 Move constant to `consts.go` file 2021-03-24 10:21:31 -04:00
Deluan 720e2357b7 Add option to sort Recently Added by file's mtime instead of time of import. 2021-03-12 18:18:35 -05:00
Deluan 9d24106066 Incomplete implementation of agents 2021-02-08 16:54:51 -05:00