How to import music in Funkwhale

What type of hardware are you using: Old laptop or computer
What YunoHost version are you running: 12.0.17 (stable)
What app is this about: Funkwhale 1.4.1~ynh1

Describe your issue

How do I import in Funkwhale music that is already located in a different folder on the host computer?

My ideal objective would be for Funkwhale to watch my music folder in my Nextcloud (also hosted on the same old computer). From Funkwhale’s documentation (Import music from your server — funkwhale 1.4.0 documentation), it seems I need to create a symlink to the directory holding my files.

funkwhale@yuno /h/y/f/d/music> ls -l
total 0
lrwxrwxrwx 1 funkwhale funkwhale 44 Jun 20 00:38 musique-nextcloud -> /home/narf/musique-nextcloud-copy-temporaire/

Then I need to run the import_files command. How do I run this command?

What I did:

$ sudo su funkwhale
$ cd /home/yunohost.app/funkwhale/

$ venv/bin/funkwhale-manage import_files $LIBRARY_ID data/music/musique-nextcloud/ --recursive --noinput --in-place
fish: Unknown command: venv/bin/funkwhale-manage

$ import_files $LIBRARY_ID data/music/musique-nextcloud/ --recursive --noinput --in-place
fish: Unknown command: import_files

Facing that issue, then I tried instead to do that import using Funkwhale’s web interface. But here I face 2 problems:

  1. Clicking Import gives me this error:

  2. I cannot change the text in the textbox (where it says “undefined/” in my screenshot

There’s probably something obvious that I’m missing, or maybe it’s because the Yunohost package makes it different than the “official” app?

And just to be clear: I can upload mp3 files using Funkwhale’s web interface. I can then listen to it and it works well :+1: But I don’t want to upload 40 GB of files doing this method! :sweat_smile:

The admin docs say that you can use a symlink:
sudo ln -s /your/music/collection __DATA_DIR__/data/music

(you can find said docs in your webadmin under apps > funkwhale

In your screenshot, it seems your music dir doesn’t have the appropriate rights.

On my instance, I have

In the box before import, I have the default music directory for Funkwhale in YunoHost. Under it there is “Musiques” (my actual music library) which appears after the symlink. It works great!

Yes, I have seen this documentation and I thought I had done it properly…

Here are my current permissions. It seems to be fine?

# ls -l /home/yunohost.app/funkwhale/data
total 12
drwxrwx--- 5 funkwhale www-data 4096 Jun 17 16:45 media/
drwxrwx--- 2 funkwhale www-data 4096 Jun 20 10:04 music/
drwxrwx--- 7 funkwhale www-data 4096 Jun 17 16:16 static/

# ls -l /home/yunohost.app/funkwhale/data/music/
total 0
lrwxrwxrwx 1 funkwhale www-data 44 Jun 20 00:38 musique-nextcloud -> /home/narf/musique-nextcloud-copy-temporaire/

# ls -l /home/yunohost.app/funkwhale/data/music/musique-nextcloud/
total 0
drwxr-xr-x 1 funkwhale www-data  192 Jun 20 00:30  2-Compilations/
drwxr-xr-x 1 funkwhale www-data 1636 Apr 24 12:11 '2-jeux vidéo'/

# ls -l /home/yunohost.app/funkwhale/data/music/musique-nextcloud/2-Compilations/
total 217496
drwxr-xr-x 1 funkwhale www-data       144 May  2  2024  sesame-street-fever-fever-and-trash-record-single/
-rw-r--r-- 1 funkwhale www-data 222715443 Aug 28  2024 'Ultimate BusinessFunk (2 Hour Presentation).mp3'

Funkwhale has read access to everything, yet, the online importer still display “undefined/” and returns “Error while launching import: Permission denied”. What permissions are expected?

Also, do you know the answer to my main question: How do I run the import_files command, so that I can do that from the CLI?

bump?