Deluan
ef4765c768
Fix getShares sort order
2023-01-24 18:36:47 -05:00
Deluan
6c05fcb699
Create contents label for group of shared mediafiles
2023-01-24 18:36:47 -05:00
Deluan
e34f26588e
Fix empty `entry` collection in Shares
2023-01-24 18:36:47 -05:00
Deluan
d5df102f9f
Implement `updateShare` and `deleteShare` Subsonic endpoints
2023-01-24 18:36:46 -05:00
Deluan
d4c1d2ece4
Handle expired shares
2023-01-24 18:36:46 -05:00
Deluan
d0dceae094
Add `getShares` and `createShare` Subsonic endpoints
2023-01-24 18:36:46 -05:00
Deluan
94cc2b2ac5
Fix tests and lint errors, plus a bit of refactor
2023-01-24 18:36:46 -05:00
Deluan
12bb6c3847
Don't expose empty dates in share info
2023-01-24 18:36:46 -05:00
Deluan
364fdfbd8d
Use defaultDownsamplingFormat in share options
2023-01-24 18:36:45 -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
136d5f9a83
Add config option to show album participations under artists in Subsonic clients
2023-01-18 14:20:06 -05:00
Deluan
701e301d48
Increase timeout for obtaining login background image list
2023-01-17 22:57:14 -05:00
Kendall Garner
93adda66d9
Get album info (when available) from Last.fm, add getAlbumInfo endpoint ( #2061 )
...
* lastfm album.getInfo, getAlbuminfo(2) endpoints
* ... for description and reduce not found log level
* address first comments
* return all images
* Update migration timestamp
* Handle a few edge cases
* Add CoverArtPriority option to retrieve albumart from external sources
* Make agents methods more descriptive
* Use Last.fm name consistently
Co-authored-by: Deluan <deluan@navidrome.org>
2023-01-17 20:22:54 -05:00
Kendall Garner
1324a16fc5
ReplayGain support + audio normalization (web player) ( #1988 )
...
* ReplayGain support
- extract ReplayGain tags from files, expose via native api
- use metadata to normalize audio in web player
* make pre-push happy
* remove unnecessary prints
* remove another unnecessary print
* add tooltips, see metadata
* address comments, use settings instead
* remove console.log
* use better language for gain modes
2023-01-17 15:57:19 -05:00
Deluan
e40da183bb
Move artwork id encoding to public package
2023-01-16 15:24:25 -05:00
Deluan
c748d669d6
Sort radio stations by name
2023-01-15 16:12:22 -05:00
Deluan
a8478ca74c
Fix Subsonic XML Internet Radio response
2023-01-15 15:38:38 -05:00
Kendall Garner
8877b1695a
Add Internet Radio support ( #2063 )
...
* add internet radio support
* Add dynamic sidebar icon to Radios
* Fix typos
* Make URL suffix consistent
* Fix typo
* address feedback
* Don't need to preload when playing Internet Radios
* Reorder migration, or else it won't be applied
* Make Radio list view responsive
Also added filter by name, removed RadioActions and RadioContextMenu, and added a default radio icon, in case of favicon is not available.
* Simplify StreamField usage
* fix button, hide progress on mobile
* use js styles over index.css
Co-authored-by: Deluan <deluan@navidrome.org>
2023-01-15 15:11:37 -05:00
Deluan
dfbf86c577
Allow any HTTP methods for public images endpoint. Fix artist covers in Subtracks
2023-01-14 10:17:21 -05:00
Deluan
16c869ec86
Optimize playlist cover generation
2023-01-13 22:18:34 -05:00
Deluan
c46a2a5f5f
New dev options to control getCoverArt throttling
2023-01-13 22:18:34 -05:00
Deluan
69e0a266f4
Remove size from public image ID JWT
2023-01-13 22:18:34 -05:00
Deluan
77a99a735b
Always access artist images through Navidrome (proxy calls to external URLs)
2023-01-13 22:18:34 -05:00
Deluan
918fee3ea3
Artwork reader for Artist
2023-01-13 22:18:34 -05:00
Deluan
bf461473ef
Add local agent, only for 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
7fbcb2904a
Add function number.RandomInt64
2023-01-13 21:40:24 -05:00
Deluan
fdbece5c92
Use custom sanitize package, fix #2070
2023-01-12 13:39:05 -05:00
Deluan
df0f140f9f
Don't refresh smart playlists when generating covers
2023-01-01 20:28:03 -05:00
Deluan
950cc28e67
Add coverArt to Subsonic playlist response
2023-01-01 19:35:19 -05:00
Deluan
6260927074
Serve artist placeholder directly, instead of using LastFM's CDN
2022-12-30 20:14:03 -05:00
Deluan
61e5523457
Handle "naked" CoverArtIDs (IDs of album, mediafiles and playlists)
2022-12-28 15:31:56 -05:00
Deluan
332900774d
Rename DevFastAccessCoverArt to EnableMediaFileCoverArt
2022-12-28 15:31:56 -05:00
Deluan
722a00cacf
Fix artwork caching
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
045b023b35
Fix `DevFastAccessCoverArt` flag
2022-12-28 15:31:56 -05:00
Deluan
a087f57d2d
Handle request (context) cancellation
2022-12-28 15:31:56 -05:00
Deluan
9fcd1c9354
Make internal method unexported
2022-12-28 15:31:56 -05:00
Deluan
92b42b35b3
Fallback extracting tags using ffmpeg
2022-12-28 15:31:56 -05:00
Deluan
abd3274250
Handle empty cover art ID in subsonic API
2022-12-28 15:31:56 -05:00
Deluan
c430401ea9
Remove current artwork implementation
2022-12-28 15:31:56 -05:00
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
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
6c4a0be6ff
Add endpoints in Subsonic API logs
2022-12-14 10:52:46 -05:00
Deluan
982b604500
Add username to authenticated log messages
2022-12-14 09:35:30 -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
Deluan
0cc1db54d4
Bump github.com/bradleyjkemp/cupaloy to v2.8.0
2022-12-05 22:45:02 -05:00
Deluan
03640ca93d
Fix background images when BaseURL is specified
2022-11-29 14:48:05 -05:00
Deluan
950b5dc1ce
Remove `math/rand` and only use `crypto/rand`
2022-11-27 21:53:13 -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
19af11efbe
Simplify Subsonic API handler implementation
2022-11-21 12:57:56 -05:00
Deluan
cd41d9a419
Shutdown gracefully, close DB connection
2022-11-21 12:28:09 -05:00
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 bfeb8ef6b3
.
...
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
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
c6868ff8a0
Don't show Artist Page for "Various Artists"
2021-09-27 11:52:23 -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
caiocotts
210dc6b12e
Add x-total-count to Subsonic API getAlbumList ( #1360 )
...
* Add x-total-count to Subsonic API getAlbumList
* Rename variable
Co-authored-by: Deluan <deluan@navidrome.org>
2021-09-21 20:40:39 -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
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