* fix(insights): show error whn reading library counts
Signed-off-by: Deluan <deluan@navidrome.org>
* fix(insights): wait 30 mins before send first report
Signed-off-by: Deluan <deluan@navidrome.org>
* fix(insights): send number of active players, grouped by client type
Signed-off-by: Deluan <deluan@navidrome.org>
* fix(insights): disable reports when running in dev mode
Signed-off-by: Deluan <deluan@navidrome.org>
* fix(insights): add Dockerfile to the docker build, to avoid `vcs.modified=true`
Signed-off-by: Deluan <deluan@navidrome.org>
* fix(insights): add more linux fs types
Signed-off-by: Deluan <deluan@navidrome.org>
* fix(insights): need admin permissions to retrieve library counts
Signed-off-by: Deluan <deluan@navidrome.org>
* fix(insights): dev flag to disable player insights
Signed-off-by: Deluan <deluan@navidrome.org>
---------
Signed-off-by: Deluan <deluan@navidrome.org>
* feat(insights): initial code (WIP)
* feat(insights): add more info
* feat(insights): add fs info
* feat(insights): export insights.Data
Signed-off-by: Deluan <deluan@navidrome.org>
* feat(insights): more config info
Signed-off-by: Deluan <deluan@navidrome.org>
* refactor(insights): move data struct to its own package
Signed-off-by: Deluan <deluan@navidrome.org>
* refactor(insights): omit some attrs if empty
Signed-off-by: Deluan <deluan@navidrome.org>
* feat(insights): send insights to server, add option to disable
Signed-off-by: Deluan <deluan@navidrome.org>
* fix(insights): remove info about anonymous login
Signed-off-by: Deluan <deluan@navidrome.org>
* chore(insights): fix lint
Signed-off-by: Deluan <deluan@navidrome.org>
* fix(insights): disable collector if EnableExternalServices is false
Signed-off-by: Deluan <deluan@navidrome.org>
* fix(insights): fix type casting for 32bit platforms
Signed-off-by: Deluan <deluan@navidrome.org>
* fix(insights): remove EnableExternalServices from the collection (as it will always be false)
Signed-off-by: Deluan <deluan@navidrome.org>
* chore(insights): fix lint
Signed-off-by: Deluan <deluan@navidrome.org>
* refactor(insights): rename function for consistency
Signed-off-by: Deluan <deluan@navidrome.org>
* feat(insights): log the data sent to the collector server
Signed-off-by: Deluan <deluan@navidrome.org>
* feat(insights): add last collection timestamp to the "about" dialog.
Also add opt-out info to the SignUp form
Signed-off-by: Deluan <deluan@navidrome.org>
* feat(insights): only sends the initial data collection after an admin user is created
Signed-off-by: Deluan <deluan@navidrome.org>
* feat(insights): remove dangling comment
Signed-off-by: Deluan <deluan@navidrome.org>
* feat(insights): Translate insights messages
Signed-off-by: Deluan <deluan@navidrome.org>
* fix(insights): reporting empty library
Signed-off-by: Deluan <deluan@navidrome.org>
* refactor: move URL to consts.js
Signed-off-by: Deluan <deluan@navidrome.org>
---------
Signed-off-by: Deluan <deluan@navidrome.org>
* refactor(server): replace RangeByChunks with Go 1.23 iterators
* chore: fix comments re: SQLITE_MAX_VARIABLE_NUMBER
* test: improve playqueue test
* refactor(server): don't create a new iterator when it is not required
* fix(ui): update sort mapping for title in mediafile repository
* fix(ui): create sort mapping for username in share repository
* fix(ui): create sort mapping for owner_name in playlist repository
* fix(ui): create sort mapping for username in player repository
* fix(ui): remove sort mapping for track number in mediafile repository
* chore: add todo to change user_name
* fix(scanner): use sort_artist_name when the config PreferSortTags is true - #3285
* revert unwanted modifications
* refactor(server): use cmp.Or to simplify nested ifs
---------
Co-authored-by: Deluan <deluan@navidrome.org>
* [bugfix] player: use userId, other fixes
This PR primarily resolves#1928 by switching the foreign key of `player` from `user.user_name` to `user.id`.
There are also a few other fixes/changes:
- For some bizarre reason, `ip_address` is never returned from `read`/`get`. Change the field to `ip`, which works. Somehow
- Update `players_test.go` mock to also check for user agent, replicating the actual code
- Update `player_repository.go` `isPermitted` to check user id. I don't know how this worked before...
- tests!
- a few places referred to `typ`, when it is really `userAgent`. Change the field names
* baseRequest -> selectPlayer
* remove comment
* update migration, make all of persistence foreign key enabled
* maybe don't forget to save the file first
* 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>
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>