Deluan
2c8c87a980
Remove duplicated test
2024-05-11 20:15:02 -04:00
Deluan
3463d0c208
Simplify random.Int64 usage with generics
2024-05-11 20:10:46 -04:00
Deluan
0ae2944073
Refactor random functions
2024-05-11 20:04:21 -04:00
Deluan
30ae468dc1
Uses Unix milliseconds support from standard Go lib
2024-05-11 19:50:30 -04:00
Deluan
ec68d69d56
Refactor cache.HTTPClient
2024-05-11 19:37:12 -04:00
Deluan
955a9b43af
Refactor merge.FS
2024-05-11 19:37:12 -04:00
Deluan Quintão
c4b05dac28
Make sorting lists by name/title case-insensitive ( #2993 )
...
* Make sort by order_* fields case-insensitive.
* Sort internet radios by name case-insensitive
2024-05-09 07:08:15 -04:00
Deluan
2c06a4234e
Fix int types in OpenSubsonic responses.
...
Refer to https://support.symfonium.app/t/symfonium-sync-crashes-when-tpos-is-not-an-int/4204
2024-05-01 13:57:11 -04:00
Deluan
fa72aaa462
Move TempFileName
to utils
2024-02-18 12:52:06 -05:00
Deluan
166eb37787
Use Go builtin min/max func
2024-02-16 21:53:16 -05:00
Deluan
f7a4387d0e
Bump github.com/jellydator/ttlcache/v2 to v2.11.1
2024-02-16 21:42:22 -05:00
Caio Cotts
bf2bcb1279
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>
2024-02-07 20:45:08 -05:00
Deluan
fd61b29a84
Small readability improvement in MergeFS tests
2024-01-21 16:20:47 -05:00
Deluan
6f7b48202e
Make the GetInstance concurrent test more readable
2023-12-28 16:50:07 -05:00
Deluan
0d8f8e3afd
Optimize Singleton (sometimes a simple lock is a better solution)
2023-12-27 22:12:34 -05:00
Deluan
3f349b1b58
Add todo as a reminder to replace min/max in Go 1.22
2023-12-21 19:19:46 -05:00
Deluan
dfcc189cff
Replace all utils.Param*
with req.Params
2023-12-21 17:41:09 -05:00
Deluan
00597e01e9
Add req.Params
to replace utils.Param*
2023-12-21 16:32:37 -05:00
Deluan
ac3668a33e
Removed unused diodes
package
2023-12-11 17:22:10 -05:00
Deluan
4cd7c7f39f
Fix FileHaunter tests
2023-12-02 19:40:59 -05:00
Deluan
81daee3b9b
Fix FileHaunter tests
2023-12-02 18:43:24 -05:00
Deluan
9b434d743f
Ignore flaky FileHaunter tests
2023-12-02 18:32:48 -05:00
Deluan
9aa7b80d0d
Generalize BreakUp/RangByChunks functions
2023-11-25 12:13:36 -05:00
Deluan
ecadcfb403
Make ParamInt
generic (any int type)
2023-11-23 13:40:06 -05:00
Deluan
d6083dab6e
Re-apply "Refactor walkDirTree to use fs.FS" but remove context cancelation logic.
...
This reverts commit 6b3b4d83ffcf273b01985709c8bc5df12bbb8286.
2023-06-04 15:06:19 -04:00
Deluan
6b3b4d83ff
Revert "Refactor walkDirTree to use fs.FS"
...
This reverts commit 3853c3318f67b41a9e4cb768618315ff77846fdb.
2023-06-04 14:13:33 -04:00
Deluan
3853c3318f
Refactor walkDirTree to use fs.FS
2023-06-03 22:25:19 -04:00
tomleb
257ccc5f43
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>
2023-06-02 17:14:11 -04:00
Deluan
3fc4313e89
Move string slice functions to slice package as generic functions
2023-06-02 16:30:20 -04:00
Deluan
bd402fb2a8
Fix IntelliJ warning
2023-04-04 13:01:32 -04:00
Deluan
e6bfa2bb0b
Convert our usage of go-diodes into a simplified, generic version
2023-04-01 21:53:45 -04:00
Deluan
b998c05ca0
Some refactorings
2023-03-26 21:28:37 -04:00
Deluan
a134b1b608
Use sync/atomic package, now that we are at Go 1.19
2023-02-15 21:21:59 -05:00
Deluan
6dce4b2478
Remove custom atomic.Bool, we are now at Go 1.19
2023-02-15 21:18:24 -05:00
Deluan
aac6e2cb07
Add path to cookies. Fix #1580
2023-02-15 20:23:32 -05:00
Deluan
05c6cdea1a
Don't cancel transcoding session if context is canceled
2023-02-07 09:58:50 -05:00
Deluan
bfaf4a3388
Add logs to cache hunter
2023-02-06 10:41:33 -05:00
Deluan
0ce750d469
Update golangci-lint and fix lint errors
2023-02-02 11:10:28 -05:00
Deluan
4a7e86e989
Fix file descriptor leaking.
2023-02-02 10:36:49 -05:00
Deluan
d5df102f9f
Implement updateShare
and deleteShare
Subsonic endpoints
2023-01-24 18:36:46 -05:00
Deluan
20271df4fb
Workaround to detect empty dates in some Subsonic clients
2023-01-24 18:36:46 -05:00
Deluan
580e9ae4bd
Fix timer going awry
2023-01-17 22:04:09 -05:00
Deluan
7fbcb2904a
Add function number.RandomInt64
2023-01-13 21:40:24 -05:00
Deluan
769e8bedba
Rename WeightedChooser's method Put to Add, a better name
2023-01-13 19:43:27 -05:00
Deluan
fdbece5c92
Use custom sanitize package, fix #2070
2023-01-12 13:39:05 -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
52a4721c91
Remove empty (invalid) entries from the cache
2022-12-28 15:31:56 -05:00
Deluan
dc16ccdb93
Make tests compatible with GoLang 1.18
2022-12-28 15:31:56 -05:00
Deluan
b6eb60f019
Add new Artwork Cache Warmer
2022-12-28 15:31:56 -05:00