04-26-2025, 06:25 PM
Hello,
I can't update the library either, after the latest update.
The source for the library is a remote SAMBA filesystem.
It was working flawlessly on the last major Release 8.3.9.
After a fresh install to version 9.x.x, the library update problem occurred several times..
Which was solved by clearing the cache and regenerating the library. Sometimes the process got stuck, which a RPI restart would "fix".
Currently initiating a library update, the progress spinner never stops, and as a result, the library is empty (only one folder from SAMBA drive is displayed (A-J), and the content is empty).
On other clients, accessing the SAMA filesystem works without any problems.
Please advice, what steps are needed to collect symptoms for analysis?
So far, I've tried this.
# I cheked mounted SAMBA filesystem, and it is OK.
# Is it the library Database location?
# Moode DB - it is OK
# I tried to run list-songfiles.sh util and it produced a valid list of songs.
On the Configuration/System/ there is Debug logging, but I can't see an option for the Library.
I assume that deamon is responsable for library update, but not sure how to debug, or collect symptops.
Kind regards,
Zlatko
I can't update the library either, after the latest update.
The source for the library is a remote SAMBA filesystem.
It was working flawlessly on the last major Release 8.3.9.
After a fresh install to version 9.x.x, the library update problem occurred several times..
Which was solved by clearing the cache and regenerating the library. Sometimes the process got stuck, which a RPI restart would "fix".
Currently initiating a library update, the progress spinner never stops, and as a result, the library is empty (only one folder from SAMBA drive is displayed (A-J), and the content is empty).
On other clients, accessing the SAMA filesystem works without any problems.
Please advice, what steps are needed to collect symptoms for analysis?
So far, I've tried this.
Code:
root@moode:~# moodeutl -l
------------------SNIP-----------
20250426 023505 worker: --
20250426 023505 worker: -- Start moOde 9 series
20250426 023505 worker: --
20250426 023505 worker: Daemonize: complete
20250426 023506 worker: Linux startup: complete
20250426 023506 worker: Boot config: ok
20250426 023506 worker: Boot folder: ok
20250426 023506 worker: Radio table: ok
20250426 023508 worker: PHP session: cleaned
20250426 023508 worker: PHP session: loaded
20250426 023510 worker: Package locks: applied
20250426 023512 worker: File check: complete
20250426 023512 worker: Log to RAM: on
20250426 023512 worker: Tmp to RAM: on
20250426 023512 worker: Debug logging: off
20250426 023512 worker: --
20250426 023512 worker: -- System
20250426 023512 worker: --
20250426 023514 worker: Host name: moode
20250426 023514 worker: RPi model: Pi-4B 1.4 2GB
20250426 023514 worker: moOde release: 9.3.2 2025-04-16
20250426 023514 worker: RaspiOS: 12.9 Bookworm 64-bit
20250426 023514 worker: Linux Kernel: 6.12.20 64-bit
20250426 023514 worker: MPD version: 0.24.3
20250426 023514 worker: User id: backup
20250426 023514 worker: Home folder: /home/backup
------------------SNIP-----------
# I cheked mounted SAMBA filesystem, and it is OK.
Code:
root@moode:~# ls -l /mnt/NAS/Router/
total 5120
drwxrwxrwx 1 root root 0 Feb 19 20:29 'Adele - 25 (Target Deluxe Edition) (2015) Flac'
drwxrwxrwx 1 root root 0 Nov 28 2021 'Adele - 30 (2021) [24 Bit Hi-Res] FLAC [PMEDIA] ⭐️'
drwxrwxrwx 1 root root 0 Oct 20 2022 'Air - Moon Safari 2008 (10th Anniversary Special Edition)[FLAC]'
drwxrwxrwx 1 root root 0 May 5 2021 A-J
drwxrwxrwx 1 root root 0 Aug 15 2022 'Alan Dovic'
...
drwxrwxrwx 1 root root 0 Apr 18 2021 'Zaz-Recto Verso (2013) 16-44 CD FLAC [Deluxe Edition]'
drwxrwxrwx 1 root root 0 Feb 19 22:52 'Zoran Majstorovic - Simple Game [2015]'
drwxrwxrwx 1 root root 0 May 7 2021 'ZZ Top - Greatest Hits (1992) [FLAC]'
# Is it the library Database location?
Code:
root@moode:~# ls -ltr /var/lib/mpd/database
-rw-r--r-- 1 mpd audio 3321 Apr 24 10:24 /var/lib/mpd/database
sqlite> .open /var/lib/mpd/database
sqlite> .tables
Error: file is not a database -> I assume this could be the result of a lack of library?!
# Moode DB - it is OK
Code:
sqlite> .open /var/local/www/db/moode-sqlite3.db
sqlite> .tables
cfg_airplay cfg_eqp12 cfg_network cfg_sl cfg_system
cfg_audiodev cfg_gpio cfg_outputdev cfg_source cfg_theme
cfg_deezer cfg_mpd cfg_plugin cfg_spotify cfg_upnp
cfg_eqalsa cfg_multiroom cfg_radio cfg_ssid
# I tried to run list-songfiles.sh util and it produced a valid list of songs.
Code:
root@moode:~# script -c "bash -x /var/www/util/list-songfiles.sh" list-songfiles.debug
root@moode:~# less list-songfiles.debug
------------------SNIP-----------
Script started on 2025-04-26 19:40:19+02:00 [COMMAND="bash -x /var/www/util/list-songfiles.sh" TERM="xterm" TTY="/dev/pts/0" COLUMNS="232" LINES="84"]
+ '[' -z ']'
+ TYPES_REGEX='\(aac\|aif\|aiff\|dff\|dsf\|flac\|m4a\|mp3\|mp4\|ogg\|wav\|wma\|wv\)'
++ ls /mnt/
+ RESULT='NAS
NVME
SATA
SDCARD'
+ readarray -t DIRS
+ for i in "${!DIRS[@]}"
+ '[' NAS '!=' moode-player ']'
+ find /mnt/NAS -depth -mindepth 1 -type f -iregex '.*\.\(aac\|aif\|aiff\|dff\|dsf\|flac\|m4a\|mp3\|mp4\|ogg\|wav\|wma\|wv\)' -printf 'file: NAS/%P\n'
file: NAS/Router/A-J/Dino_Dvornik_-_Zasto_mi_radis_to.mp3
file: NAS/Router/A-J/01_tubular_bells_part_1_original_edit.mp3
...
file: NAS/Router/Leb i Sol(I-II)/17-Leb I Sol-Bonus.flac
+ for i in "${!DIRS[@]}"
+ '[' NVME '!=' moode-player ']'
+ find /mnt/NVME -depth -mindepth 1 -type f -iregex '.*\.\(aac\|aif\|aiff\|dff\|dsf\|flac\|m4a\|mp3\|mp4\|ogg\|wav\|wma\|wv\)' -printf 'file: NVME/%P\n'
+ for i in "${!DIRS[@]}"
+ '[' SATA '!=' moode-player ']'
+ find /mnt/SATA -depth -mindepth 1 -type f -iregex '.*\.\(aac\|aif\|aiff\|dff\|dsf\|flac\|m4a\|mp3\|mp4\|ogg\|wav\|wma\|wv\)' -printf 'file: SATA/%P\n'
+ for i in "${!DIRS[@]}"
+ '[' SDCARD '!=' moode-player ']'
+ find /mnt/SDCARD -depth -mindepth 1 -type f -iregex '.*\.\(aac\|aif\|aiff\|dff\|dsf\|flac\|m4a\|mp3\|mp4\|ogg\|wav\|wma\|wv\)' -printf 'file: SDCARD/%P\n'
file: SDCARD/Stereo Test/LRMonoPhase4.flac
+ find /media/ -depth -mindepth 1 -type f -iregex '.*\.\(aac\|aif\|aiff\|dff\|dsf\|flac\|m4a\|mp3\|mp4\|ogg\|wav\|wma\|wv\)' -printf 'file: USB/%P\n'
Script done on 2025-04-26 19:40:39+02:00 [COMMAND_EXIT_CODE="0"]
------------------SNIP-----------
On the Configuration/System/ there is Debug logging, but I can't see an option for the Library.
I assume that deamon is responsable for library update, but not sure how to debug, or collect symptops.
Code:
/var/www/daemon/worker.php
:::
// Library update, MPD database regen
$check_library_update = '0';
$check_library_regen = 0;
:::
// Check for library update complete
function chkLibraryUpdate() {
//workerLog('chkLibraryUpdate');
$sock = openMpdSock('localhost', 6600);
$status = getMpdStatus($sock);
$stats = getMpdStats($sock);
closeMpdSock($sock);
if (!isset($status['updating_db'])) {
sendFECmd('libupd_done');
$GLOBALS['check_library_update'] = '0';
workerLog('mpdindex: Done: indexed ' . $stats['artists'] . ' artists, ' . $stats['albums'] . ' albums, ' . $stats['songs'] . ' songs');
workerLog('worker: Job update_library done');
}
}
// Check for library regen complete
function chkLibraryRegen() {
//workerLog('chkLibraryRegen');
$sock = openMpdSock('localhost', 6600);
$status = getMpdStatus($sock);
closeMpdSock($sock);
if (!isset($status['updating_db'])) {
sendFECmd('libregen_done');
$GLOBALS['check_library_regen'] = '0';
workerLog('worker: Job regen_library done');
}
}
Kind regards,
Zlatko