Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to run navidrome CLI commands? #6

Closed
SpencerDub opened this issue Aug 17, 2020 · 8 comments
Closed

How to run navidrome CLI commands? #6

SpencerDub opened this issue Aug 17, 2020 · 8 comments

Comments

@SpencerDub
Copy link

SpencerDub commented Aug 17, 2020

Okay, real basic question here, sorry. I'd like to force a rescan to potentially fix some issues with album artwork, as described by @deluan in this comment.

How can I run navidrome CLI commands? Just doing sudo navidrome scan -f yields "navidrome: command not found", and I presume the docker-compose command listed in the comment doesn't work because this isn't Docker.

Thanks in advance. 🙂

@deluan
Copy link

deluan commented Aug 17, 2020

You'll need to do something like:

$ /path/to/navidrome/binary/navidrome -c /path/to/config/file/navidrome.toml scan -f

For the actual paths, @ericgaspar is more equipped to answer :)

@ericgaspar
Copy link
Member

That would be it: /opt/yunohost/navidrome/navidrome -c /var/lib/navidrome/navidrome.toml scan -f

I get this error when running the command though:

 _   _             _     _
| \ | |           (_)   | |
|  \| | __ ___   ___  __| |_ __ ___  _ __ ___   ___
| . ` |/ _` \ \ / / |/ _` | '__/ _ \| '_ ` _ \ / _ \
| |\  | (_| |\ V /| | (_| | | | (_) | | | | | |  __/
\_| \_/\__,_| \_/ |_|\__,_|_|  \___/|_| |_| |_|\___|
                           Version: 0.30.1 (a2e0acd)

INFO[0000] Configuring Media Folder                      name="Music Library" path=/home/yunohost.navidrome/Music
ERRO[0000] SQL: `SELECT * FROM user WHERE is_admin = ? ORDER BY updated_at asc LIMIT 1`  args="[true]" elapsedTime="997.287µs" error="no such table: user" rowsAffected=1
WARN[0000] No admin user found!                          error="no such table: user"
ERRO[0000] Error importing MediaFolder                   error="no such table: media_file" folder=/home/yunohost.navidrome/Music
ERRO[0000] SQL: `UPDATE property SET value = ? WHERE id = ?`  args="['1597693364217','LastScan-/home/yunohost.navidrome/Music']" elapsedTime="35.968µs" error="no such table: property" rowsAffected=0
ERRO[0000] Errors while scanning media. Please check the logs
ERRO[0000] Error scanning media folder                   error="errors while scanning media" folder=/home/yunohost.navidrome/Music
INFO[0000] Finished full rescan

@SpencerDub
Copy link
Author

Yup, I ran the same thing and got the same errors, @ericgaspar!

@deluan
Copy link

deluan commented Aug 17, 2020

How is the DataFolder being set? You also need to pass it to the scan command, or set it in the config file.

EDIT: Or else run the command from the folder where the navidrome.db is created. I know this is confusing ATM, I'm working on making the rescan less painful

@ericgaspar
Copy link
Member

Adding the DataFolder option to navidrome.toml did fix the issue. I merged the change to the testing branch. Thanks @deluan for your help!

@SpencerDub
Copy link
Author

SpencerDub commented Aug 17, 2020

@ericgaspar If I wanted to add that to navidrome.toml on my currently running instance, would the value for DataFolder be /opt/yunohost/navidrome?

@ericgaspar
Copy link
Member

ericgaspar commented Aug 17, 2020

The value to add to navidrome.toml should be: DataFolder = "/var/lib/navidrome"

@starkgate
Copy link

For anyone looking for information on this, the command to run on 0.50.2 is simply ./navidrome scan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants