
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
Fetches album art from Discogs.com and Last.fm.
The built in Amarok Cover Manager only allows fetching from amazon.com, which may be fine if your music collection largely consists of popular music. But if large parts of your music collection are vinyl rips or releases on underground labels, searching discogs.com will yield much better results.
This script allows fetching album cover art for the currently playing track from discogs.com by clicking onto any track in the playlist and selecting:
"Fetch Covers" -> "For Currently Playing Track"
Already existing local album art (image files from the currently playing track's folder) as well as relevant album art from Last.fm and Discogs.com can then be browsed / saved / deleted.
Hint:
If the window is not opening in the foreground but started minimized with the taskbar item flashing, the KDE focus stealing prevention level doesn't allow focussing our window. This can be fixed by setting this:
System Settings > Window Behaviour > Advanced > Focus Stealing Prevention Level: None
Prerequisites:
- Qt4.4.X
- PyQt4 (Python bindings for QT)
Keyboard Shortcuts:
The GUI can completely be used through keyboard interaction.
Show CoverFetcher Tab: Alt+F
Show Configuration Tab: Alt+C
Show Log Tab: Alt+L
Save image: Alt+S
Delete image: Alt+D
Show next image: Alt+RightArrow
Show previous image: Alt+LeftArrow
(Un)fit cover to window: Alt+Z
Quit: Alt+F4 / Escape
11 years ago
Version 1.0-2009-02-09
- fixed: discogs.com changed their XML format, so I had to adapt as well
- added: a "search" button for better mouse interaction
Version 0.3.1.1-2008-08-17
- bugfix: program would hang if last.fm were not reachable
Version 0.3.1-2008-08-03
- added: naming schemes (fixed, album name, unambiguous id from discogs/last.fm)
Version 0.3-2008-07-16
- added: support for fetching covers from last.fm
- added: full unicode support
- added: configuration tab
- bugfix: script can now be stopped from Amarok Script Manager
- bugfix: marking text in logwindow will no longer cause text to be inserted in the wrong position
Version 0.2.1-2008-07-09
- GUI keyboard interaction improved
Version 0.2-2008-07-07
- GUI redesign
- many fixes & changes under the hood
Version 0.1-2008-06-23:
- initial release
11 years ago
Version 1.0-2009-02-09
- fixed: discogs.com changed their XML format, so I had to adapt as well
- added: a "search" button for better mouse interaction
Version 0.3.1.1-2008-08-17
- bugfix: program would hang if last.fm were not reachable
Version 0.3.1-2008-08-03
- added: naming schemes (fixed, album name, unambiguous id from discogs/last.fm)
Version 0.3-2008-07-16
- added: support for fetching covers from last.fm
- added: full unicode support
- added: configuration tab
- bugfix: script can now be stopped from Amarok Script Manager
- bugfix: marking text in logwindow will no longer cause text to be inserted in the wrong position
Version 0.2.1-2008-07-09
- GUI keyboard interaction improved
Version 0.2-2008-07-07
- GUI redesign
- many fixes & changes under the hood
Version 0.1-2008-06-23:
- initial release
ajshfjkahk
9 years ago
Report
ajshfjkahk
9 years ago
Report
hch
10 years ago
Report
kurumindeoyo
11 years ago
Error: Failed to determine the layout of your Qt installation. Try again using
the --verbose flag to see more detail about the problem."
I did look for answers in the Google, but I still found nothing. Please, help me!
Report
kurumindeoyo
11 years ago
Error: Failed to determine the layout of your Qt installation. Try again using
the --verbose flag to see more detail about the problem."
I did look for answers in the Google, but I still found nothing. Please, help me!
Report
ciso
11 years ago
I think I'm the biggest fan of this script ;)
Report
ciso
12 years ago
Will you make a port for Amarok2?
P.s. the Last.Fm search I think that doesn't work anymore, so I keep only the discogs one.
Report
evod
11 years ago
<Artist> - <Album>
discogs.com works - again - since a few days ago they broke my script with a small change in their XML response.
Report
muskatnuss
12 years ago
love it
but im a bedian user and here you will encounter several problems with it...
using debian etch and gnome 2.14.3
I encountered a big Problem with my debian packaged Version of PyQT.
When i start the script and take a look at the log it says:
Error: Wrong statement
self.discogsLinkLabel.setOpenExternalLinks(True)
this error is caused by PyQT 4.2 and lower
the function setOpenExternalLinks does not exist in packages below 4.4.X
so i build them from source and CoverFetcher works fine now :D
same problem?
solution:
Get the sources needed
$wget http://www.riverbankcomputing.co.uk/static/Downloads/PyQt4/PyQt-x11-gpl-4.4.3.tar.gz
$wget http://www.riverbankcomputing.co.uk/static/Downloads/sip4/sip-4.7.7.tar.gz
$wget ftp://ftp.trolltech.no/qt/source/qt-x11-opensource-src-4.4.3.tar.gz
PyQT = python QT bindings
SIP = python qt binder ^^
QT = Qt
now unpack them
$tar xvfz PyQt-x11-gpl-4.4.3.tar.gz
$tar xvfz sip-4.7.7.tar.gz
$tar xvfz qt-x11-opensource-src-4.4.3.tar.gz
installing qt
$cd qt-x11-opensource-src-4.4.3
$./configure | or | $sh configure
$make
$su -c make install
now add the qmake binding to your Exported path
$su -c nano /etc/profile
at the end of this document you find something like:
export PATH
cahnge it to:
export PATH=/usr/local/Trolltech/Qt-4.4.3/bin:$PATH
strg+o to save in editor nano ^^
you could take any you prefer eg. gedit or vim
go voer to install SIP
$cd ..
$cd sip-4.7.7
$python configure.py
$make
$su -c make install
now get on this python qt bindings
$cd ..
$cd PyQt-x11-gpl-4.4.3
$python configure.py
$make
$su -c make install
now all sould be done.
get to amarok and start your CoverFetcher =D
great script and i hope this works 4 you
if you encounter any problems ... let me know
Report
reggler
12 years ago
Nice script. Fetching of cover seems to work fine but onse i can see the cover, i hit save but the cover doesn't get added to the song in Amarok and the window stays open. Any idea what i'm doing wrong here?
Thanks!
Report
evod
12 years ago
The cover will just be copied to the folder where the album resides, Amarok will notice this only if you activate 'Watch folders for changes' in your Collection options.
Report
bquest
12 years ago
Would it be possible to prescribe a name for the downloaded cover? Like either the Album name or a user set name (like cover.jpg).
I ask this because my mp3 Player displays the Cover art when the device finds a jpg image with "cover.jpg" as filename.
And I think the Amarok script CopyCover is able to convert the folder symbol into the cover image when the picture is named "cover.jpg" as well.
Would be nice to have such a configuration option.
Other than that, really nice work. Thanks!
Report
evod
12 years ago
I'm thinking about how to design your proposed feature. Of course there can only be one cover.jpg and how to integrate this into the GUI without cluttering it..
I think of buttons with a functionality like 'Set as Front Cover' and 'Set as Back Cover' where the filenaming can be configured..
If you already have a specific idea on how to realize this or how you would like it just tell me :)
By the way: The use of copycover is not necessary, copycover is used to copy covers from the Amarok cache folder in your home directory to the folder where the album resides. My script copies the cover directly into the folder where the audio files are located, Amarok later finds out about this and copies it into the its cache folder.
Report
bquest
12 years ago
My reason for mentioning the CopyCover Script was that this script fetches the cover with a name like 646fb67583.jpg from Amarok's cache and copies it into the directory of the respective album (as I may have stated too imprecisely). The script allows you to either take over the album's name or to set the name as being 'Cover.jpg'.
Thus, maybe it is possible to "lend" the respective code from CopyCover and to adapt it to your fine script. I admit that I have no clue if this is feasible ... just an idea.
Best regards,
bquest
Report
evod
12 years ago
Report
bquest
12 years ago
Report
bsander
12 years ago
This sounds like a very useful script! I was wondering if it would be possible to integrate last.fm as an additional cover source in your extension. I find that usually last.fm yields better results for non-english artists than Amazon. And they have a very simple api (see http://www.last.fm/api/ and in particular http://www.last.fm/api/show?service=290 ). I filed this as a wish on Amarok a while ago but so far didn't receive a response.. If you could add this to your script that would be awesome!
Report
evod
12 years ago
Thanks for the hint, since I am no user of last.fm yet it didn't occur to me to use this as a cover source. I may integrate it in the future, but I'm not sure if there is a real benefit. Are there releases that are featured on last.fm and not on discogs.com? Discogs primarily featured electronic music but have opened up since then.. so could you give me some specific examples where last.fm would be required? (For motivational purposes :)
Report
tzd
12 years ago
I'll eagerly await the future releases :)
Thanks again!
Report
evod
12 years ago
If you didn't press escape then please look at the debug output for errors and post them here.
Report
tzd
12 years ago
Thanks for a great script!
I'm currently on Kubuntu Hardy (8.04) and I have no issues with the script. I've installed it via Amarok 1.4.9.1 and KDE 3.5.9.
I have a few suggestions for future releases though (freely translated):
1: Have it automatically download instead of default amazon.com or some kind of option where the user can choose from which source the art should be downloaded from. E.g: when you choose album art management and you'll be able to download art for all albums at the same time.
2: Be able to choose download art cover in the left panel and not just within the playlist. E.g: when you rightclick the album art picture.
Great work so far though! :)
Report
evod
12 years ago
So your two wishes are mine as well, but unfortunately I can't realize them in a script.
Report
vmarinho
12 years ago
Obs.: the same situation appears in the line "class DiscogsDataFetcher ():".
I have Python 2.3, 2.4 e 2.5 on my system and I have PyQt too.
Report
evod
12 years ago
class name[(expr[,expr]*)]:
####suite
try it with:
class Releases:
####...
I'm just wondering why it works on my system. Since you have several versions of Python installed the question is which one is used for executing the amarok script..
Report
vmarinho
12 years ago
I installed the script but it don't works. There was the following error message when I tried to make it works:
"File "/home/kurumin/.kde/share/apps/amarok/scripts/DiscogsCoverFetcher/DiscogsCoverFetcher.py", line 134
class Releases ():
^
SyntaxError: invalid syntax"
Since now, I thank you for the script and for your (future) help. I need too much this script because my amarok fetch cover don't fetch anymore.
Report