OK, supper is over and I'm sipping my Diet Coke so I have time to type. Again, if I cover something you already know, I'm sorry. Just trying to be thorough.shhammer5634 wrote: ↑Sun May 13, 2018 9:10 pmHi Leigh,ljs12377 wrote: ↑Sun May 13, 2018 9:02 pmHi Steveshhammer5634 wrote: ↑Sun May 13, 2018 2:07 pm
Good morning (at least in my part of the world),
Working with something new can be quite frustrating. I don't know what your skill level is with Linux, which is the OS that is running your Raspberry PI. So please forgive me if I cover something you already know.
If you're putting the music in a folder on the SD card before you actually are using the SD card to run the PI, then that folder is most likely inaccessible from the OS. To get the music to reside there, you would have to copy it from another source such as a USB flash drive while actually running the PI. Just like moving stuff from machine to machine in Windows. Doing the copy of the music from a flash drive from the PI desktop is relatively simple, but running Fruitbox from the desktop is not a good idea and in most cases does not work correctly. So you can use the desktop to do maintenance type stuff, but not for running Fruitbox.
If you are doing the copy from within the PI, then the Music directory is most likely /home/pi/Music. Regardless of how you get your music files here, you should confirm that this is where they are and that you can actually see them there.
In the fruitbox.cfg file, you would point to your music path. If you have your music in the Music folder, and you can see it there when you are running the PI, then the path is /home/pi/Music. It is important to note that unlike Windows, Linux folder paths are case sensitive. So /home/pi/Music would not be the same as /home/pi/music.
Most of your examples that you gave showed that you were trying to use relative paths to your music. While they can be convenient, they can also come back to bite you. I prefer to use the full path to my music files. That way there is no confusion.
It is possible to play your music directly from a flash drive without having to copy it around. I do this to allow for changing up my available music selection periodically. That requires the flash drive be mounted as a drive. Flash drives do not auto mount when running the PI in console mode. So you would need to, as part of your Fruitbox startup procedure, have a way of verifying that the flash drive is inserted and then mount it before actually starting Fruitbox. I do this in a bash script. If the flash drive is not inserted, fruitbox won't start and the script complains. I also use switches (or flags) in the fruitbox startup to tell fruitbox where my music and database files are. That way they can all live happily on the flash drive and I don't have to mess with editing the skin file when I want to make some sort of change. This is just an overview of my method and would require further explanation if you're interested in trying it. I'd also be happy to share the startup script.
One other thing I would suggest if you haven't done so already is to make a copy of the Fruitbox user manual. It's actually a part of the software. I sent it to a file and then actually printed it on hard copy. On the console or in a command window (depending on how you're running your PI) change directory to where have Fruitbox living on your PI and type:It will look like nothing happened, and you'll end back at a command prompt. But the entire user guide will now be in the userguide.txt file. You can view it or print it at your leisure.Code: Select all
./fruitbox --user-guide > userguide.txt
I hope some of this helped.
Cheers,
Steve
thanks for your help on this, i think i might slowly be getting there. I’ve managed to locate my flash Usb drive and found the mp3 files on it ../media/usb1 (i changed all this via this you tube video https://youtu.be/Q0W6ggl5yjY ) but when i run the programme it still says that it cannot find mp3 files although i know they are there when i run the command ls /media/usb1. I have been changing the config file by using nano skins/WallJuke/fruitbox.cfg
What would be the full path to /media/usb1
I’m interested in trying the switches and flags if your ok with that. (I’m slowly getting this!)
Thanks
Leigh
You are making progress. That's great news! Before I can answer your question though, I need to know if you are running Fruitbox from inside the PI desktop or are starting up the PI in console mode.
Cheers,
Steve
Edit: On the assumption that you're running PI in console mode, I'll type something up shortly. I'm cooking supper right now. Food before computing in my house.![]()
A little Linux 101 to begin: Linux does not use drive letters. Everything hangs off the root directory ('/' without anything after it). A single hard drive can be a single volume, or can be broken up into several volumes depending on how it's configured. A volume hangs off the root directory at a mount point. A mount point is a folder when viewed in a directory listing. If the associated volume isn't mounted, the folder is empty. If a volume is mounted, then there will be files and folders listed in the mount point folder.
I needed to power up my PI for this bit of explanation and what I see may be different that what you see so bear with me. When I insert my usb stick and have started PI in graphic desktop mode, the flash drive mounts under the /media/pi folder with the volume name of the flash drive. In my case, my flash drive is named MUSIC (all caps) so the full mount point becomes /media/pi/MUSIC. When I start PI in console mode, even if the flash drive is present, it doesn't automatically mount. So Fruitbox can't find it.
Most flash drives are seen by Linux as a hard drive. So when you have the flash drive connected to PI, regardless of whether you are running in console or graphic mode, Linux creates a device node for it in the /dev folder. In this case, drive device nodes begin with the prefix sd, have one letter following, and a number to indicate the partition. In my case, my flash drive only has one partition on it. So in the /dev folder when I have the flash drive plugged in, I have an sda entry which is the flash drive itself and an sda1 entry which is the first (and in this case the only) partition (or volume) on the flash drive. That makes the path to the partition containing my music /dev/sda1. That path will be important later.
With your flash drive plugged in and your PI running in console mode so that you have a command-line prompt type:
Code: Select all
ls -l /dev/sd*Now at the command-line prompt type:
Code: Select all
ls -l /media/usb1If you get any other response than "total 0" then that mount point doesn't exist. You can create that mount point by typing:
Code: Select all
sudo mkdir /media/usb1Code: Select all
mount [flags] [device] [mount point]Code: Select all
sudo mount -t vfat -o umask=000 /dev/sda1 /media/pi/MUSICOnce I do that, then I can type:
Code: Select all
cd /media/pi/MUSIC
ls -lChange directory to where you have Fruitbox installed. At the command-line type:
Code: Select all
./fruitbox --cfg [path-to-your-fruitbox.cfg-file] --database [mount-point-of-your-flash-drive] --music-path [mount-point-of-your-flash-drive] Code: Select all
./fruitbox --cfg /home/pi/Fruitbox/skins/Seeburg3W1/fruitbox.cfg --database /media/pi/MUSIC --music-path /media/pi/MUSICPlease try what I have outlined above. If it works for you and you want my startup script, let me know and I'll post it here for you. If I've created more questions that I've answered, I'm sorry. Ask away and I'll do my best.
Steve
Edit:Posting the script anyway. Let me know what happens.
Code: Select all
# . /bin/bash
# Script for starting Fruitbox.
# Mounts the flash drive or hard drive at the specified mount point and
# then starts Fruitbox pointing to the mount point for both the music and
# database. Output is run off to logfile.txt for later review.
# Check to see if there's an external hard drive attached
if [ ! -e "/dev/sda1" ];
then
echo -e "No Music drive found.\nPlease connect a USB drive with the music to play.\nExiting"
exit
fi
# Mount the external hard drive
sudo mount -t vfat -o umask=000 /dev/sda1 /media/pi/MUSIC
# Start up fruitbox
cd Fruitbox
./fruitbox --cfg /home/pi/Fruitbox/skins/Seeburg3W1/fruitbox.cfg --database /media/pi/MUSIC/fruitbox.db --music-path /media/pi/MUSIC 2>&1 > logfile.txt
# Clean up after running fruitbox
sudo umount /dev/sda1
cd /home/pi
#clear
exit