Thank you for your donation!


MPD auto update
#11
(04-04-2020, 01:04 AM)TheOldPresbyope Wrote: Curious.

When I transferred a bunch of new music files to a subdirectory under /media/Test, where Test is the top level directory on a mounted USB thumbdrive, using either the mpc or the telnet methods causes them to show up under USB/Test in the folder list.

If I transfer a file directly to /media it gets scanned too, although that's not really supposed to be a location for music files. It's the mount point for USB drives.  I would use /mnt/SDCARD for storing files on the uSD card.

Regards,
Kent

My newly transferred files appear in the folder view tab okay, it's the library tab where they don't show up after mpc or telnet efforts.

WRT the mount point for USB drives, moode handles this automatically (thanks Tim) so I haven't messed with it.

Cheers,
Roger
Reply
#12
(04-04-2020, 10:38 AM)the_bertrum Wrote: I've had a similar issue in the past which was caused by the number of files in my collection exceeding the space for inotify meaning only updates to those already with an inotify handle got updated. Could that be at play here?

Thanks for that. I don't know what inotify is (linux rookie here) but I'm guessing the issue is that pressing the button to update in the Libray Config gui does something more than just issue an 'mpc update' command.

As I've said, I'm a little out of my depth here so apologies if the terminology is incorrect or misleading.

Cheers,
Roger
Reply
#13
@Coustard

Quote:My newly transferred files appear in the folder view tab okay, it's the library tab where they don't show up after mpc or telnet efforts.

Sorry, I missed this. It suggests your newly transferred files don't have any metadata. 

In the folder view, tracks without metadata will listed by their filename. Not so in the tag view and the album by artist views. Tracks must have a proper metadata tag to be listed.

You can check your files from the moOde command line using the mediainfo command:

Code:
pi@moode:/media/MUSIC/BLUES/Junkyard Saints-Jes Like your Mama Told You! $ mediainfo '01.She Put The Whammy On Me, Ray.flac'
General
Complete name                            : 01.She Put The Whammy On Me, Ray.flac
Format                                   : FLAC
Format/Info                              : Free Lossless Audio Codec
File size                                : 31.9 MiB
Duration                                 : 4 min 45 s
Overall bit rate mode                    : Variable
Overall bit rate                         : 937 kb/s
Album                                    : Jes Like your Mama Told You!
Track name                               : She Put The Whammy On Me, Ray
Track name/Position                      : 01
Track name/Total                         : 10
Performer                                : Junkyard Saints
Genre                                    : Blues
Recorded date                            : 2001
Comment                                  : abcde version 2.9.2
CDDB                                     : 710b980a

...

If you don't see lines like Album, Track name, ..., then your track hasn't been tagged with metadata.

Quote:WRT the mount point for USB drives, moode handles this automatically (thanks Tim) so I haven't messed with it.

Yeah, moOde handles the mount points (which are at /media), but you said you transferred your files to the /media folder itself. That's not good practice.

As for inotify, that's a Linux function which is used in detecting files which have changed. See Tim's reply to your original post.

Regards,
Kent
Reply
#14
Hi Kent,

The transferred files definitely have metadata - they show up in the Moode library after updating the library with the Library Config 'MPD Update' button. 

I'm afraid I confused things when I referred to 'my media folder'. I meant the folder I use for music files, which is on the USB stick, not /media.

My issue seems to be that 'mpc update' from the command line (or 'update' over Telnet to MPD) does not update the library, but the 'update' button in the gui Library Config does.

Thanks again,
Roger
Reply
#15
@Coustard

Ok, morning coffee and I finally repro'd your issue. 

It appears that, after I uploaded files and executed an "mpc update", MPD successfully updated its database but moOde continued to serve information from a stale library tag cache. When I deleted the library tag cache (in M > MPD Config/Album and Tag Views submenu) then the added files showed up in all views.

@Tim Curtis: any suggestions?

Regards,
Kent
Reply
#16
Ah grand. Thanks Kent - I was beginning to think I was going mad.
Reply
#17
(04-04-2020, 02:05 PM)TheOldPresbyope Wrote: @Coustard

Ok, morning coffee and I finally repro'd your issue. 

It appears that, after I uploaded files and executed an "mpc update", MPD successfully updated its database but moOde continued to serve information from a stale library tag cache. When I deleted the library tag cache (in M > MPD Config/Album and Tag Views submenu) then the added files showed up in all views.

@Tim Curtis: any suggestions?

Regards,
Kent

The Library in moOde is generated by three separate processes:

1. MPD database update
2. The Library tag cache generator a.k.a the Library loader
4. The cover art thumbnail generator

In the context of upcoming release 6.5.0 where the 3 processes are combined into a singe "Library update" process it would be trivial to add a command to the WebAPI that would allow Library update to be submitted via a URL. Something like below.

Code:
http://moode/command/?cmd=libupd_submit
Reply
#18
Hi Tim,

TBH, it would be more convenient for me to do it from the command line (another moodeutl option, perhaps?) or just to make it easier to get to in the browser gui, perhaps with an addition to the vM menu?

How useful this is to anyone else, I don't know, so it's probably low priority. It's just that with (for example) Asset UPnP or Twonky you add files to the media folders and they automatically appear in the library. 

Thanks,

Roger
Reply
#19
In addition to the web api you can run the command /var/www/libupd-submit from ssh
Reply
#20
(04-05-2020, 12:20 PM)Tim Curtis Wrote: In addition to the web api you can run the command /var/www/libupd-submit from ssh

Brilliant! That's exactly what I need.

Thanks Tim (and Kent) - really appreciate the help.

Cheers,
Roger
Reply


Forum Jump: