Mpc update right after a device mount lead me to songs missing problem

General Discussion about MPD – anything that doesn't fit in the other MPD forums.
Post Reply
Sogeking
Posts: 7
Joined: February 8th, 2018, 2:09 pm

Mpc update right after a device mount lead me to songs missing problem

Post by Sogeking » October 2nd, 2019, 9:24 am

Hi,

i'm having this problem with a c++ (with qt) program i'v developed.
I call a system command "mount" to mount a device in my raspberry. Right after when mount process is finished i call "mpc update" to update the music database but a lot of songs are missing. If i call mpc update manualy some seconds right after mpc can find all songs correctly.

So the question is: "how can i be sure that the mount process is correctly ended in order to update mpc with all the songs?"

Thanks

max
Forum team
Posts: 958
Joined: January 15th, 2013, 3:43 pm

Re: Mpc update right after a device mount lead me to songs missing problem

Post by max » October 2nd, 2019, 10:17 am

The mount process is finished when the command finishes.

But that doesn't imply that the database update is finished at the same time, just like regular database updates aren't finished then. To wait for update completion, use `mpc update --wait`.
But that has nothing to do with mounting, that's how MPD always works.

Post Reply