Moode Forum
How to create local music source on SDCard File System - Printable Version

+- Moode Forum (https://moodeaudio.org/forum)
+-- Forum: moOde audio player (https://moodeaudio.org/forum/forumdisplay.php?fid=3)
+--- Forum: Support (https://moodeaudio.org/forum/forumdisplay.php?fid=7)
+--- Thread: How to create local music source on SDCard File System (/showthread.php?tid=5812)

Pages: 1 2


RE: How to create local music source on SDCard File System - TheOldPresbyope - 09-23-2023

(09-23-2023, 05:28 PM)halfnote Wrote: Copied my media to the SDCard but refresh didn't populate the library. Appears at first due to filenames copied from a Mac that had spaces in the flac filenames. Upon copying the files, the new files have quotes around the entire filename including the flac extension.  Wish I remembered what I'd done to address it last time or if I needed to. I might need some messy filename translation from spaces to underscores. I may have searched the wrong terms but if anyone knows a quick fix or thread, let me know.

No, spaces in the filenames aren't a problem.

More likely, it's a permissions problem. Quoting from the MPD documentation


Quote:Does the MPD user have read permission on all music files, and read+execute permission on all music directories (and all of their parent directories).


Here's what Linux says about the SDCARD on one of my players:


Code:
pi@m836-64:~ $ ls -la /mnt
total 16
drwxr-xr-x  4 root root 4096 Aug 19 16:49 .
drwxr-xr-x 18 root root 4096 Aug 19 17:09 ..
drwxr-xr-x  3 root root 4096 Aug 21 00:13 NAS
drwxr-xr-x  4 root root 4096 Sep 10 13:39 SDCARD
pi@m836-64:~ $ ls -laR /mnt/SDCARD
/mnt/SDCARD:
total 16
drwxr-xr-x 4 root root 4096 Sep 10 13:39  .
drwxr-xr-x 4 root root 4096 Aug 19 16:49  ..
drwxr-xr-x 2 pi   pi   4096 Sep 10 09:12 '1969 - In A Silent Way (1969, 2012 MFSL RM)'
drwxr-xr-x 2 root root 4096 Sep  6 21:46 'Stereo Test'

'/mnt/SDCARD/1969 - In A Silent Way (1969, 2012 MFSL RM)':
total 788980
drwxr-xr-x 2 pi   pi        4096 Sep 10 09:12  .
drwxr-xr-x 4 root root      4096 Sep 10 13:39  ..
-rw-r--r-- 1 pi   pi   394870911 Sep 10 09:56 '01. Shhh-Peaceful.wv'
-rw-r--r-- 1 pi   pi   412402712 Sep 10 09:56 "02. In A Silent Way-It's About That Time.wv"
-rw-r--r-- 1 pi   pi      615806 Sep  5 07:56  cover.jpg

'/mnt/SDCARD/Stereo Test':
total 2080
drwxr-xr-x 2 root root    4096 Sep  6 21:46 .
drwxr-xr-x 4 root root    4096 Sep 10 13:39 ..
-rw-r--r-- 1 root root 2120405 Sep  5 13:50 LRMonoPhase4.flac

MPD has no problem indexing and playing both the LRMonoPhase4.flac file distributed with moOde and the wv test file and directory I created in examining a user's problem.

Since you say you copied from a Mac you likely have a bunch of MacOS crapola too. I don't have a Mac and so won't comment but this been addressed a number of times in this forum.

Regards,
Kent


RE: How to create local music source on SDCard File System - Tim Curtis - 09-23-2023

The single quotes that appear in the output from the ls command are there so the output can be processed safely in a script that uses the files names for example to copy them. They are not actually part of the file name.

To get rid of the super annoying MacOS dot files (resource fork files) run the commands below. Just past the whole block at the command prompt. They complete very quickly unless you have a huge number of files.

Code:
cd /mnt/SDCARD
sudo find . -name "._*" -exec rm -rf {} \;
sudo find . -name ".Trashes" -exec rm -rf {} \;
sudo find . -name "._.Trashes" -exec rm -rf {} \;
sudo find . -name ".Spotlight*" -exec rm -rf {} \;
sudo find . -name ".DS_Store" -exec rm -rf {} \;
sudo find . -name "._.DS_Store" -exec rm -rf {} \;
sudo find . -name ".fseventsd*" -exec rm -rf {} \;
sudo find . -name "._.com.apple.timemachine.donotpresent" -exec rm -rf {} \;
sudo find . -name ".com.apple.timemachine.donotpresent" -exec rm -rf {} \;
sudo find . -name ".TemporaryItems" -exec rm -rf {} \;
sudo find . -name "._.TemporaryItems" -exec rm -rf {} \;
sudo find . -name "._moodecfg.txt" -exec rm -rf {} \;
sudo find . -name "__MACOSX" -exec rm -rf {} \;
cd ~

Since you copied the files to SDCARD directory using sudo they should have permissions root:root which is ok. To troubleshoot MPD related permission problems do the following:

1. Menu, Configure Library
2. REGENERATE Music database
3. View the moode log for stats at the end


Code:
moodeutl -l

4. View the MPD log for errors

Code:
cat /var/log/mpd/log



RE: How to create local music source on SDCard File System - spiros79 - 09-23-2023

Thanks all for the suggestions . 
Heres is the deal . 

For some reason on my win11 machine the pi zero w doesn't appear in the network . SMB is on and Samba server is running on the machine . Can't tell why .I'll work on it later .
Here is what  I did and it seems to work.
  • tried to send files over wifi and Filezilla  and sftp but it wouldn't copy due to permissions on SDcard .
  • trying to copy files on windows using an SDcard to USB adapter did't work as someone described above . File system  unknown to Win11 . Couldn't locate the SDCARD directory 
  • tried copying same way on Linux mint . Had no rights on SDCARD . Couldn't copy anything . 
  • returned the sdcard to pi zero .  Connected  via ssh .  and run  sudo chmod 777 /mnt/SDCARD .  Didn't get any strange response so I guessed it worked .
  • tested with filezilla and finally started copying . But transfer speed is ridiculously low. About 1 MB/s . 
  • Back to sdcard-usb stick and c/p  in the  linux machine . Hopefully in a few hours I'll be done . 
Hooray  Smile Smile


RE: How to create local music source on SDCard File System - halfnote - 10-12-2023

I'm still missing a piece. I don't see errors in /var/log/moode.log but I don't see any local library in the UI (and forgot where it had appeared before). Have 755 (rwxr-xr-x) on SDCARD/music/... and below.

My setup is SDCARD/music/<artist>/<album>/track.flac

My UI home screen shows only radio stations, search bar (which is unsuccessful when I search on an artist).


RE: How to create local music source on SDCard File System - Nutul - 10-12-2023

(10-12-2023, 05:24 PM)halfnote Wrote: I'm still missing a piece. I don't see errors in /var/log/moode.log but I don't see any local library in the UI (and forgot where it had appeared before). Have 755 (rwxr-xr-x) on SDCARD/music/... and below.

My setup is SDCARD/music/<artist>/<album>/track.flac

My UI home screen shows only radio stations, search bar (which is unsuccessful when I search on an artist).

What happens if you click on "Library" on top-left, and then select "Tag", or "Album"?

If you do not see "Library" on top left corner, but "Search" instead, then first tap on the big square image on the right (should be a generic black picture with "moOde" written on it)

ETA
You should also click on "m" (top right) and chose "Update library" if not yet done...


RE: How to create local music source on SDCard File System - halfnote - 10-13-2023

Just a search bar in the upper left, and the block M in the upper right. Ran the "Update Library" several times.


RE: How to create local music source on SDCard File System - Nutul - 10-13-2023

(10-13-2023, 12:14 AM)halfnote Wrote: Just a search bar in the upper left, and the block M in the upper right. Ran the "Update Library" several times.

As I said, then, tap the "moOde" image on the right, this will bring you to the library view, and there, on top-left, you'll see "Library".
Tap on that and select TAG


RE: How to create local music source on SDCard File System - Tim Curtis - 10-13-2023

(10-13-2023, 12:14 AM)halfnote Wrote: Just a search bar in the upper left, and the block M in the upper right. Ran the "Update Library" several times.

Menu, Quick help explains how the WebUI works and how to navigate it.


RE: How to create local music source on SDCard File System - halfnote - 10-13-2023

Thanks all, I see my library now.