Commit Graph

98 Commits

Author SHA1 Message Date
Aleksey Lobanov 457e1fc97b
Base SQL metrics in MetricsWorker (#2002)
* feat: Add metrics worker

* refactor: Add todos for useful for metrics methods

* feat: Run MetricsWorker is Prometheus is Enabled

* refactor: Unused low-level variable was removed in metrics

* feat: No worker for metrics, add more

* refactor: Unnecessary todo removed

* refactor: Remove dead unused constant

* Reduce metrics public interface

Co-authored-by: Deluan <deluan@navidrome.org>
2023-01-24 19:26:07 -05:00
Deluan d0dceae094 Add `getShares` and `createShare` Subsonic endpoints 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 adea15ab93 Use constant 2023-01-20 16:01:16 -05:00
Deluan 3f2d24695e PreCache artist images 2023-01-13 22:18:34 -05:00
Deluan 387acc5f63 Add public endpoint to expose images 2023-01-13 22:18:34 -05:00
Deluan df0f140f9f Don't refresh smart playlists when generating covers 2023-01-01 20:28:03 -05:00
Deluan cc14485194 When trying to PreCache, wait for ImageCache to be available 2022-12-28 23:26:39 -05:00
Deluan 61e5523457 Handle "naked" CoverArtIDs (IDs of album, mediafiles and playlists) 2022-12-28 15:31:56 -05:00
Deluan c1c4645501 Move artwork handling to its own package 2022-12-28 15:31:56 -05:00
Deluan b6eb60f019 Add new Artwork Cache Warmer 2022-12-28 15:31:56 -05:00
Deluan 57c3334ea0 Remove unused `DevPreCacheAlbumArtwork` config option 2022-12-28 15:31:56 -05:00
Deluan 92b42b35b3 Fallback extracting tags using ffmpeg 2022-12-28 15:31:56 -05:00
Deluan 0da27e8a3f Add image cache back 2022-12-28 15:31:56 -05:00
Deluan 38bde0ddba Remove current Image Cache implementation 2022-12-28 15:31:56 -05:00
Deluan 28389fb05e Add command line M3U exporter. Closes #1914 2022-12-21 14:39:40 -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 68ceeb9ea1 Fix build for non-unix 2022-12-03 10:42:36 -05:00
Deluan 4549b91ae0 Fix build for non-unix 2022-12-02 20:39:44 -05:00
Deluan 9ffd145e82 Add log for signal received 2022-12-02 20:30:30 -05:00
Deluan 03640ca93d Fix background images when BaseURL is specified 2022-11-29 14:48:05 -05:00
Deluan 195f39182d Host default login background images in Navidrome's own website 2022-11-27 21:37:33 -05:00
Deluan 1b5f855bff Compress more http content-types.
Also, some minor refactoring
2022-11-26 13:13:05 -05:00
Deluan cd41d9a419 Shutdown gracefully, close DB connection 2022-11-21 12:28:09 -05:00
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
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 0d8eaa2878 Remove experimental version of `context` package 2022-07-26 16:41:10 -04:00
Ian Kerins ce0db8344b
Fix signaler not exiting on cancel (#1638)
* fix: make signaler exit on cancel

`break` is incorrect here, as it just breaks out of the select.
`return` to exit the function instead.

Fixes #1636.

Signed-off-by: Ian Kerins <ianskerins@gmail.com>

* fix: exit non-zero on fatal error

Signed-off-by: Ian Kerins <ianskerins@gmail.com>
2022-03-30 10:04:17 -04:00
Steve Richter 3bd6f82c80
Rename ListenBrainz config flag and enable by default (#1443) 2021-11-17 21:11:53 -05: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 af00503b77 Optimize playlist updates 2021-10-26 10:45:14 -04:00
Deluan 1a96e9fe65 Import smart playlists (extension .nsp) 2021-10-23 20:25:28 -04:00
Deluan Quintão 91e36a2c18
Check goimports in the pipeline (#1381)
* Check goimports in the pipeline

* Check goimports in the pipeline

* Check goimports in the pipeline

* go mod tidy

* wip

* wip

* Fix goimports and go:build tags

* Run golangci-lint before goimports
2021-10-01 15:32:24 -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
Samarjeet 0c0bd2967d
Replace expanded with a dialog (#1258)
* Replace expanded with a dialog

* Change `info` label to "Get Info"

* Rename things for consistency

Co-authored-by: Deluan <deluan@navidrome.org>
2021-09-20 20:30:43 -04:00
Deluan 344d7a4392 Inject DB into DataStore, instead of hardcode the dependency 2021-07-31 20:15:20 -04:00
Deluan 1f0314021e Change initial scan message log level 2021-07-19 16:53:58 -04:00
Deluan cfb113bd33 Disable Last.FM features based on `LastFM.Enabled` config option 2021-07-02 10:04:41 -04:00
Deluan 289da56f64 Implement Scrobble buffering/retrying 2021-07-02 10:04:41 -04:00
Deluan 056f0b944f Refactor: Consolidate scrobbling logic in play_tracker 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 502a719e96 Implement Last.FM Desktop Auth flow endpoints 2021-06-21 18:14:01 -04:00
Deluan f8ee6db72a New implementation of NowPlaying 2021-06-20 10:39:16 -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
Deluan cefc939909 Trigger UI refresh on media annotation events: `star`, `setRating` and `scrobble` 2021-06-10 12:20:52 -04:00