Copy All Cover

Amarok 2.x Scripts

Source (required if based on other people's work):

0
Score 70%
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:

7 years ago

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

mfraser

5 years ago

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

Report

mfraser

5 years ago

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.

Report

FraMari

6 years ago

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

Report

C

boerge

6 years ago

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

Report

pierat

6 years ago

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

Report

C

boerge

6 years ago

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.

Report

pierat

6 years ago

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.

Report

C

boerge

6 years ago

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

Report

pierat

6 years ago

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!

Report

C

boerge

6 years ago

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.

Report

mfraser

6 years ago

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

Report

mfraser

6 years ago

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.

Report

C

boerge

6 years ago

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)

Report

mfraser

6 years ago

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--.

Report

C

boerge

6 years ago

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 {} \;

Report

mfraser

6 years ago

Many thanks.

Report

pierat

7 years ago

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?

Report

C

boerge

7 years ago

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.

Report

aendruk

7 years ago

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

Report

C

boerge

7 years ago

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

Report

C

boerge

7 years ago

@aendruk
Does the version 1.4 now work for you?

Report

mfraser

7 years ago

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

Report

C

boerge

7 years ago

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"

Report

mfraser

7 years ago

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.

Report

C

boerge

7 years ago

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

Report

7 years ago

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

File (click to download) Version Description Packagetype Architecture Downloads Date Filesize DL OCS-Install
Pling
Details
license
version
1.7
updated Apr 09 2012
added Feb 04 2011
downloads today
0
page views today 5
System Tags addon