Copy All Cover

Amarok 2.x Scripts

Source i (link to git-repo or to original if based on someone elses unmodified work):

Add the source-code for this project on opencode.net

0
Become a Fan
7.5

Description:
Copies all album covers that were fetched by amarok to the album directories with the new name. The name and permissions are configurable in a settings dialog (initial: 00cover.*, 0644). The file extension is is determined automatically depending on the image format (jpg or png).

After installing you can find a new entry in the Tools menu to start it and a new entry in the Settings menu to configure it. After finishing a short message in the status bar will be displayed.

Existing cover files will not be overwritten. So you can call the command again after adding albums and fetching covers.
Last changelog:

1.0 Initial release
1.1 Fix: add device path to destination
1.2 More debug output
1.3 Fix getting device path
1.4 The cover file name is configurable
1.5 The permissions of the cover file are configurable
1.6 File extension is determined by the file format (jpg or png)
1.7 Fix problem if cover file does not exist


Ratings & Comments

29 Comments

mfraser

Had this plugin loaded and upgraded from Kubuntu 12.10 to 13.04, now whenever it is installed Amarok crashes straght after loading.

mfraser

It must be something I'm doing wrong as that computer isn't working with any downloaded scripts and I managed to install copy all cover successfully to Amarok on another computer.

FraMari

Hi! When i try to run Copy All Cover, i always get this error: CopyAllCover TypeError: Result of expression 'pathfile_this' [undefined] is not an object. Amarok 2.5.0 and KDE 4.8.1 on Chakra GNU/Linux

boerge

In the new version (1.7) this problem is fixed.

pierat

According to the command "file", the file 00cover.jpg contains a png image, and not a jpeg image!

boerge

It's not easy to correct it. Having more time I will work on it. But for now this error should not be a big problem. All picture viewer I know do not have any problem with the wrong file extension.

pierat

Some applications do have problems, e.g. the preview window in Gwenview when browsing a directory. That's how I noticed about the wrong content in the first place: Gwenview can open the file and display the image, but in the browsing window you get the "unknown" image. Funny.

boerge

Could you please verify whether the new version works for you?

pierat

Yes, it works. I had to delete all covers in order to make the script copy all covers again, but after that each cover had the right content. Thank you very much for the update and the quick response!

boerge

I just uploaded the new version 1.6 of the script. In this version the file extension is determined depending on the file format. Could you test it, please? You do not have to remove already existing cover files with bad extension before running the script. The script should recognise and correct this.

mfraser

Can't seem to get it to work after the update. It says it has copied 23 covers, but nothing seems to have changed.

mfraser

Also after running copy all cover, cover art isn't displayed in Amarok anymore until I quit and reload. Even caused me to lose all the rating star images yesterday. I am using Amarok 2.4.3.

boerge

This can happen if you configure the name for the cover files as "cover.jpg". This name has a special meaning for amarok and if such file exists in the album directory it will be used for whatever. The new version of this script deletes the file "cover.jpg" if the file format is png. If you do not want to have this trouble configure another name for the cover file (i.e. "00cover".jpg/png)

mfraser

Is it possible to add the option of changing the file permissions? At the moment they are set as rw-rw----, but I would prefer rw-r--r--.

boerge

I just uploaded the new version 1.5 Here you can configure the file permissions. Please note: The permissions of already existing files are not changed, but you can perform the following command to change them: # find <root path of collection> -name 00cover.jpg -print -exec chmod 644 {} \;

mfraser

Many thanks.

pierat

Hi! This script is just what I was looking for! But unfortunately it doesn't copy all covers. There are ~200 albums in my collection and for each one a cover was fetched by Amarok. But the script only copies 53 covers. What about the other 150 covers? What can I do to get all covers copied?

boerge

After checking the database (@pierat: thanks for sending the database for testing) I found that in the albums table the references to the images have been lost. IMO this was the result of one of the bugs in amarok in the row of upgrades from 1.4 to 2.4 So, it is not a bug in this script. The only possibility I found to repair this is to refetch all the covers. BTW: Despite of this bug in the database the covers are shown in the collection tree as cached icons without database access.

aendruk

I'd love to have a way to specify a filename other than 00cover.jpg. Rockbox users have to meet specific naming requirements: http://download.rockbox.org/daily/manual/rockbox-sansae200/rockbox-buildap3.html#x18-390000C.21.2

boerge

I just uploaded the new version 1.4 In this version you can configure the file name.

boerge

@aendruk Does the version 1.4 now work for you?

mfraser

[ScriptManager] script info: "CopyAllCover" "1.2" "Generic" "Amarok2.0" is the only place that CopyAllCover mentioned in the debug output.

boerge

Did you forget to call "Copy All Cover" from the Tools menu? Otherwise you have no fetched cover in your local Collection database if there is no debug output such as amarok: SCRIPT "CopyAllCover" : "CopyAllCover Mystery to Me s: /home/bernd/.kde4/share/apps/amarok/albumcovers/large/96879f4734c3f366233a02dbb9d691ff, d: /home/bernd/Musik/Alben/Fleetwood Mac/1973 Mystery to Me/00cover.jpg, dev: /home, ie: true, pe: true"

mfraser

I have lots of cover art in my collection and CopyCover2 finds it, but using Copy All Cover keeps telling me I have no covers.

boerge

The problem should be fixed in version 1.3 Could you please verify?

Pling
0 Affiliates
Details
license
version 1.7
updated
added
downloads 24h 0
mediaviews 24h 0
pageviews 24h 0

Other Amarok 2.x Scripts:

raya
raya1234
last update date: 15 years ago

Score 5.0

Partition Assistant
shiny521
last update date: 15 years ago

Score 5.0

google-clone
jenifferhomes
last update date: 15 years ago

Score 5.6

Quran Audio Library
boubakr92
last update date: 12 years ago

Score 4.4

Remove Current Track
alexoleshkevich
last update date: 14 years ago

Score 4.7

indoLyrics
cyrus007
last update date: 14 years ago

Score 4.7



System Tags