167 Commits

Author SHA1 Message Date
Deluan
08d1e3a50c
More micro-optimizations 2026-01-02 20:36:59 +00:00
Deluan
04bfa0ea72
Initialize Index Groups regex just once 2026-01-02 20:36:59 +00:00
Deluan
c48d3b3526
Replace gg.If with cmp.Or 2026-01-02 20:36:59 +00:00
Deluan
f6552d9e36
Small refactoring 2026-01-02 20:36:59 +00:00
Deluan
38a219648d
Refactor string utilities into its own package str 2026-01-02 20:36:59 +00:00
Deluan
30671bf0dc
Fix tests expectations 2026-01-02 20:36:59 +00:00
Deluan
c98da13299
Fix G404 gosec lint error 2026-01-02 20:36:58 +00:00
Deluan
e39efece28
Fix 32 bits builds 2026-01-02 20:36:58 +00:00
Deluan
acb7468fdb
Make first WebUI random page stick 2026-01-02 20:36:58 +00:00
Deluan
f238669779
Add missing Test function 2026-01-02 20:36:58 +00:00
Guilherme Souza
c9a39d9986
Deterministic pagination in random albums sort (#1841)
* Deterministic pagination in random albums sort

* Reseed on first random page

* Add unit tests

* Use rand in Subsonic API

* Use different seeds per user on SEEDEDRAND() SQLite3 function

* Small refactor

* Fix id mismatch

* Add seeded random to media_file (subsonic endpoint `getRandomSongs`)

* Refactor

* Remove unneeded import

---------

Co-authored-by: Deluan <deluan@navidrome.org>
2026-01-02 20:36:58 +00:00
Deluan
880af2efe1
Refactor random.WeightedChooser, unsing generics 2026-01-02 20:36:57 +00:00
Deluan
7057bd104d
Refactor to use more Go 1.22 features 2026-01-02 20:36:56 +00:00
Deluan
f22aeee58f
Remove duplicated test 2026-01-02 20:36:56 +00:00
Deluan
5d8b10635e
Simplify random.Int64 usage with generics 2026-01-02 20:36:56 +00:00
Deluan
af627aa18e
Refactor random functions 2026-01-02 20:36:56 +00:00
Deluan
2b13262b25
Uses Unix milliseconds support from standard Go lib 2026-01-02 20:36:56 +00:00
Deluan
56964b676d
Refactor cache.HTTPClient 2026-01-02 20:36:56 +00:00
Deluan
d6d65b43ae
Refactor merge.FS 2026-01-02 20:36:56 +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
044ef35d8e
Fix int types in OpenSubsonic responses.
Refer to https://support.symfonium.app/t/symfonium-sync-crashes-when-tpos-is-not-an-int/4204
2026-01-02 20:35:32 +00:00
Deluan
d642d6f60f
Move TempFileName to utils 2026-01-02 20:33:14 +00:00
Deluan
bb0c49e8ba
Use Go builtin min/max func 2026-01-02 20:33:14 +00:00
Deluan
d7b7626488
Bump github.com/jellydator/ttlcache/v2 to v2.11.1 2026-01-02 20:33:14 +00:00
Caio Cotts
b57ba9e232
Fix null values in DB (#2840)
* Fix album image_files being null.

* Fix small nitpick.

* Use ExecContext instead of Exec.

* Change more columns to not null and set default values.

* Remove columns that don't need to be changed from migration.

* Fix typo.

* Remove unnecessary select statements.

* Remove duplicate code.

* Do not apply changes to radio table.

* Do not apply changes full_text columns and respective indexes.

* Fix musicbrainz columns.

* Rename migration.

* Make ExternalInfoUpdatedAt nullable

* Make Share's timestamps nullable

---------

Co-authored-by: Deluan Quintão <deluan@navidrome.org>
2026-01-02 20:32:59 +00:00
Deluan
f200b48723
Small readability improvement in MergeFS tests 2026-01-02 20:32:58 +00:00
Deluan
1e7fafdf4f
Make the GetInstance concurrent test more readable 2026-01-02 20:32:37 +00:00
Deluan
3e9890184b
Optimize Singleton (sometimes a simple lock is a better solution) 2026-01-02 20:32:37 +00:00
Deluan
a3ce0e9454
Add todo as a reminder to replace min/max in Go 1.22 2026-01-02 20:32:36 +00:00
Deluan
81bf9d23e4
Replace all utils.Param* with req.Params 2026-01-02 20:32:36 +00:00
Deluan
b932d0cbf1
Add req.Params to replace utils.Param* 2026-01-02 20:32:36 +00:00
Deluan
ae2f64a422
Removed unused diodes package 2026-01-02 20:32:12 +00:00
Deluan
b2863cceb9
Fix FileHaunter tests 2026-01-02 20:31:56 +00:00
Deluan
14031f96e1
Fix FileHaunter tests 2026-01-02 20:31:56 +00:00
Deluan
352950ac7d
Ignore flaky FileHaunter tests 2026-01-02 20:31:56 +00:00
Deluan
062889a88a
Generalize BreakUp/RangByChunks functions 2026-01-02 20:31:30 +00:00
Deluan
2d5881be7a
Make ParamInt generic (any int type) 2026-01-02 20:31:12 +00:00
Deluan
7b76df6033
Re-apply "Refactor walkDirTree to use fs.FS" but remove context cancelation logic.
This reverts commit 6b3b4d83ffcf273b01985709c8bc5df12bbb8286.
2026-01-02 20:27:26 +00:00
Deluan
cfc21050f7
Revert "Refactor walkDirTree to use fs.FS"
This reverts commit 3853c3318f67b41a9e4cb768618315ff77846fdb.
2026-01-02 20:27:26 +00:00
Deluan
7222a14f77
Refactor walkDirTree to use fs.FS 2026-01-02 20:27:26 +00:00
tomleb
c8fd9190e1
Allow configuring cache folder (#2357)
* Set all clients to dev_download for make get-music

* Use multiple TranscodingCache instances in tests

This fixes flaky tests. The issue is that the TranscodingCache object
was being reused in tests from media_stream_Internal_test.go and
media_stream_test.go. If tests from the former was run first, the cache
would be filled up, so that when running tests from the latter, the `NON
seekable` test would fail.

* Allow configuring cache folder

This commit introduces a new configuration option to configure the cache
folder. This allows the cache to be in a separate folder such as
/var/cache/navidrome on Linux distributions.

* Fix tests

* Removed unused test setup code

---------

Co-authored-by: Deluan <deluan@deluan.com>
Co-authored-by: Deluan <deluan@navidrome.org>
2026-01-02 20:27:26 +00:00
Deluan
edb75f268f
Move string slice functions to slice package as generic functions 2026-01-02 20:27:26 +00:00
Deluan
d4dbe3a724
Fix IntelliJ warning 2026-01-02 20:25:45 +00:00
Deluan
06b9349897
Convert our usage of go-diodes into a simplified, generic version 2026-01-02 20:25:43 +00:00
Deluan
b6dfcae247
Some refactorings 2026-01-02 20:25:19 +00:00
Deluan
a82794581a
Use sync/atomic package, now that we are at Go 1.19 2026-01-02 20:23:40 +00:00
Deluan
31811b3fab
Remove custom atomic.Bool, we are now at Go 1.19 2026-01-02 20:23:40 +00:00
Deluan
c8b8f82dd4
Add path to cookies. Fix #1580 2026-01-02 20:23:40 +00:00
Deluan
10926d8fb9
Don't cancel transcoding session if context is canceled 2026-01-02 20:22:41 +00:00
Deluan
ac42cfd3d6
Add logs to cache hunter 2026-01-02 20:22:40 +00:00