Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Local folder playback
#3
Hi,

sry for late reply, was busy...

Ah, I see, there's no "central" configuration for this items. That makes things worse.
Let me share my findings so far.

The reason for having bootfs & rootfs in the list: don't know. they are part of  /media. I didn't put them in there, they are automagically there. My setup: Raspi3B+, moode flashed to SSD (on usb) and on th sdCard there's bootcode.bin for succefsul boots. that's not an ideal setup. my Pi4 is coming in like a month. On Pi 3 it might be better to bot from SD card...

But let me recap what I found so far.
- MPD uses /var/lib/mpd/music to find it's music
- thumb-gen uses:

Code:
$mntDirs = str_replace("\n", ', ', shell_exec('ls /mnt'));
$mediaDirs = str_replace("\n", ', ', shell_exec('ls /media'));
aka /mnt and /media to LOG what it is searching for. 
in /media it adds a /USB in front of all entries.

if entries are in /mnt and /media, they are duplicated.

Code:
Scanning: NAS, SDCARD, VINYL, BOOTFS, rootfs, VINYL
but that's just a log based on thumb-gen.php. the real scanning for folders is then forwarded to list-songfiles.sh which again takes (hardcoded) /mnt and /media for finding posible libraries.

And I think here's a bug. But, please doublecheck :Smile
The original list-songfiles.sh used

Code:
find "/mnt/${DIRS[$i]}"
to identify the songfiles on /mnt. this didn't deliver any results on my setup. However, adding a trailing '/' to this find delivers a working list of files/dictionaries and thus a wonderfully created thumbnail.
so, my new / "fixed" code looks like this:

Code:
find "/mnt/${DIRS[$i]}/" -depth -mindepth 1 -type f -iregex ".*\.${TYPES_REGEX}" -printf "file: ""${DIRS[$i]}/""%P\n"

The difference between thos two versions is (on my example playground):

Code:
Done: 4 folders scanned, 4 thumbs created, 0 already in cache.

vs
Done: 6 folders scanned, 6 thumbs created, 0 already in cache.


Bonus fact: None of this methods uses
Code:
const ROOT_DIRECTORIES
from constants.php. So... there's  a lot of hardcoded folder/file knowledge that doesn't account to any settings/constants/mpd settings. maybe worth fixing this.

Kind regards,
Martin
Reply


Messages In This Thread
Local folder playback - by schmidtjr - 06-19-2024, 07:17 PM
RE: Local folder playback - by Tim Curtis - 06-19-2024, 08:48 PM
RE: Local folder playback - by schmidtjr - 06-21-2024, 07:28 PM
RE: Local folder playback - by Tim Curtis - 06-21-2024, 11:49 PM
RE: Local folder playback - by TheOldPresbyope - 06-21-2024, 08:49 PM
RE: Local folder playback - by Tim Curtis - 06-21-2024, 11:39 PM
RE: Local folder playback - by schmidtjr - 06-22-2024, 12:47 PM
RE: Local folder playback - by Tim Curtis - 06-22-2024, 01:14 PM
RE: Local folder playback - by schmidtjr - 06-22-2024, 08:36 PM
RE: Local folder playback - by bobfa - 06-22-2024, 05:48 PM
RE: Local folder playback - by philrandal - 06-22-2024, 06:09 PM
RE: Local folder playback - by Tim Curtis - 06-22-2024, 10:22 PM

Forum Jump: