500 Commits

Author SHA1 Message Date
Deluan
ffbc1cebd4
Associate main entities with library 2026-01-02 20:36:57 +00:00
Deluan
82e79073cd
Store MusicFolder as a library in DB 2026-01-02 20:36:57 +00:00
Deluan
b0f6a395a8
Rename MediaFolder to Library 2026-01-02 20:36:57 +00:00
Deluan
d68cdac3d2
Do not panic if when updatePlaylist is called with a non-existent ID.
Fix #2876
2026-01-02 20:36:55 +00:00
Deluan
df22d69765
Simplify normalized AlbumPlayCountMode calc 2026-01-02 20:36:55 +00:00
Deluan
5be6dfc54b
Clean up runNavidrome function 2026-01-02 20:36:55 +00:00
Deluan Quintão
9e9f72ae8a
Make sorting lists by name/title case-insensitive (#2993)
* Make sort by order_* fields case-insensitive.

* Sort internet radios by name case-insensitive
2026-01-02 20:36:55 +00:00
Deluan
7500b17eb1
Fix ambiguous column when sorting media_files by created_at.
Fix #3006
2026-01-02 20:36:54 +00:00
Deluan
33c96640e8
Fix PlaylistTracks's loadAllGenres. Fix #2988 2026-01-02 20:35:32 +00:00
Deluan
ad2a40a712
Fix AlbumPlayCountMode. Closes #2984 2026-01-02 20:35:32 +00:00
Deluan
786a65aa07
Refactor loadGenres, remove duplication 2026-01-02 20:35:32 +00:00
Deluan
ad4918135d
Refactor DB Album mapping to model.Album 2026-01-02 20:35:32 +00:00
Deluan
e95e88950c
Add tests for AlbumPlayCountMode, change the calc to match the request from #1032 2026-01-02 20:35:32 +00:00
Deluan
054475a127
Add tests for AlbumPlayCountMode 2026-01-02 20:35:32 +00:00
vvdveen
60209152ec
Add AlbumPlayCountMode config option (#2803)
Closes #1032

* feat(album_repository.go): add kodi-style album playcount option - #1032

Signed-off-by: Victor van der Veen <vvdveen@gmail.com>

* fix format issue and remove reference to kodi (now normalized)

Signed-off-by: Victor van der Veen <vvdveen@gmail.com>

* reduced complexity but added rounding

Signed-off-by: Victor van der Veen <vvdveen@gmail.com>

* Use constants for AlbumPlayCountMode values

---------

Signed-off-by: Victor van der Veen <vvdveen@gmail.com>
Co-authored-by: Deluan <deluan@navidrome.org>
2026-01-02 20:35:32 +00:00
Deluan
d46740771c
Fix scrobble error spam in the logs.
Relates to #2831 and #2975
2026-01-02 20:35:04 +00:00
Deluan
cd805d24da
Block regular users from changing their own playlists ownership 2026-01-02 20:35:03 +00:00
looklose
217b92c40a
Fix function name in comment (#2947)
Signed-off-by: looklose <shishuaiqun@yeah.net>
2026-01-02 20:35:02 +00:00
Deluan
a0bac6c068
Send Subsonic formatted response on marshalling errors 2026-01-02 20:33:14 +00:00
Deluan
2ec9f6166e
Use order/sort album/artist when sorting tracks in playlists. Fixes #2819 2026-01-02 20:32:59 +00:00
Deluan
48751c0936
Add tests for toSQL 2026-01-02 20:32:59 +00:00
caiocotts
61653f15ad
Fix fields not being sent on getPlaylist.view responses. 2026-01-02 20:32:59 +00:00
Deluan
7d33f15eaa
Remove offset and limit from count queries. Fixes #2443 2026-01-02 20:32:58 +00:00
Deluan
020f9db5bd
Add log message to try to capture error in #2735 2026-01-02 20:32:58 +00:00
Deluan
faed89622d
Fix ReplayGain values not being retrieved from DB 2026-01-02 20:32:37 +00:00
Deluan
1423b44600
Fix PreferSortTags 2026-01-02 20:32:35 +00:00
Deluan
a821c35367
Add context to SQL queries, enabling cancellation 2026-01-02 20:32:35 +00:00
Deluan Quintão
e8861b22a0
Add new PrefSortTags option (#2696) 2026-01-02 20:32:24 +00:00
Deluan
70148afc63
Convert internal disc number representation to int 2026-01-02 20:31:57 +00:00
Deluan
d9ce8b54f0
Add discs to album 2026-01-02 20:31:57 +00:00
Deluan Quintão
274ad1f7d5
Replace beego/orm with dbx (#2693)
* Start migration to dbx package

* Fix annotations and bookmarks bindings

* Fix tests

* Fix more tests

* Remove remaining references to beego/orm

* Add PostScanner/PostMapper interfaces

* Fix importing SmartPlaylists

* Renaming

* More renaming

* Fix artist DB mapping

* Fix playlist updates

* Remove bookmarks at the end of the test

* Remove remaining `orm` struct tags

* Fix user timestamps DB access

* Fix smart playlist evaluated_at DB access

* Fix search3
2026-01-02 20:31:57 +00:00
Deluan
1caef8dc8c
Return genres in bookmark endpoints (OpenSubsonic) 2026-01-02 20:31:56 +00:00
Deluan
417748fe46
Coalesce null annotation values, to better rank them against annotations with value 0 2026-01-02 20:31:56 +00:00
Deluan Quintão
8b14b41e54
Optimize search3, by removing OFFSET when paginating (#2655)
* Optimize pagination, removing offset

* For search, don't add `where` clause for empty queries

* Revert "Replace `COUNT(DISTINCT primary_key)` with `COUNT(*)`"

Genres are required as part of the count queries, so filter by genres work

* Optimize search3 query, using order by id if it is a "" query.

Also fix the optimizePagination query logic

* Allow offset optimizer threshold to be configured
2026-01-02 20:31:30 +00:00
Deluan
bc2461d974
Revert "Replace COUNT(DISTINCT primary_key) with COUNT(*)"
Genres are required as part of the count queries, so filter by genres work
2026-01-02 20:31:30 +00:00
Deluan
a8aa05373d
Replace COUNT(DISTINCT primary_key) with COUNT(*) 2026-01-02 20:31:30 +00:00
Deluan
0887f19708
Show SQL errors in queryAll 2026-01-02 20:31:30 +00:00
Deluan
062889a88a
Generalize BreakUp/RangByChunks functions 2026-01-02 20:31:30 +00:00
Caio Cotts
94eefe62df
Return genres in search3 endpoint. 2026-01-02 20:31:12 +00:00
Kendall Garner
4745950eb9
Do not empty old artist metadata (#2423) 2026-01-02 20:29:59 +00:00
Deluan
edb75f268f
Move string slice functions to slice package as generic functions 2026-01-02 20:27:26 +00:00
Deluan
f80e628442
Order albums by full original date (this time is for real). Fixes #1452 2026-01-02 20:27:26 +00:00
Deluan
cff7d5ccfc
Order albums by full original date. Fixes #1452 2026-01-02 20:27:26 +00:00
certuna
3d1228db3b
Support for Original Date, Release Date & splitting/grouping of album editions (#2162)
* Update AlbumGridView.js

* Update AlbumDetails.js

* Update AlbumDetails.js

* Create DoubleRangeField.js

* Update and rename DoubleRangeField.js to RangeFieldDouble.js

* Update RangeFieldDouble.js

* Update AlbumGridView.js

* Update AlbumDetails.js

* Update RangeFieldDouble.js

* Update index.js

* Update RangeFieldDouble.js

* Update RangeFieldDouble.js

* Update RangeFieldDouble.js

* Update RangeFieldDouble.js

* Update RangeFieldDouble.js

* Update AlbumDetails.js

* Update RangeFieldDouble.js

* Update AlbumDetails.js

* Update RangeFieldDouble.js

* Update AlbumDetails.js

* Update RangeFieldDouble.js

* Update RangeFieldDouble.js

* Update AlbumDetails.js

* Update AlbumDetails.js

* Update RangeFieldDouble.js

* Update RangeFieldDouble.js

* Update AlbumDetails.js

* Update RangeFieldDouble.js

* Update AlbumDetails.js

* Update en.json

* Update en.json

* Update AlbumDetails.js

* Update RangeFieldDouble.js

* Update AlbumGridView.js

* Update AlbumDetails.js

* Update AlbumSongs.js

* Update ContextMenus.js

* Update SongDatagrid.js

* Update AlbumSongs.js

* Update SongDatagrid.js

* Update SongDatagrid.js

* Update SongDatagrid.js

* Update AlbumSongs.js

* Update SongList.js

* Update playlist_track_repository.go

* Update 20230113000000_release_year.go

* Update PlayButton.js

* Update mediafile_repository.go

* Update album.go

* Update playlist_track_repository.go

* Update playlist_track_repository.go

* Update SongDatagrid.js

* Update 20230113000000_release_year.go

* Update SongDatagrid.js

* Update AlbumSongs.js

* Update SongDatagrid.js

* Update SongDatagrid.js

* Update SongDatagrid.js

* Update SongDatagrid.js

* Update AlbumDetails.js

* Update AlbumSongs.js

* Update AlbumSongs.js

* Update RangeFieldDouble.js

* Update SongDatagrid.js

* Update 20230113000000_release_year.go

* Update 20230113000000_release_year.go

* Update 20230113000000_release_year.go

* Update 20230113000000_release_year.go

* Update AlbumSongs.js

* Update AlbumSongs.js

* Update mapping.go

* Update RangeFieldDouble.js

* Update AlbumGridView.js

* Update AlbumSongs.js

* Update en.json

* Update SongDatagrid.js

* Update SongDatagrid.js

* Update metadata.go

* Update mapping.go

* Update AlbumDetails.js

* Update AlbumGridView.js

* Update RangeFieldDouble.js

* Update mapping.go

* Update metadata.go

* Update mapping.go

* Update AlbumDetails.js

* Update 20230113000000_release_year.go

* Update AlbumDetails.js

* Update en.json

* Update configuration.go

* Update mapping.go

* Update configuration.go

* Update mediafile.go

* Update metadata.go

* Update RangeFieldDouble.js

* Update 20230113000000_release_year.go

* Update configuration.go

* Update mapping.go

* Update mediafile.go

* Update mapping.go

* Update RangeFieldDouble.js

* Update RangeFieldDouble.js

* Update RangeFieldDouble.js

* Update RangeFieldDouble.js

* Update RangeFieldDouble.js

* Update 20230113000000_release_year.go

* Update AlbumDetails.js

* Update RangeFieldDouble.js

* Update mapping.go

* Update metadata.go

* Update album.go

* Update mediafile.go

* Update mediafile.go

* Update album.go

* Update fields.go

* Update mediafile_repository.go

* Update playlist_track_repository.go

* Update AlbumSongs.js

* Update SongDatagrid.js

* Update PlayButton.js

* Update SongList.js

* Update ContextMenus.js

* Update SongDatagrid.js

* Update metadata.go

* Update ArtistShow.js

* Update mapping.go

* Update configuration.go

* Update mapping.go

* Update metadata.go

* Update metadata.go

* Update mapping.go

* Update metadata.go

* Update metadata.go

* Update mapping.go

* Update 20230113000000_release_year.go

* Update 20230113000000_release_year.go

* Update mapping.go

* Update metadata.go

* Update metadata.go

* Update album.go

* Update mediafile.go

* Update AlbumDetails.js

* Update AlbumSongs.js

* Update album.go

* Update mediafile.go

* Update metadata.go

* Update mediafile.go

* Update 20230113000000_release_year.go

* Update 20230113000000_release_year.go

* Update album.go

* Update mediafile.go

* Update RangeFieldDouble.js

* Update AlbumDetails.js

* Update AlbumGridView.js

* Update en.json

* Update AlbumGridView.js

* Update RangeFieldDouble.js

* Update and rename 20230113000000_release_year.go to 20230113000000_release_date.go

* Update album.go

* Update mediafile.go

* Update fields.go

* Update playlist_track_repository.go

* Update mediafile_repository.go

* Update mapping.go

* Update metadata.go

* Update mapping.go

* Update SongDatagrid.js

* Update RangeFieldDouble.js

* Update index.js

* Update ContextMenus.js

* Update PlayButton.js

* Create FormatDate.js

* Update SongList.js

* Update AlbumDetails.js

* Update AlbumSongs.js

* Update AlbumSongs.js

* Update en.json

* Update AlbumDetails.js

* Update album.go

fixed conflict I think?

* Update mediafile.go

fixed conflict

* Format with goimports

* Update SongDatagrid.js

only show Cat # in desktop view

* Update metadata_internal_test.go

* Update metadata_test.go

* Delete test.mp3

* Add files via upload

mp3 test file with Date, Original Date and Release Date

* Update metadata_test.go

* Update metadata_test.go

* Update metadata_test.go

* Update metadata_test.go

* Update taglib_test.go

* Delete test.mp3

* Add files via upload

file with replaygain & dates

* Update AlbumGridView.js

* Update AlbumDetails.js

* Update AlbumSongs.js

* Update ContextMenus.js

* Update FormatDate.js

* Update PlayButton.js

* Update RangeFieldDouble.js

* Update SongDatagrid.js

* Update AlbumSongs.js

* Update SongDatagrid.js

* Update AlbumSongs.js

* Fix formatting

* Update mapping.go

* Update AlbumSongs.js

* Update SongDatagrid.js

* Update SongDatagrid.js

prettier

* Create RangeDoubleField.js

rename of RangeFieldDouble.js

* Update AlbumGridView.js

RangeFieldDouble -> RangeDoubleField

* Update mediafile.go

AllOrNothing() -> allOrNothing()

* Update metadata_internal_test.go

getYear -> getDate

* Update AlbumDetails.js

wrote suggested changes

* Update en.json

Editions -> Releases & fixed the field name

* Update configuration.go

Rename Editions -> Releases

* Update 20230113000000_release_date.go

Editions -> Releases

* Update album.go

Editions -> Releases

* Update mediafile.go

Editions -> Releases

* Update AlbumDetails.js

Editions -> Releases

* Update AlbumSongs.js

Editions -> Releases

* Update RangeDoubleField.js

Editions -> Releases

* Update SongDatagrid.js

Editions -> Releases

* Update index.js

FormatFullDate and RangeDoubleField

* Rename FormatDate.js to FormatFullDate.js

* Delete RangeFieldDouble.js

* Update mediafile.go

AllOrNothing -> allOrNothing

* Update mapping.go

Editions -> Releases

* Update AlbumDetails.js

prettier

* Update SongDatagrid.js

showReleaseRow -> showReleaseDivider

* Update AlbumSongs.js

showReleaseRow -> showReleaseDivider for clarity

* Update and rename 20230113000000_release_date.go to 20230515184510_add_release_date.go

- rename the migration file
- fixed the import to goose/v3
- additional db fields for original date & year

* Update 20230515184510_add_release_date.go

* Update fields.go

* Update album.go

* Update mediafile.go

* Update mapping.go

* Update AlbumDetails.js

* Update en.json

* Update AlbumDetails.js

* Update AlbumDetails.js

now hopefully prettier

* Update mapping.go

---------

Co-authored-by: Deluan <deluan@navidrome.org>
2026-01-02 20:27:25 +00:00
Deluan
55c1d95376
Enable SQL migrations 2026-01-02 20:25:44 +00:00
Xidorn Quan
a46d8e1442
Update play_date on scrobble only when newer - #2262 (#2263)
* fix(persistence): Update play_date on scrobble only when newer - #2262

Signed-off-by: Xidorn Quan <me@upsuper.org>

* expand iff

---------

Signed-off-by: Xidorn Quan <me@upsuper.org>
2026-01-02 20:24:48 +00:00
Deluan
915423e241
Make playlist tracks match case-insensitive. Fix #1720 2026-01-02 20:24:14 +00:00
Deluan
6013e30f7b
Make ffmpeg path configurable, also finds it automatically in current folder. Fixes #1932 2026-01-02 20:22:41 +00:00
selfhoster1312
ee9212357e
Create accounts automatically when authenticating from HTTP header (#2087)
* Create accounts automatically when authenticating from HTTP header

* Disable password check when header auth is enabled

* Formatting

* Password change is valid when no password (old or new) is provided

* Test suite runs with header auth disabled (mock config)
Prevents nil pointer access (panic) while testing password validating logic

* Use a constant prefix for autogenerated passwords (header auth case)

* Add tests

* Add context to log messages

Co-authored-by: Deluan <deluan@navidrome.org>
2026-01-02 20:22:01 +00:00
Deluan
4f99addd02
Add Share to Context menus, also share artist 2026-01-02 20:22:00 +00:00