4262 Commits

Author SHA1 Message Date
Deluan Quintão
84dbd91083
feat(scanner): add library stats to DB (#4229)
* Combine library stats migrations

* test: verify full library stats

* Fix total_songs calculation

* Fix library stats migration

* fix(scanner): log elapsed time and number of libraries updated during scan

Signed-off-by: Deluan <deluan@navidrome.org>

* fix(scanner): refresh library stats conditionally, only if changes were detected

Signed-off-by: Deluan <deluan@navidrome.org>

* fix(scanner): refresh library stats conditionally, only if changes were detected

Signed-off-by: Deluan <deluan@navidrome.org>

* fix(scanner): update queries to exclude missing entries in library stats

Signed-off-by: Deluan <deluan@navidrome.org>

---------

Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-02 20:56:26 +00:00
Deluan
490e2187de
fix(scanner): improve folderEntry methods and hashing logic for better change detection
Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-02 20:56:25 +00:00
Deluan
65dd99816e
fix(ui): update AboutDialog styles and improve layout
Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-02 20:56:25 +00:00
Deluan
bbd6cb4779
chore(deps): go mod tidy
Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-02 20:56:24 +00:00
Deluan
961860648d
fix(ui): update title attribute for info icon in AppBar component
Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-02 20:55:55 +00:00
Deluan
c30782e99d
chore(deps): update Go dependencies to latest versions
Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-02 20:55:54 +00:00
Kendall Garner
5ddf938d44
fix(db): add user foreign key constraint to annotation table (#4211)
* fix(db): add user foreign key constraint to annotation table

Associates user_id with user.id, with cascade for delete (drop annotation) and update (update annotation).
Migration script will only copy/insert annotations for user IDs that exist

* remove default for user_id

* refactor(db): rename migration correct sequencing

Signed-off-by: Deluan <deluan@navidrome.org>

---------

Signed-off-by: Deluan <deluan@navidrome.org>
Co-authored-by: Deluan <deluan@navidrome.org>
2026-01-02 20:55:27 +00:00
Deluan Quintão
4b39d1066e
feat(ui): add EnableNowPlaying configuration (default true) (#4219)
* Add EnableNowPlaying config option

* Return 501 for disabled NowPlaying

* chore(tests): remove get_now_playing_route test

* Disable now playing events when disabled

* fix(tests): add mutex for thread-safe access to scrobble buffer

Signed-off-by: Deluan <deluan@navidrome.org>

---------

Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-02 20:55:27 +00:00
Deluan
8fe041dab2
fix(ui): always define config resource.
fixes #4224

Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-02 20:55:27 +00:00
Deluan Quintão
98b852fbdc
feat(scanner): add folder hash for smarter quick scan change detection (#4220)
* Simplify folder hash migration

* fix hashing lint

* refactor

Signed-off-by: Deluan <deluan@navidrome.org>

* Update scanner/folder_entry.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Signed-off-by: Deluan <deluan@navidrome.org>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-01-02 20:55:27 +00:00
Deluan
fcf0fdcd8b
fix(scanner): add 'album_artist' alias for albumartist
Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-02 20:55:27 +00:00
Deluan
da1ceeec37
fix(server): ensure single record per user by reusing existing playqueue ID
Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-02 20:55:27 +00:00
Deluan Quintão
c7334fa569
feat(server): add update and clear play queue endpoints to native API (#4215)
* Refactor queue payload handling

* Refine queue update validation

* refactor(queue): avoid loading tracks for validation

* refactor/rename repository methods

Signed-off-by: Deluan <deluan@navidrome.org>

* more tests

Signed-off-by: Deluan <deluan@navidrome.org>

* refactor

Signed-off-by: Deluan <deluan@navidrome.org>

---------

Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-02 20:55:27 +00:00
Deluan Quintão
d55e58e6b9
feat(server): allow multiple sort fields in smart playlists (#4214)
* allow multiple sort fields

* Handle invalid sort fields

* Update model/criteria/criteria.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-01-02 20:55:27 +00:00
Deluan
1bdc20ff4d
chore(deps): update Go version to 1.24.4
Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-02 20:55:27 +00:00
Deluan Quintão
b3dd6a29ce
feat(server): add index-based play queue endpoints to native API (#4210)
* Add migration converting playqueue current to index

* refactor

Signed-off-by: Deluan <deluan@navidrome.org>

* fix(queue): ensure valid current index and improve test coverage

Signed-off-by: Deluan <deluan@navidrome.org>

---------

Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-02 20:55:27 +00:00
Deluan Quintão
583b9c2c51
feat(ui): add Now Playing panel for admins (#4209)
* feat(ui): add Now Playing panel and integrate now playing count updates

Signed-off-by: Deluan <deluan@navidrome.org>

* fix: check return value in test to satisfy linter

* fix: format React code with prettier

* fix: resolve race condition in play tracker test

* fix: log error when fetching now playing data fails

Signed-off-by: Deluan <deluan@navidrome.org>

* feat(ui): refactor Now Playing panel with new components and error handling

Signed-off-by: Deluan <deluan@navidrome.org>

* fix(ui): adjust padding and height in Now Playing panel for improved layout

Signed-off-by: Deluan <deluan@navidrome.org>

* fix(cache): add automatic cleanup to prevent goroutine leak on cache garbage collection

Signed-off-by: Deluan <deluan@navidrome.org>

---------

Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-02 20:55:27 +00:00
Deluan Quintão
00754b11c6
feat(ui): add Play Artist's Top Songs button (#4204)
* ui: add Play button to artist toolbar

* refactor

Signed-off-by: Deluan <deluan@navidrome.org>

* test(ui): add tests for Play button functionality in ArtistActions

Signed-off-by: Deluan <deluan@navidrome.org>

* ui: update Play button label to Top Songs in ArtistActions

Signed-off-by: Deluan <deluan@navidrome.org>

---------

Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-02 20:55:26 +00:00
Deluan
abe0b54c16
fix(ui): artist buttons in spotify-ish
Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-02 20:55:26 +00:00
Deluan Quintão
9f6e89ef4b
feat(ui): Add Artist Radio and Shuffle options (#4186)
* Add Play Similar option

* Add pt-br translation for Play Similar

* Refactor playSimilar and add helper

* Improve Play Similar feedback

* Add artist actions bar with shuffle and radio

* Add Play Similar menu and align artist actions

* Refine artist actions and revert menu option

* fix(ui): enhance layout of ArtistActions and ArtistShow components

Signed-off-by: Deluan <deluan@navidrome.org>

* fix(i18n): revert unused changes

Signed-off-by: Deluan <deluan@navidrome.org>

* fix(ui): improve layout for mobile

Signed-off-by: Deluan <deluan@navidrome.org>

* fix(ui): improve error handling for fetching similar songs

Signed-off-by: Deluan <deluan@navidrome.org>

* fix(ui): enhance error logging for fetching songs in shuffle

Signed-off-by: Deluan <deluan@navidrome.org>

* refactor(ui): shuffle handling to use async/await for better readability

Signed-off-by: Deluan <deluan@navidrome.org>

* refactor(ui): simplify button label handling in ArtistActions component

Signed-off-by: Deluan <deluan@navidrome.org>

---------

Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-02 20:55:26 +00:00
Deluan
faf1a07f05
build(docker): downgrade Alpine version from 3.21 to 3.19, oldest supported version.
This is to reduce the image size, as we don't really need the latest.

Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-02 20:55:26 +00:00
Deluan Quintão
17a9034d1a
test: verify agents fallback (#4191) 2026-01-02 20:55:26 +00:00
Deluan Quintão
268906fe21
chore(deps): update TagLib to version 2.1 (#4185)
* chore: update cross-taglib

* fix(taglib): add logging for TagLib version

Signed-off-by: Deluan <deluan@navidrome.org>

---------

Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-02 20:55:26 +00:00
Deluan Quintão
6c46ddebdb
fix(ui): playlist details overflow in spotify-based themes (#4184)
* test: ensure playlist details width

* fix(test): simplify expectation for minWidth in NDPlaylistDetails

Signed-off-by: Deluan <deluan@navidrome.org>

* fix(test): test all themes

Signed-off-by: Deluan <deluan@navidrome.org>

---------

Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-02 20:55:26 +00:00
Deluan Quintão
5d413757d5
refactor(server): optimize top songs lookup (#4189)
* optimize top songs lookup

* Optimize title matching queries

* refactor: simplify top songs matching

* improve error handling and logging in track loading functions

Signed-off-by: Deluan <deluan@navidrome.org>

* test: add cases for fallback to title matching and combined MBID/title matching

Signed-off-by: Deluan <deluan@navidrome.org>

---------

Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-02 20:55:26 +00:00
Deluan Quintão
f212c4b66a
test(ui): fix warnings (#4187)
* fix(ui): address test warnings

* ignore lint error in test

Signed-off-by: Deluan <deluan@navidrome.org>

---------

Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-02 20:55:26 +00:00
Deluan
30918bd4a2
fix(scanner): normalize attribute strings and add edge case tests for PID calculation
Relates to https://github.com/navidrome/navidrome/issues/4183#issuecomment-2952729458

Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-02 20:55:26 +00:00
Deluan Quintão
6776af7be2
feat(ui): add song Love and Rating functionality to playlist view (#4134)
* feat(ui): add playlist track love button

Signed-off-by: Deluan <deluan@navidrome.org>

* feat(ui): add star rating feature for playlist tracks

Signed-off-by: Deluan <deluan@navidrome.org>

* fix(ui): handle loading state and error logging in toggle love and rating components

Signed-off-by: Deluan <deluan@navidrome.org>

---------

Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-02 20:55:26 +00:00
Deluan Quintão
15f28d8d93
fix(ui): update audio title link to include playlist support (#4175)
Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-02 20:55:26 +00:00
Deluan Quintão
241f605019
fix(subsonic): fix JukeboxRole logic in GetUser and eliminate code duplication (#4170)
- Fix GetUser JukeboxRole to properly respect AdminOnly setting

- Extract buildUserResponse helper to eliminate duplication between GetUser and GetUsers

- Fix username field inconsistency (GetUsers was using loggedUser.Name instead of UserName)

- Add comprehensive tests covering jukebox role permissions and consistency between methods

Fixes #4160
2026-01-02 20:55:26 +00:00
Patrick O'Shea
99865347e0
fix(jukebox): jukebox mode doesn't include MusicFolder (#4067)
* fix(configuration.go, mpv.go): Jukebox mode doesn't include MusicFolder in mpv command - #4066

The call to createMPVCommand is not including the MusicFolder path in
mpv command causing it to fail with file not found errors.

Updated default command template and createMPVCommand to use additional
substitution with conf.server.MusicFolder

Signed-off-by: Pat <patso.oshea@gmail.com>

* Revert config.go change, use filepath.Join for cross platform

* Update track.go with mf.AbsolutePath()

---------

Signed-off-by: Pat <patso.oshea@gmail.com>
Co-authored-by: Deluan <deluan@navidrome.org>
2026-01-02 20:55:25 +00:00
Deluan Quintão
d9d21ffdfd
fix(jukebox): fix mpv command and template parsing (#4162)
* test(mpv): add unit tests for MPV command generation and execution

Signed-off-by: Deluan <deluan@navidrome.org>

* fix(mpv): improve command template parsing

Signed-off-by: Deluan <deluan@navidrome.org>

* fix(mpv): update mock script to output arguments to stdout instead of a file

Signed-off-by: Deluan <deluan@navidrome.org>

* test(mpv): add test suite for MPV command functionality

Signed-off-by: Deluan <deluan@navidrome.org>

* fix(mpv): improve MPV command template parsing to handle quoted arguments

Signed-off-by: Deluan <deluan@navidrome.org>

* fix(mpv): simplify MPV command check by removing unnecessary string containment

Signed-off-by: Deluan <deluan@navidrome.org>

* fix(mpv): add error handling for empty command arguments and malformed templates

Signed-off-by: Deluan <deluan@navidrome.org>

---------

Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-02 20:55:25 +00:00
Kendall Garner
d4ffa6a3cd
fix(scanner): update prometheus at the end of the scan (#4163)
* fix(scannner): use prometheus instance over noop if configured properly

* Real Fix: move `WriteAfterScanMetrics` outside gofunc

* refactor: remove unused artwork.CacheWarmer param from CallScan function

Signed-off-by: Deluan <deluan@navidrome.org>

---------

Signed-off-by: Deluan <deluan@navidrome.org>
Co-authored-by: Deluan <deluan@navidrome.org>
2026-01-02 20:55:25 +00:00
Deluan
809282c2a8
fix(ui): improve layout and responsiveness of SelectPlaylistInput component
Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-02 20:55:25 +00:00
Deluan
bdb4931288
fix(server): don't override /song routes
Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-02 20:55:24 +00:00
Deluan
bf09b25102
fix(ui): make the height of the AddToPlaylistDialog static.
Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-02 20:54:44 +00:00
Deluan Quintão
cff81757a0
refactor: simplify configuration endpoint with JSON serialization (#4159)
* refactor(config): reorganize configuration handling

Signed-off-by: Deluan <deluan@navidrome.org>

* refactor(aboutUtils): improve array formatting and handling in TOML conversion

Signed-off-by: Deluan <deluan@navidrome.org>

* refactor(aboutUtils): add escapeTomlKey function to handle special characters in TOML keys

Signed-off-by: Deluan <deluan@navidrome.org>

* fix(test): remove unused getNestedValue function

* fix(ui): apply prettier formatting

---------

Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-02 20:54:36 +00:00
Deluan Quintão
47a131aa1d
fix(ui): add button is covered when adding to a playlist (#4156)
* refactor: fix SelectPlaylistInput layout and improve readability - Replace dropdown with fixed list to prevent button overlay - Break down into smaller focused components - Add comprehensive test coverage - Reduce spacing for compact layout

* refactor: update playlist input translations

Signed-off-by: Deluan <deluan@navidrome.org>

* fix: format code with prettier - Fix formatting issues in AddToPlaylistDialog.test.jsx

---------

Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-02 20:51:27 +00:00
Kendall Garner
6538796523
fix(ui): DevFlags order in TOML export (#4155)
* fix(ui): update artist link rendering and improve button styles

Signed-off-by: Deluan <deluan@navidrome.org>

* fix(ui): Move Dev* flags before sections in export

---------

Signed-off-by: Deluan <deluan@navidrome.org>
Co-authored-by: Deluan <deluan@navidrome.org>
2026-01-02 20:51:27 +00:00
Deluan Quintão
2bb3bb8fd0
feat(ui): add 'Show in Playlist' context menu (#4139)
* Update song playlist menu and endpoint

* feat(ui): show submenu on click, not on hover

Signed-off-by: Deluan <deluan@navidrome.org>

* feat(ui): integrate dataProvider for fetching playlists in song context menu

Signed-off-by: Deluan <deluan@navidrome.org>

* feat(ui): update song context menu to use dataProvider for fetching playlists and inspecting songs

Signed-off-by: Deluan <deluan@navidrome.org>

* feat(ui): stop event propagation when closing playlist submenu

Signed-off-by: Deluan <deluan@navidrome.org>

* feat(ui): add 'show in playlist' option to options object

Signed-off-by: Deluan <deluan@navidrome.org>

---------

Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-02 20:51:27 +00:00
Deluan Quintão
db5d8f9272
feat(ui): add configuration tab in About dialog (#4142)
* Flatten config endpoint and improve About dialog

* add config resource

Signed-off-by: Deluan <deluan@navidrome.org>

* fix(ui): replace `==` with `===`

Signed-off-by: Deluan <deluan@navidrome.org>

* feat(ui): add environment variables

Signed-off-by: Deluan <deluan@navidrome.org>

* feat(ui): add sensitive value redaction

Signed-off-by: Deluan <deluan@navidrome.org>

* feat(ui): more translations

Signed-off-by: Deluan <deluan@navidrome.org>

* address PR comments

Signed-off-by: Deluan <deluan@navidrome.org>

* feat(ui): add configuration export feature in About dialog

Signed-off-by: Deluan <deluan@navidrome.org>

* feat(ui): translate development flags section header

Signed-off-by: Deluan <deluan@navidrome.org>

* refactor

Signed-off-by: Deluan <deluan@navidrome.org>

* feat(api): refactor routes for keepalive and insights endpoints

Signed-off-by: Deluan <deluan@navidrome.org>

* lint

Signed-off-by: Deluan <deluan@navidrome.org>

* fix(ui): enhance string escaping in formatTomlValue function

Updated the formatTomlValue function to properly escape backslashes in addition to quotes. Added new test cases to ensure correct handling of strings containing both backslashes and quotes.

Signed-off-by: Deluan <deluan@navidrome.org>

* feat(ui): adjust dialog size

Signed-off-by: Deluan <deluan@navidrome.org>

---------

Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-02 20:51:27 +00:00
Deluan Quintão
93ac9dce0d
fix(server): enhance artist folder detection with directory traversal (#4151)
* fix: enhance artist folder detection with directory traversal

Enhanced fromArtistFolder function to implement directory traversal fallback for finding artist images. The original implementation only searched in the calculated artist folder, which failed for single album artists where artist.jpg files were not detected.

Changes: Modified fromArtistFolder to search up to 3 directory levels (artist folder + 2 parent levels), extracted findImageInFolder helper function for cleaner code organization, added proper boundary checks to prevent infinite traversal, maintained backward compatibility with existing functionality.

This fix ensures artist.jpg files are properly detected for single album artists while preserving all existing behavior for multi-album artists.

* refactor: address PR review suggestions

Applied review suggestions from gemini-code-assist bot:

- Added maxArtistFolderTraversalDepth constant instead of hardcoded value 3

- Updated error message to mention that parent directories were also searched

- Enhanced test assertion to verify the improved error message

* fix: improve artist folder traversal logic and enhance error logging

Signed-off-by: Deluan <deluan@navidrome.org>

* fix: remove test for special glob characters in artist folder detection

Signed-off-by: Deluan <deluan@navidrome.org>

* fix: add logging for artist image search in folder

Signed-off-by: Deluan <deluan@navidrome.org>

---------

Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-02 20:51:27 +00:00
Michael Tighe
6d60425441
fix(ui): reset page to 1 on playlist change - #1676 (#4154)
Signed-off-by: Michael Tighe <strideriidx@gmail.com>
2026-01-02 20:51:26 +00:00
Kevian
7ef5552b88
fix(ui): update Spanish translation (#4146)
Changed translation of "Top Rated" from "Los Mejores Calificados" to "Mejor Calificados" for consistency purposes with other list entries. While the previous version was correct, this version is shorter and aligns better with the rest of the terms.
2026-01-02 20:51:26 +00:00
Deluan
fe16608012
fix(ui): restructure AboutDialog's version notification layout
Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-02 20:51:26 +00:00
Deluan Quintão
da069d3cdb
fix(ui): update song fetching logic to disable for radio (#4149)
Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-02 20:51:26 +00:00
Deluan
fc128dc038
test: add tests for filtering artists by role
Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-02 20:51:26 +00:00
Deluan
d250f5e29c
fix(subsonic): change role filter logic
fix #4140

Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-02 20:51:26 +00:00
Caio Cotts
778e78ba5e
Merge commit from fork 2026-01-02 20:51:26 +00:00
Deluan
0dbbe23179
fix(ui): refine playlist details layout and disable play date display for mobile
Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-02 20:51:26 +00:00