Thank you for your donation!


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


Solved: Albums Tags & Power On/Off
#1
Hello,
I discovered Moode Audio a few weeks ago while looking for a software to manage my music library. I set up a test platform: Raspberry Pi 3B, Raspberry Pi DAC 24 bits, 192kHz, (AliExpress), 4Tb hard drive, 7 inches touch screen, rotary encoder for the volume. Congratulations to the development team, it's a great job.
Here are my questions:
1- The covers of my albums are tagged "_front" and "_back", the software doesn't make the distinction and takes the covers in alphabetical order, or change this setting in the program.
2- I also want to turn off the power when the Raspberry Pi is turned off, do you have a solution to advise me (hardware and software)?
Respectful regards.
Olivier
Reply
#2
The cover art code in moOde can extract a single embedded over, the first one it finds in the file, or it can use a cover file if it finds one in the album directory.  The file names it looks for are below.

Code:
$covers = array(
    'Cover.jpg', 'cover.jpg', 'Cover.jpeg', 'cover.jpeg', 'Cover.png', 'cover.png', 'Cover.tif', 'cover.tif', 'Cover.tiff', 'cover.tiff',
    'Folder.jpg', 'folder.jpg', 'Folder.jpeg', 'folder.jpeg', 'Folder.png', 'folder.png', 'Folder.tif', 'folder.tif', 'Folder.tiff', 'folder.tiff'
);

If it can't find any of those files then it looks for any file with the following extensions.

Code:
$extensions = array('jpg', 'jpeg', 'png', 'tif', 'tiff');
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#3
Thank you Tim for that answer.
Before asking the question about the covers I did several researches and modified the code of the covertart.php file. After the modification I re-scanned the base but I still have "_back" covers displayed.
Indeed it takes the first file it encounters.
Best regards.
Olivier

Code:
function parseFolder($path) {
    //workerLog('coverart: parseFolder(): ' . $path);
    // default cover files
    $covers = array(
        '_Front.jpg', '_front.jpg', 'Cover.jpg', 'cover.jpg', 'Folder.jpg', 'folder.jpg'
        //'Cover.jpeg', 'cover.jpeg', 'Cover.png', 'cover.png', 'Cover.tif', 'cover.tif', 'Cover.tiff', 'cover.tiff',
        //'Folder.jpg', 'folder.jpg', 'Folder.jpeg', 'folder.jpeg', 'Folder.png', 'folder.png', 'Folder.tif', 'folder.tif', 'Folder.tiff', //'folder.tiff'
    );
Reply
#4
maybe You need to clean the browser cache...
Reply
#5
(02-11-2021, 09:18 PM)leosaro Wrote: Thank you Tim for that answer.
Before asking the question about the covers I did several researches and modified the code of the covertart.php file. After the modification I re-scanned the base but I still have "_back" covers displayed.
Indeed it takes the first file it encounters.
Best regards.
Olivier

Code:
function parseFolder($path) {
    //workerLog('coverart: parseFolder(): ' . $path);
    // default cover files
    $covers = array(
        '_Front.jpg', '_front.jpg', 'Cover.jpg', 'cover.jpg', 'Folder.jpg', 'folder.jpg'
        //'Cover.jpeg', 'cover.jpeg', 'Cover.png', 'cover.png', 'Cover.tif', 'cover.tif', 'Cover.tiff', 'cover.tiff',
        //'Folder.jpg', 'folder.jpg', 'Folder.jpeg', 'folder.jpeg', 'Folder.png', 'folder.png', 'Folder.tif', 'folder.tif', 'Folder.tiff', //'folder.tiff'
    );

Are your covers embedded or are they cover files?
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#6
My covers are in the same folder where the mp3 files are located.

Thanks Smile
Reply
#7
lol, I didn't notice your changes in the code box.

Did you make same changes in /var/www/comand/thmcache.php?
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#8
I only modified the file coverart.php
I added  _Front.jpg _front.jpg   ....

Thanks Tim.

Code:
$covers = array(
        '_Front.jpg', '_front.jpg', 'Cover.jpg', 'cover.jpg', 'Folder.jpg', 'folder.jpg'
Reply
#9
Indeed it is necessary to modify the file:
/var/www/command/thmcache.php
Attached is the code that I modified for my needs especially for the "_Front" and "_front" files.
I have done the test, the covers are correctly filled in.
Is the file "coverart.php" still in use?

For the management of the on/off of the Raspberry I will see to find a solution, I will share future information on this subject on the forum.

Thanks Tim for your precious help.  

Code:
function parseFolder($path) {
    //workerLog('thmcache: parseFolder(): ' . $path);
    // Default cover files
    $covers = array(
        '_Front.jpg', '_front.jpg', 'Cover.jpg', 'cover.jpg', 'Folder.jpg', 'folder.jpg'
);
Reply
#10
Yes, coverart.php is used to fetch the full sized cover thats displayed in Playback view and CoverView. Thmcache.php generates the standard cover thumbs for Tag and Album views and the small thumbs for the Queue and Folder view.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply


Forum Jump: