[mythtv-users] Automatically downloading album cover art

Glenn Harris gharris+list+mythtv at eklo.com
Thu Dec 28 03:09:32 UTC 2006


The find line needs some parenthesis.  I have some flac files, so I
changed it to this:

find ${1:-.} . -type f \( -name \*.mp3 -o -name \*.ogg -o -name
\*.flac \) -exec dirname {} \; |

And, for anyone else using flac files, you can add this to the case
statement (you will need 'flac' installed, in ubuntu at least, to get
metaflac):

 *.flac)
         info=$(metaflac --list "$f")
         artist=`echo "$info" | grep -i 'artist=' | cut -d= -f2`
         album=`echo "$info" | grep -i 'album=' | cut -d= -f2`
 ;;

--Glenn

On 12/24/06, Jon Boehm <jbpub at comcast.net> wrote:
> Hi,
>
> I had the same problem until I changed this line to this
>
> find ${1:-.} . -type f -name \*.mp3 -exec dirname {} \; |
>
> I don't have non mp3s so I was ok.
>
> I did notice that when I couldn't find a file for the ID3 tag it
> created a zero length file called folder_large.jpg.  So I added this
>
>      if [ -f "$d"/folder_large.jpg ]; then
>         if [ -s "$d"/folder_large.jpg ]; then
>              echo "$d -- already has album art"
>              continue
>         fi
>      fi
> Not the second nesting. I don't think it helped.  The zero length
> files are still zero length so I think there was no amazon match.
>
> Hope this helps,
> Jon
>
>  > On 10/12/06, Tim Nichols <tnichols[at]is-design.com> wrote:
>
>  >> I've written the attached script to automatically download album
> cover
>  >> art. This is similar to Brad DerManouelian's albumart.pl, but it
> uses
>  >> id3info and ogginfo to extract artist and album name so that
> there is no
>  >> dependency on file structure. You need to have Paul Stuttard's
>  >> amazon.pl, vorbis-tools (ogginfo), and id3lib (id3info) installed
> for it
>  >> to function correctly.
>  >>
>  >> It currently only works for mp3 and ogg files as that is all that
> I have
>  >> personally.
>  >>
>  >> To install, put the script in your path somewhere (/usr/local/bin).
>  >> Then run it with your base music directory as a parameter:
>  >>
>  >> example:
>  >>
>  >> albuminfo.sh /var/music
>  >>
>  >Hi Tim. I downloaded your script and amazon.pl pointed in this thread
>  >but your script don't works for me.
>  >I tried to launch, specifiyng the path but I get no output on the
>  >console and, worst :), no covers file.
>  >How can I debug the script?
>  >
>  >thank you,
>  >antani
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>


More information about the mythtv-users mailing list