OK, here is a windows cmd file that will embed the jpg using metaflac. 
You need to cut 'n paste this code to a file (say, called
"AddCoverArt.cmd") and put that file in the same directory with
metaflac.  Then create a shortcut to the cmd file on your desktop. 
Then you can drag and drop a flac file onto the shortcut and the cmd
file will then go ahead and embed the jpg.  Note: the jpg needs to be
in the same folder as the flac file and have the same base file name:
e.g. "Some Audio File.flac" and "Some Audio File.jpg"


Code:
--------------------
    
  @echo off
  rem WinXP CMD file to add a jpg to an existing FLAC file.  
  rem The flac and the jpg must have the same base filename.
  
  rem Check to see that we are processing a FLAC file..
  
  if "%~x1"==".FLAC" goto next
  if "%~x1"==".flac" goto next
  if "%~x1"==".JPG" goto next
  if "%~x1"==".jpg" goto next
  echo Sorry.  I only process FLAC files.  Better luck next time.
  pause
  goto end
  
  :next
  rem change to the input file drive and directory..
  %~d1
  cd "%~p1"
  cd
  
  if exist "%~n1.flac" goto ARTWORK
  
  :NO_FLAC
  echo Can't find "%~n1.flac"!!!!
  pause
  goto end
  
  :ARTWORK
  if exist "%~n1.jpg" goto HAS_ART
  echo Can't find "%~n1.jpg"!!!!
  pause
  goto end
  
  :HAS_ART
  "%~dp0metaflac.exe" --import-picture-from="|image/jpeg|||%~n1.jpg" "%~n1.flac"
  
  :TOUCHFILES
  rem echo Touching flac..
  "%~dp0touch.exe" "%~n1.flac"
  
  :end
  pause
  
  
--------------------


In windows, there isn't any need to escape the pipe characters if they
are enclosed in double quotes.  At least that's true in a batch file,
anyway.

The reference to "touch.exe" at the end of the script is so SlimServer
sees the flac file as "new".

Edit: I'll work out a script to mass change all embedded b64 coverart
tags to the new PICTURE block for a whole flac library sometime next
week.  I'll post it here in this thread.


-- 
gharris999
------------------------------------------------------------------------
gharris999's Profile: http://forums.slimdevices.com/member.php?userid=115
View this thread: http://forums.slimdevices.com/showthread.php?t=30143

_______________________________________________
beta mailing list
beta@lists.slimdevices.com
http://lists.slimdevices.com/lists/listinfo/beta

Reply via email to