
Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net
EmbedCover is a script for embedding album cover images in MP3 files. The script will automatically look up the image associated to it in amaroK and embed this image into the file.
CAUTIONS:
- If the file already had image inside, it will be overwritten.
- This operation is NOT reversible
12 years ago
v0.7.6:
Fix for VA/Compilation tracks
v0.7.5:
Support for ID3v2.3 & ID3v2.4 (Tags with ID3v2.3's frame size will be converted to ID3v2.4 format).
Tags prior to ID3v2.3 are not supported.
v0.7.4:
1. Overwrite image if the type is "cover (front)" (0x03) or "other" (0x00) -> changed because many MP3 files do not conform ID3 tag frame rules...
2. Simplified output/error messages
12 years ago
v0.7.6:
Fix for VA/Compilation tracks
v0.7.5:
Support for ID3v2.3 & ID3v2.4 (Tags with ID3v2.3's frame size will be converted to ID3v2.4 format).
Tags prior to ID3v2.3 are not supported.
v0.7.4:
1. Overwrite image if the type is "cover (front)" (0x03) or "other" (0x00) -> changed because many MP3 files do not conform ID3 tag frame rules...
2. Simplified output/error messages
chrisvdb
11 years ago
Does this script work with Amarok 2.2?
When I installed the script I received a success notification, but after restarting the script does not show as installed and the context menu did not change.
Is this normal behavior under 2.2?
Thanks,
Chris.
Report
knightrider
11 years ago
Report
rain84src
11 years ago
based on what i've understood of your plugin, it make use on the image database that amarok keeps for album arts...so i've tried to embed some album arts that i've set as custom cover providing an image from my hard disk...and indeed the script says that there aren't any image associated with that file..i guess that this means that amarok doesn't store custom cover in its database or maybe can be due to something else? Any solution possible for this?
Report
knightrider
11 years ago
then
right click > EmbedCover > DoIt!
Report
ghanarama
12 years ago
Report
poe84it
12 years ago
I've fixed thath in this way in my local copy:
#that's the original
artist_id = `dcop amarok collection query "SELECT DISTINCT artist FROM tags WHERE url = '#{dcopfile}'"`.chomp()
artist = `dcop amarok collection query "SELECT DISTINCT artist.name FROM artist WHERE id = '#{artist_id}'"`.chomp()
album_id = `dcop amarok collection query "SELECT DISTINCT album FROM tags WHERE url = '#{dcopfile}'"`.chomp()
album = `dcop amarok collection query "SELECT DISTINCT album.name FROM album WHERE id = '#{album_id}'"`.chomp()
#and i've added that
is_in_VA = `dcop amarok collection query "SELECT DISTINCT sampler FROM tags WHERE url = '#{dcopfile}'"`.chomp()
#----
#and modify this
#md5sum = MD5.hexdigest( "#{artist.downcase()}#{album.downcase()}" )
#in that
if is_in_VA == "1"
md5sum = MD5.hexdigest( "#{album.downcase()}" )
else
md5sum = MD5.hexdigest( "#{artist.downcase()}#{album.downcase()}" )
end
#end mod
I hope to be helpful
Report
grana
12 years ago
I don't know, perhaps it is related to the source of the cover, if cached by amazon or else.
Can you help me?
Report
grana
12 years ago
When this happens, and you try to embed it in the mp3, the error occurs.
Report
knightrider
12 years ago
Report
grigorescu
12 years ago
Also, can it check to see if an MP3 already has an image embedded, and skip it if it does? Since that's another way to get this error: if an MP3 has an embedded image, Amarok won't store a separate image for it, and then it complains that it can't find an image.
Report
Khan
12 years ago
Report
knightrider
12 years ago
Report
Khan
12 years ago
~/Music/Artist/Album/TrackNo-TrackName.mp3
Is this script looking for a specific image type of a specific location for the Amarok DB?
Report
knightrider
12 years ago
>~/Music/Artist/Album/TrackNo-TrackName.mp3
Mmm... this info is not enough...
> Is this script looking for a specific image type of a specific location for the Amarok DB?
It uses the images in Amarok DB, which are always stored as PNG.
Report
Khan
12 years ago
>~/Music/Artist/Album/TrackNo-TrackName.mp3
>Mmm... this info is not enough...
That's the file structure for the files. What information are you specifically looking for?
> Is this script looking for a specific image >type of a specific location for the Amarok DB?
>It uses the images in Amarok DB, which are always stored as PNG.
What if the cover image is set manually? For example, I have a file called cover.jpg in each album folder. Does Amarok that that image, converts it to a PNG file and then inserts it into the DB or does it link to the JPG in the folder?
Report
knightrider
12 years ago
$ rm -rf ~/.kde/share/apps/amarok ~/tmp/ksocket-guest/amarok.visualization_socket ~/.kde/share/config/amarok*
and restart amarok.
Hope this helps.
Report
Khan
12 years ago
No doubt something did get corrupted. That DB has been upgraded who knows how many times. I've been running Amarok almost since it's inception. Thanks again for you help.
Report
Khan
12 years ago
Report
MilhousePunkRock
12 years ago
Thanks for picking up the work on this script.
I would love to have EmbedCover working somewhat automagically, as in embedding the cover while a track is playing (like the CopyCover script http://kde-apps.org/content/show.php/CopyCover+(amaroK+Script)?content=22517 does its work silently in the background).
Do you think you can add a little configurability? So we can choose which APIC tag gets written, and more importantly, which filetype the picture is. My Windows-centric MP3 player can only deal with Cover(Front) (which apparently is the type of picture that gets embedded) in jpg, so it won't display the png picture (at least Kid3 tells me it's png).
Anyway, thanks for the good work, it's much appreciated!
Rock on,
MilhousePunkRock
Report
knightrider
12 years ago
Report
markey
12 years ago
I was really hoping that someone takes over, since I've been too busy lately to continue developing it.
Good luck!
Report
knightrider
12 years ago
I'm very new to Ruby and can't promise to maintain so any help is welcomed.
-Bud
Report
josep
12 years ago
It is possible to extend this script to other formats like Ogg and FLAC?
Report
knightrider
12 years ago
Report
markey
12 years ago
Report