I finally got Funkwhale working. I imported some music with in-place option but songs don't start


#1

So after more than a week trying I finally got Funkwhale working (installed as docker with nginx proxy) now I’m facing an issue to add the music.

  • My music is hosted on google drive folders that I mount with google drive ocalmfuse into my server
  • I don’t want to imported music files to get stored in Funkwhale directory as that would be a waste of space. I want Funkwhale to read the music files from their current mounted folders just like emby, plex or airsonic can do
  • The structure of my music folders is as it follows: /mnt/unionfs/music/Artist/Album/file.mp3

Now the questions:
1- How can I get the music to be available on Funkwhale? I did the following:
I added the following volumes in the celeryworker & api section of docker-compose.yml:

“- /mnt/unionfs/music:/mnt/unionfs/music:ro” (withiut quotes)

Then I did:

ln -s /mnt/unionfs/music /srv/funkwhale/data/music/

Then I went to the directory /srv/funkwhale and typed this (not sure if I used the right syntax):

export LIBRARY_ID=“my library id here”
docker-compose run --rm api python manage.py import_files $LIBRARY_ID “/srv/funkwhale/data/music/music/**/*.mp3” --recursive --noinput --in-place

Results:
Some songs show “ParserError Unable to parse string” while being imported (despite having artist, track and album tags). Other songs are imported correctly but… nothing gets played at all. I hit play button but the track doesn’t start

PS: If I upload a song manually through the UI those songs can be played without issues


#2

I update the OP with latest changes


#3

Hey @titooo7, and thank you for taking the time to report your issues. Since the import work and tracks are showing in the interface (although not playing), I think the issue may comes from the way you mounted the files.

To sum it up, the API/Celery containers are responsible for processing music files, bt they are served by the nginx container (which is way more performant at serving files).

What are the values of the MUSIC_DIRECTORY_PATH and MUSIC_DIRECTORY_SERVE_PATH in your .env file ? (https://code.eliotberriot.com/funkwhale/funkwhale/blob/develop/deploy/env.prod.sample#L122)

Basically, based on what you shared, you should put /mnt/unionfs/music for both variables, and restart your containers. You should also remove your custom volume, since we’re adding those volumes automatically here

Let me know how it works :slight_smile:


#4

I’m not sure about the mounting method being the issue (google drive folders via rclone) as plexy,emby and airsonic can read those files without problems…

That’s what I have on my .env:
MUSIC_DIRECTORY_PATH=/srv/funkwhale/data/music
MUSIC_DIRECTORY_SERVE_PATH=/srv/funkwhale/data/music

Based on your message I assume that if I do what you mention I might get all the music working, but what would happen id I want to add another mount folder? Where should I add it?

I can’t do the changes and test now, but I’ll be back as soon as I test what you suggested


#5

The files are mounted and read properly by the API container (otherwise you would not see them in the interface), but you need to mount them on the nginx container as well.

And the environment variables I mentionned are designed exactly to automate that.

Since symlink does not work in a docker environment (symlink from the host are not accessible within a container), it may be a bit tricky to achieve that. The only way I can think of is by mounting your various folders under MUSIC_DIRECTORY_PATH, in all containers. We offer no way to automate that yet.


#6

Thanks. I did as you suggested and now the music is imported and played :slight_smile:

I will post later my .env , docker-compose.yml and Nginx config files as a template just in case any user wants to do what I did (music files stored in Google drive with rclone) in the future.

One last question for now: most of music files aren’t imported and are showing a Parsing error while being imported. Is it because the music needs to be reached with Beets?
Are there any plans to allow the music to be imported even if the tags don’t match Music rains database?


#7

If the music is tagged with beets, I suspect the parsing error comes from the release date field parsing. Someone already reported that in the past, I’ll work on a fix for the next release


#8

No, no my music isn’t tagged with Beets, Picardz or any software using musicbrainz database. But it has artists, album and track metatags (from Deezer database).

Does it means that only music with tags matching musicbrainz database can be imported?


#9

Can you please share the tags from one of the failing files here?

The aim is to support any file as long as it has the necessary tags (Artist, Album, Title), so you clearly spotted a bug here :slight_smile:


#10

Oh, I thought only music files with tags matching the ones from Musicbrainz were supposed to be imported and that’s why I had parsing errors on around 90% the files I tried to import. Here are just two of the songs that were showing parsing errors when i tried to import them: link removed

PS: it fails even if I upload them manually, but as you can see they have artist, album and title tags


#11

Thank you fr the link, I downloaded the files, you can safely remove them if needed. The issue likely comes from the Date tag in the files:

Screenshot%20from%202018-11-25%2022-05-29

As you can see 2014-14 is a bit weird for a date :wink:

However, Funkwhale should be able to ignore those.


#12

Oh that’s could be the reason then? All my music files have the tag from the same database (Deezer), so I wonder if that’s why more than 90% of my music files fail to be imported…

If Funkwhale should be able to ignore that is there any way to force it and ensure it really ignores it?

As I mentioned even uploading those songs manually didn’t get the files imported. It errored


#13

Yep, I’ve opened an issue to handle that for the next release :slight_smile:


#14

Thanks. Is there any roadmap or date when we should expect the new version?


#15

There is no date, but you can follow the progress here: https://code.eliotberriot.com/funkwhale/funkwhale/milestones (the 0.18 milestone is were you will find the issues that need to be fixed before we can release).

In expect it to be released late december or first half of january, but it may evolve :slight_smile: