
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
Copy the cover of current playing track to the song's dir. Does not overwrite
existing images in this folder. The filenames can be configured with the
"Configure" dialog. By default, it's the album's name, with spaces replaced
by underscores.
An "offline" version is also included. If you have amaroK >= 1.2.3,
launch it and run the script on the command line. It will find all the downloaded covers and copy them in the right directory, just as the amarok plugin would have done. It also creates the desktop files.
Make sure you first run the script with the "-d" option (debug mode), in which
the actions will only be printed, not commited. A --help option is available.
AmaroK >= 1.2.3 and python >= 2.3 are required for this offline version.
The copycover-offline.py and addcoverdirs.sh scripts are NOT meant to be run through Amarok's script manager.
12 years ago
ChangeLog:
Version: 1.9 Date: 2007/10/21
- fix queries when the database is in MySQL
- tell the session manager not to restart the script on login
Version: 1.8 Date: 2007/02/17
- fix the copycover-offline.py script to use the new device path feature of
Amarok. Thanks to all those who sent me a patch.
Version: 1.7 Date: 2006/10/19
- fixes for Amarok 1.4
- progress bar on the offline version
- use large images when available
Version: 1.6 Date: 2005/05/31
- bugfixes for the "remove covers" option
Thanks a lot to Gleb Litvjak and KNT for that.
- write debuginfo to ~/.xsession-errors by default
12 years ago
ChangeLog:
Version: 1.9 Date: 2007/10/21
- fix queries when the database is in MySQL
- tell the session manager not to restart the script on login
Version: 1.8 Date: 2007/02/17
- fix the copycover-offline.py script to use the new device path feature of
Amarok. Thanks to all those who sent me a patch.
Version: 1.7 Date: 2006/10/19
- fixes for Amarok 1.4
- progress bar on the offline version
- use large images when available
Version: 1.6 Date: 2005/05/31
- bugfixes for the "remove covers" option
Thanks a lot to Gleb Litvjak and KNT for that.
- write debuginfo to ~/.xsession-errors by default
garthps
10 years ago
Because I am rely interested. I have also email the author to aske him if he plan this..
Report
garthps
10 years ago
Report
hachel
10 years ago
Is there anything I have to install in order to use the offline-script?
It just does this:
Quote:$ python copycover-offline.py -c cover.jpg
copycover-offline.py:17: DeprecationWarning: the md5 module is deprecated; use hashlib instead
import md5
Done.
and there is a rotating little bar for a couple of seconds until it says "done",
but nothing has happened, cover-wise.
any help?
Report
hachel
10 years ago
Report
tecuya
10 years ago
The following change (removing the devices table from the query) solves the issue for dynamic collection devices:
Quote:
--- copycover/copycover-offline.py 2007-10-21 07:04:22.000000000 -0700
+++ copycover_mine/copycover-offline.py 2009-01-09 15:52:05.000000000 -0800
@@ -116,8 +116,9 @@
inc = inc + 1
if inc >= len(progress):
inc = 0
- dcop_albums = commands.getoutput('''dcop amarok collection query "SELECT DISTINCT album.name, CONCAT(devices.lastmountpoint,'/',tags.dir) FROM tags, album, devices ''' \
- +'''WHERE tags.album = album.id AND tags.deviceid = devices.id AND album.name != '' AND tags.artist = %s"''' % artist_tuple[0])
+
+ dcop_albums = commands.getoutput('''dcop amarok collection query "SELECT DISTINCT album.name, tags.dir FROM tags, album ''' \
+ +'''WHERE tags.album = album.id AND album.name != '' AND tags.artist = %s"''' % artist_tuple[0])
if not dcop_albums:
continue
Report
rakekniven
10 years ago
Thank you
Report
mahen
10 years ago
Report
Takahani
10 years ago
I'm trying to write exactly the same script using qtscript, let U know when it's finished ...
Report
arealityfarbetween
10 years ago
Report
Takahani
10 years ago
Right now it can retrieve the current album url, problem is we'll have to wait for amarok 2.1 because the script API has been extended just for this functionnality, and this will be available for everybody only at this stage (2.1) ...
But I'll post here when it'll be finish
Report
gentiL
10 years ago
My problem is with the offline version.
It does something and I have tried with both -d and -v to see but it does not copy the files over to the destination.
It just says processing artists... and their names.
I have python 2.5.2 and Amarok 1.4.10.
I also tried adding -c folder.jpg
Am I doing something wrong?
Thanks!
Report
j4n
10 years ago
Here is a patch (replaces CONCAT (foo,bar)' with 'foo || bar').
Copy to file bar.patch and apply with patch -p0 bar.patch.
paste below sucks, no code format possible here, so grab it here: http://pastebin.com/f5e7bcc5f
Quote:
--- copycover-offline.py.org 2008-12-29 21:50:41.000000000 -0500
+++ copycover-offline.py 2008-12-29 22:01:40.000000000 -0500
@@ -116,7 +116,7 @@ for artist_tuple in artists:
inc = inc + 1
if inc >= len(progress):
inc = 0
- dcop_albums = commands.getoutput('''dcop amarok collection query "SELECT DISTINCT album.name, CONCAT(devices.lastmountpoint,'/',tags.dir) FROM tags, album, devices ''' \
+ dcop_albums = commands.getoutput('''dcop amarok collection query "SELECT DISTINCT album.name, devices.lastmountpoint || '/' || tags.dir FROM tags, album, devices ''' \
+'''WHERE tags.album = album.id AND tags.deviceid = devices.id AND album.name != '' AND tags.artist = %s"''' % artist_tuple[0])
if not dcop_albums:
Report
bony
11 years ago
PROBLEM: Some files actually are png-files and now are named with the wrong file type causing problems with my mp3 player.
"Bug" or bad usage?
Christoph
Report
crumley
11 years ago
What I found was that the dcops_album = line was failing for me due to the fact my devices table was empty:
mysql> SELECT * FROM devices;
Empty set (0.00 sec)
So I removed the references to devices in that line and fixed later spots so that they didn't depend on devices. Obviously that isn't the best way to fix things, but it worked for me.
Does anyone have any better suggestions?
Report
downdiagonal
11 years ago
Report
crumley
11 years ago
Report
downdiagonal
11 years ago
Report
ac4000
11 years ago
Report
Bake
11 years ago
I use Ubuntu 8.04 and when I run the script in Amarok 1.4.9 there is this error:
sh: kdialog: not found
Traceback (most recent call last):
File "/home/bake/.kde/share/apps/amarok/scripts/copycover.py", line 27, in <module>
from qt import *
ImportError: No module named qt
I installed pyqt4. What can I do?
Sorry if this a very stupid question but I'm a Linux newbie.
Report
skulled
11 years ago
Report
checkob
11 years ago
I've developed an bug fix for the 'concat' problem in the offline-copycover script.
the fixed script should now work for any database backed cause the string concatenation is made in python now, and no more in the database language.
here is it, just replace the old copycover-offline.py with that one:
http://attachr.com/private/d55ec021e8df30cbe0f922821554d57b
Report
checkob
11 years ago
http://binaryelysium.com/code/copycover-offline.txt
thanks again
Report
TommyHLW
11 years ago
Is it possible to give the folders a non-absolut path for the foldericon?
something like "/cover.png", insteat of "/media/hda3/music/artist/album/cover.png"
I think it's not really pretty, if i want to use the same harddrive on my other pc and they are only folders without any icons, because the absolut path is a different on the second pc.
Report
v6lur
11 years ago
Icon=./Cover.png
To show "Artist - Album.png" from parent-directory's subdirectory named "Covers":
Icon=./../Covers/Artist - Album.png
Report
stillingen
11 years ago
Report