06-08-2018, 10:34 PM
(06-08-2018, 12:08 PM)rb0135 Wrote:(06-07-2018, 12:29 PM)Tim Curtis Wrote: Hi,
moOde uses the Zend Media library for fetching embedded cover art from MP3, FLAC, AAC and ALAC formats. AFAIK Zend Media is the only PHP lib that supports ALAC format.
Your could try to debug the library module. Have a look in /var/www/inc/Zend/Media
-Tim
Hi Tim,
I have been doing a lot of testing since the post and thanks, I did lookup one of the PHP files and saw the Zend Media Library.
What I have found, is that I am sure there is some caching going on with Zend. I know you mentioned that it doesn't, but, I have the Pi connected via wireless (tried wired as well).
What happens is the first time I play the song, the cover takes maybe 3-4 secs to come up (obviously reading from the file). If I switch to play another song, then come back to the first song, the cover is shown instantly (whether the correct one or not). To me, that means there is some caching going on. Now, I thought browser cache, but it does the same with several browsers, and even when I click on another song, clear the browser cache, then click back on the original, it still shows a cover instantly.
Also, songs that I have had the cover working seem to fail the next day.
I have even used metaflac (as per Kent's previous response) to insert the image into the file and it still doesn't show. Metaflac shows one that the cover always shows and the one that never shows, the metadata is exactly the same (ie: same fields, etc). I even changed the image to a simple 4kb image, and it still didn't show.
I thought about debugging and I have all the tools for .net/aspx but not for PHP. Any ideas on what I could use to debug.
Also, does anyone know where Zend writes its log files. The code seems to throw exceptions to logs so it would be good to see if and why it did.
I'm still testing ideas...
Thanks
Hi Rob,
The cache I was referring to is a not yet developed thumbnail image cache. This is simply a directory of small sized versions of all the cover images. Its typically built as part of a database scan process.
None of the PHP modules in moOde including the Zend Media modules do any sort of explicit image caching. Image and web page caches are maintained by NGINX (the Web Server) and by the client Browser. These caches operate automatically and are necessary for maintaining good performance.
This symptom "Also, songs that I have had the cover working seem to fail the next day." suggests some breakage somewhere and not bugs in the code.
Btw, I typically import CD's using iTunes and ALAC lossless format. I ensure that each track has embedded cover art then I use XLD to convert ALAC to FLAC. Works perfectly and I've never experienced any cover fails or file issues in moOde with either format.
-Tim