mpc can not add songs in usb drive

Discussion about my Wifi Radio project at http://mightyohm.com/wifiradio/ or my WL-520gU talk at NOTACON.
Post Reply
cj6666
Posts: 24
Joined: Fri Apr 24, 2009 8:01 am

mpc can not add songs in usb drive

Post by cj6666 »

Hi,

Can you guys show me how to add songs located in the usb drive? I compiled my own firmware image, and I connected a 4 port usb hub to the usb port on the ASUS WL-500gu. I can play shoutcast fine, but I can't access songs that I stored in the usb drive. Here's the output:

Code: Select all

root@OpenWrt:~# ls -al
drwxrwxrwt    1 root     root            0 Jan  1 00:29 .
drwxr-xr-x    1 root     root            0 Jan  1 00:01 ..
drwxr-xr-x    1 root     root            0 Jan  1 00:00 .mpd
lrwxrwxrwx    1 root     root           13 Jan  1 00:29 music -> /mnt/usbdrive
root@OpenWrt:~# ls music
Digital.mp3   disorder.mp3
root@OpenWrt:~# mpc add disorder.mp3
error: ACK [50@0] {add} directory or file not found
root@OpenWrt:~# mpc ls
root@OpenWrt:~# mpc ls /mnt/usbdrive
error: ACK [50@0] {lsinfo} directory not found
root@OpenWrt:~#
I already soft link the music directory to the mounted /mnt/usbdrive directory. Any suggestions?

Thanks, CJ
cj6666
Posts: 24
Joined: Fri Apr 24, 2009 8:01 am

Re: mpc can not add songs in usb drive

Post by cj6666 »

Found the solution. Turning the router off and on won't help.
I have to do a "/etc/init.d/mpd restart" command.

Hmm, I wonder why power cycle won't work?

Thanks, CJ
ilinux
Posts: 55
Joined: Mon Jul 06, 2009 2:36 am

Re: mpc can not add songs in usb drive

Post by ilinux »

Because pendrive is not mounted or mpd.conf

for add automount you have to edit /etc/config/fstab and for music dir you have to edit /etc/mpd.conf

music_directory "yourpathhere"

I suggest to save db into usb thumb so edit also

db_file "yourpathhere/.db"
cj6666
Posts: 24
Joined: Fri Apr 24, 2009 8:01 am

Re: mpc can not add songs in usb drive

Post by cj6666 »

thanks, ilinux. I figure it must have something to do with booting sequence as well. I need to mount the drive before I start MPD, I think. I will give it a try.
fooq
Posts: 1
Joined: Sun Sep 18, 2011 4:01 pm

Re: mpc can not add songs in usb drive

Post by fooq »

ilinux wrote:for add automount you have to edit /etc/config/fstab
How should this be edited/ what should go in it??

background::

installed voyage-mpd on USB drive w/ unetbootin. added mp3 files in [usb drive]/music. USB is mounted to /live/image/ by voyage.
ls /live/image/music shows up the files, but mpc ls /live/image/music(/*) returns '(file or) directory not found'. mpc add /live/image/music/song.mp3 doesn't work either.. i copied the files to a new directory and no luck there either.

EDIT: SOLVED: Needed to run 'mpc update', and then 'mpc add [files]'. This wasn't very clear as most stuff just referred to the deprecated mpd --create-db or just that it was deprecated.
Post Reply