Thank you for your donation!


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


Problem: can't update library
#35
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.
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
Reply


Messages In This Thread
can't update library - by Bert_K - 09-29-2024, 04:36 PM
RE: can't update library - by steve4star - 09-29-2024, 04:42 PM
RE: can't update library - by Bert_K - 09-29-2024, 05:27 PM
RE: can't update library - by Tim Curtis - 09-30-2024, 12:59 PM
RE: can't update library - by Nutul - 09-29-2024, 07:42 PM
RE: can't update library - by Bert_K - 09-29-2024, 09:24 PM
RE: can't update library - by Tim Curtis - 09-29-2024, 09:33 PM
RE: can't update library - by jonners - 09-30-2024, 09:00 AM
RE: can't update library - by Bert_K - 10-03-2024, 01:52 PM
RE: can't update library - by patrik96 - 03-25-2025, 08:39 AM
RE: can't update library - by Tim Curtis - 03-25-2025, 09:44 AM
RE: can't update library - by patrik96 - 03-25-2025, 03:17 PM
RE: can't update library - by patrik96 - 03-25-2025, 06:57 PM
RE: can't update library - by patrik96 - 03-26-2025, 05:35 AM
RE: can't update library - by Tim Curtis - 03-26-2025, 10:40 AM
RE: can't update library - by nosferatu_cat - 03-25-2025, 04:06 PM
RE: can't update library - by Tim Curtis - 03-25-2025, 06:28 PM
RE: can't update library - by Tim Curtis - 03-26-2025, 10:38 AM
RE: can't update library - by Tim Curtis - 03-26-2025, 12:31 PM
RE: can't update library - by Caesar - 03-25-2025, 05:09 PM
RE: can't update library - by patrik96 - 03-25-2025, 05:32 PM
RE: can't update library - by SirArmySuit - 03-25-2025, 05:35 PM
RE: can't update library - by Tim Curtis - 03-25-2025, 06:21 PM
RE: can't update library - by ils1974 - 03-25-2025, 06:56 PM
RE: can't update library - by Tim Curtis - 03-25-2025, 09:51 PM
RE: can't update library - by ils1974 - 03-25-2025, 11:50 PM
RE: can't update library - by DRONE7 - 03-26-2025, 05:54 AM
RE: can't update library - by ils1974 - 03-26-2025, 05:57 AM
RE: can't update library - by LaoZi - 04-23-2025, 05:01 PM
RE: can't update library - by Tim Curtis - 04-23-2025, 07:14 PM
RE: can't update library - by LaoZi - 04-24-2025, 06:11 PM
RE: can't update library - by Tim Curtis - 04-24-2025, 08:50 PM
RE: can't update library - by TheOldPresbyope - 04-24-2025, 09:31 PM
RE: can't update library - by LaoZi - 04-25-2025, 10:27 AM
RE: can't update library - by zbilic - 04-26-2025, 06:25 PM
RE: can't update library - by Tim Curtis - 04-26-2025, 07:32 PM
RE: can't update library - by zbilic - 04-26-2025, 08:46 PM
RE: can't update library - by Tim Curtis - 04-26-2025, 09:59 PM
RE: can't update library - by zbilic - 04-27-2025, 08:17 PM
RE: can't update library - by Tim Curtis - 04-27-2025, 10:27 PM
RE: can't update library - by zbilic - 04-28-2025, 05:45 AM
RE: can't update library - by uteroid - 05-02-2025, 12:49 AM
RE: can't update library - by Tim Curtis - 05-02-2025, 12:58 AM
RE: can't update library - by uteroid - 05-02-2025, 01:11 AM
RE: can't update library - by Tim Curtis - 05-02-2025, 10:32 AM
RE: can't update library - by uteroid - 05-02-2025, 08:24 PM
RE: can't update library - by Tim Curtis - 05-02-2025, 10:04 PM
RE: can't update library - by uteroid - 05-02-2025, 11:06 PM
RE: can't update library - by Tim Curtis - 05-03-2025, 12:44 AM
RE: can't update library - by uteroid - 05-03-2025, 12:49 AM
RE: can't update library - by Tim Curtis - 05-03-2025, 01:26 AM
RE: can't update library - by uteroid - 05-03-2025, 06:43 PM
RE: can't update library - by zbilic - 05-04-2025, 04:32 PM
RE: can't update library - by Tim Curtis - 05-04-2025, 09:46 PM
RE: can't update library - by uteroid - 05-05-2025, 03:32 PM
RE: can't update library - by Tim Curtis - 05-05-2025, 04:01 PM
RE: can't update library - by uteroid - 05-05-2025, 04:27 PM
RE: can't update library - by zbilic - 05-06-2025, 11:43 AM
RE: can't update library - by uteroid - 05-08-2025, 02:16 PM
RE: can't update library - by uteroid - 05-08-2025, 04:31 PM
RE: can't update library - by Nutul - 05-08-2025, 07:20 PM
RE: can't update library - by Tim Curtis - 05-05-2025, 09:00 PM

Forum Jump: