Open MykolaMorhun opened 2 years ago
The error you are getting is the 'No songs that match criteria' error. This only happens when the db search to find a random song returns an empty set.
I was able to reproduce this by setting the AutoDJ to only used rated songs after starting with a fresh DB. Can you check the AutoDJ panel and make sure all the settings look OK. It remembers what settings you used last btw.
If that's not the issue, can you use the dev tools to see the data that is being sent to the /random-songs
endpoint?
Thank you @IrosTheBeggar for the answer.
I have default settings in Auto DJ: Under Use Folders
item tracks
is ticked (the only possible option) and the Minimum Rating
is set to Disabled
.
If that's not the issue, can you use the dev tools to see the data that is being sent to the
/random-songs
endpoint?
Endpoint: https://hostname:1234/api/v1/db/random-songs
Request data: {"ignoreList":[],"minRating":0,"ignoreVPaths":{}}
Status: 400 Bad Request
Response data: error: "No songs that match criteria"
If you need more data or investigation from my side, please let me know, I'll be glad to do it.
The strange thing is that the db is empty (no user data in it).
mStream has permissions to read all the tracks.
Steps to reproduce
Logs
Investigation
When try to get
https://hostname:2222/api/v1/db/random-songs
it returns 401 error:However, I am actually logged in and can play tracks (clicking on back button in browser returns to the web interface from where I can play tracks without any issue).
Versions
5.8.1 (logs taken from) 5.7.2 Maybe some older versions too, haven't checked.
Installation method
npm install
Configuration
Show config.json
```json { "port": 2222, "webAppDirectory": "/home/username/mStream/webapp", "writeLogs": false, "storage": { "logsDirectory": "/tmp/mstream-logs" }, "noUpload": true, "scanOptions": { "skipImg": true, "scanInterval": 0, "pause": 50, "saveInterval": 5000, "bootScanDelay": 5 }, "folders": { "tracks": { "root": "/home/username/music" } }, "transcode": { "enabled": false, "ffmpegDirectory": "/path/to/ffmpeg-dir", "defaultCodec": "opus", "defaultBitrate": "128k" }, "secret": "hidden", "users": { "admin": { "vpaths": [ "tracks" ], "password": "hidden-password-1", "salt": "hidden-salt-1", "admin": true, "username": "admin" }, "user": { "vpaths": [ "tracks" ], "password": "hidden-password-2", "salt": "hidden-salt-2", "admin": false } }, "ssl": { "key": "/letsencrypt/privkey.pem", "cert": "/letsencrypt/cert.pem" } } ```