Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

album art name #4

Open
stroggprog opened this issue May 17, 2024 · 0 comments
Open

album art name #4

stroggprog opened this issue May 17, 2024 · 0 comments

Comments

@stroggprog
Copy link

stroggprog commented May 17, 2024

The script looks for album art that has the name "folder.jpg" or "cover.jpg". I found that some of my folders used alternate names: "folder.png" and "cover.png", so adjusted the script to check for these.
[edited]
Some of my music folders have artwork with the same name as the folder they are in (a legacy from using Volumio in the past), so I included options to check for these. The updated artwork check now looks like this:


       if [ -f "${SONGFILE}" ];then 
            SONGDIR=$(dirname "$(readlink -f "${SONGFILE}")")
            SONGBASE=$(basename "${SONGDIR}" )
        
            if [ -f "$SONGDIR"/folder.jpg ];then
                COVERFILE="$SONGDIR"/folder.jpg
            elif [ -f "$SONGDIR"/folder.png ];then
                COVERFILE="$SONGDIR"/folder.png
            elif [ -f "$SONGDIR"/cover.jpg ];then
                COVERFILE="$SONGDIR"/cover.jpg
            elif [ -f "$SONGDIR"/cover.png ];then
                COVERFILE="$SONGDIR"/cover.png
            elif [ -f "$SONGDIR"/"$SONGBASE".jpg ];then
                COVERFILE="$SONGDIR"/"$SONGBASE".jpg
            elif [ -f "$SONGDIR"/"$SONGBASE".png ];then
                COVERFILE="$SONGDIR"/"$SONGBASE".png
            fi
        fi
 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant