SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#76 2009-08-08 01:37:27

Kyte
#! Junkie
From: midwest usa
Registered: 2009-07-19
Posts: 275

Re: Images in Conky (specifically rhythmbox album art)

OK I did all of the above. 

With the cp -R commands, nothing happned, but at least there was no error message generated.

However, no album cover.

As to my version, as asked above it is conky 1.4.9.

I'm beginning to wonder if the problem is that I maybe have other "conflicting" stuff on the machines from when I was trying to get XMMS2 to run..?

I also have an install on a laptop that I have no tried to get xmms2 to work on so I'm going to try this on that machine.

Thanks for all the help.

Kyte


Kyte: Always flittin' around with his head in the clouds!

Offline

Be excellent to each other!

#77 2009-08-08 02:10:54

sirphobos
#! Member
Registered: 2009-07-23
Posts: 52

Re: Images in Conky (specifically rhythmbox album art)

The version of Conky that you have will not render an image.  That version was also released in 2007...you should think about downloading the newest source you can get --I use 1.7.2RC2. You will have to make sure that when you configure it that you configure it wil imlib2 support. Something to this effect:

./configure --enable-imlib2

Last edited by sirphobos (2009-08-08 02:11:13)

Offline

#78 2009-08-08 04:27:39

Kyte
#! Junkie
From: midwest usa
Registered: 2009-07-19
Posts: 275

Re: Images in Conky (specifically rhythmbox album art)

Hi
well I went through the whole thing, but finally ended up with the following in the configuration:

no file LUA5.1

I installed LUA5.1 from synaptic but still no go.

So.... I'm doing something wrong and since this is all long distance and well into... what several hours of effort on folks at the forum have been expended.... I think it might be best to let sleeping dogs lie or lay...or sleep .. yikes  for a while and I'll take another stab later.

Thanks for all the help.

Kyte


Kyte: Always flittin' around with his head in the clouds!

Offline

#79 2009-08-08 12:56:21

sirphobos
#! Member
Registered: 2009-07-23
Posts: 52

Re: Images in Conky (specifically rhythmbox album art)

Install the package liblua5.1-0-dev as well. Im trying to think what else you may need. I went thru a ton of dependency problems, since I have a bare bones minimal install.

Offline

#80 2009-08-08 14:23:37

Kyte
#! Junkie
From: midwest usa
Registered: 2009-07-19
Posts: 275

Re: Images in Conky (specifically rhythmbox album art)

thanks sirphobos, I thought that I had insall all of the libluas5.1's dependencies there were, but no...so..I'll try that. lol

Kyte


Kyte: Always flittin' around with his head in the clouds!

Offline

#81 2009-08-08 14:38:00

Kyte
#! Junkie
From: midwest usa
Registered: 2009-07-19
Posts: 275

Re: Images in Conky (specifically rhythmbox album art)

Hi
no go.  Just as a check, I picked a Martin Denny album with an album cover that I recognized at lastFM and it plays, displays the album in Rhythmbox displays the info in conkyscript you name it, just no image in conky.

thanks, I'll keep trying.

Kyte


Kyte: Always flittin' around with his head in the clouds!

Offline

#82 2009-08-08 14:51:55

Kyte
#! Junkie
From: midwest usa
Registered: 2009-07-19
Posts: 275

Re: Images in Conky (specifically rhythmbox album art)

This may or may not help.

I did the ./configure --enable-imlib2 again and at the end this was there:

LUA yes bindings
Cairo: no
Imlib2: no

I went and looked at the "album" while playing the exotica song and there is nothing in the album.

Kyte


Kyte: Always flittin' around with his head in the clouds!

Offline

#83 2009-08-08 17:29:18

iggykoopa
Script Master
Registered: 2008-12-13
Posts: 1,480

Re: Images in Conky (specifically rhythmbox album art)

Kyte wrote:

Hi
no go.  Just as a check, I picked a Martin Denny album with an album cover that I recognized at lastFM and it plays, displays the album in Rhythmbox displays the info in conkyscript you name it, just no image in conky.

thanks, I'll keep trying.

Kyte

so it displayed the track album and artitst? that means the script is working that much at least. Try running the script from a terminal while playing a song and see if there are any errors.


I say never be complete, I say stop being perfect, I say lets evolve, let the chips fall where they may.

Offline

#84 2009-08-08 17:59:00

Kyte
#! Junkie
From: midwest usa
Registered: 2009-07-19
Posts: 275

Re: Images in Conky (specifically rhythmbox album art)

Hi
I've always had it displaying artist, album name, track you name it.  Just never the album image.

I'll try that.

Kyte


Kyte: Always flittin' around with his head in the clouds!

Offline

#85 2009-08-10 16:30:08

iggykoopa
Script Master
Registered: 2008-12-13
Posts: 1,480

Re: Images in Conky (specifically rhythmbox album art)

lol just found an interesting bug in my script. I'm not gonna patch it because it's not a serious issue, but if your running my script and do an upgrade that includes rhythmbox, it'll launch rhythmbox constantly until the update is done.


I say never be complete, I say stop being perfect, I say lets evolve, let the chips fall where they may.

Offline

#86 2009-10-11 15:14:30

dilch
#! Member
Registered: 2009-08-13
Posts: 63

Re: Images in Conky (specifically rhythmbox album art)

hmmm, don't get it here. i installed the deb-package but the code don't show the cover. i'm using rhytmbox and the song has a cover.

thx for help

Offline

#87 2009-10-31 22:58:29

pvsage
Internal Affairs
From: North Carolina
Registered: 2009-10-18
Posts: 9,017

Re: Images in Conky (specifically rhythmbox album art)

@iggykoopa - how would I edit your Python script so that it removes and/or replaces periods, commas, apostrophes, slashes, and anything else that would confuse LastFM?  Also, is it possible to change the script so that instead of overwriting an image in a set location, it caches the image?  I already have a handle on getting an image from a cache file based on album and artist.

One more thing...I likes my images big.  Is there a property I can change so that larger images (200x200 or larger) don't come out looking so blocky, or is the quality limited by what LastFM has available?  Most of my Banshee images are much higher res.


while ( ! ( succeed = try() ) );
We've earned a reputation as a nice, friendly community; please help us keep it that way.

Online

#88 2009-10-31 23:29:34

iggykoopa
Script Master
Registered: 2008-12-13
Posts: 1,480

Re: Images in Conky (specifically rhythmbox album art)

I can look into removing characters and caching images soon, I've got a homework assignment due tomorrow though so it may be a little bit. You can try swapping "large" and "extralarge" on lines 78 and 80 to see if it helps with the image quality, but it really just depends on what they have loaded on last.fm. If you don't care about the extra features you could also try the earlier version of my script that didn't use last.fm, it fetched the albums from another site and they seemed a little better quality(no artist art or similar artists though)


I say never be complete, I say stop being perfect, I say lets evolve, let the chips fall where they may.

Offline

#89 2009-10-31 23:46:42

pvsage
Internal Affairs
From: North Carolina
Registered: 2009-10-18
Posts: 9,017

Re: Images in Conky (specifically rhythmbox album art)

Yeah, the problem with albumart.org was half the time they get the album wrong, if not the artist.  A big part of that was special characters in the artist name (e.g. Meg & Dia) or album title (We Sing. We Dance. We Steal things.)  And who could blame the server for getting confused when I ask for Joan Jett's Album?

As you know, I'm trying to learn to write scripts right now, so I'll take a crack at the character substitutions.  I already have a basic understanding of sed and tr; surely the Python equivalents can't be any more complicated?

UPDATE:  Swapping large for extralarge (line numbers were different, but it wasn't hard to find) was the difference that made it in image quality.  Now on to the character subs.

UPDATE 2:  Oh, that's the switch for the reflection.  These Python scripts read like man pages...once you learn how to read them.  Seriously, how many of us actually could RTFMP the first time we looked at one?  Anyway, I found an image location and Conky size that works really well with the reflection - on top of the default CRUNCHBANG LINUX wallpaper no less - so I'm glad it's there.

It looks like the character substitution is handled within the lastfm.py script...not being able to find some of these albums is a really trivial thing, except sometimes the script forgets to delete the previous image if lastfm.py gets confused.

Last edited by pvsage (2009-11-01 00:37:09)


while ( ! ( succeed = try() ) );
We've earned a reputation as a nice, friendly community; please help us keep it that way.

Online

#90 2009-11-01 07:13:28

iggykoopa
Script Master
Registered: 2008-12-13
Posts: 1,480

Re: Images in Conky (specifically rhythmbox album art)

Glad that worked out, maybe I'll change the album size by default. If everything else is working out for you I'll look into caching the images once I'm done with my homework. Just gotta figure out where to put them, maybe ~/.musicArt or something... Might as well have it cache the similar artists as well.


I say never be complete, I say stop being perfect, I say lets evolve, let the chips fall where they may.

Offline

#91 2009-11-01 08:16:33

pvsage
Internal Affairs
From: North Carolina
Registered: 2009-10-18
Posts: 9,017

Re: Images in Conky (specifically rhythmbox album art)

Banshee downloads some kick-ass cover art; their best images are probably from Amazon.  (There are some really low-res images too; I guess those are from last.fm.)  These are cached in ~/.cache/album-art/, but they're named according to Banshee's wacko naming system, i.e. nameofrecordingartist-nameofalbum.jpg; I tried a symbolic link from album-art to Rhythmbox's cache directory, and of course the artwork failed to load.  But the Banshee art is what I was bashing to Conky before I figured out enough of your Python script to get it working.


while ( ! ( succeed = try() ) );
We've earned a reputation as a nice, friendly community; please help us keep it that way.

Online

#92 2009-11-01 15:32:20

benj1
Wiki Wizard
From: Yorkshire, England
Registered: 2009-09-05
Posts: 1,084

Re: Images in Conky (specifically rhythmbox album art)

@pvsage
if you havent sorted it
look at the replace function
ie

string = string.replace("a","b")

if your doing a few (or want it more extensible put the replacements in a dictionary

dict = {"a":"b","c":"d","e":"f"}
for letter in dict:
    string = string.replace(letter,dict[letter])

- - - - - - - - Wiki Pages - - - - - - -
#! install guide           *autostart programs, modify the menu & keybindings
configuring Conky       *installing scripts

Offline

#93 2009-11-01 17:12:50

pvsage
Internal Affairs
From: North Carolina
Registered: 2009-10-18
Posts: 9,017

Re: Images in Conky (specifically rhythmbox album art)

Benj1, I haven't even started to learn how to code Python; I've just barely learned to follow the logic in a Python script.

So you're saying the function above is equivalent to this?

foo=`echo $foo | tr 'ace' 'bdf'`

Does python have any pre-defined libraries like tr's :upper: and :alnum:, and does the replace function accept ranges of characters like [a-zA-Z0-9] in some manner similar to sed?  I guess I'll find out soon.

Last edited by pvsage (2009-11-01 17:18:44)


while ( ! ( succeed = try() ) );
We've earned a reputation as a nice, friendly community; please help us keep it that way.

Online

#94 2009-11-01 22:22:26

benj1
Wiki Wizard
From: Yorkshire, England
Registered: 2009-09-05
Posts: 1,084

Re: Images in Conky (specifically rhythmbox album art)

pvsage wrote:

Benj1, I haven't even started to learn how to code Python; I've just barely learned to follow the logic in a Python script.

So you're saying the function above is equivalent to this?

foo=`echo $foo | tr 'ace' 'bdf'`

Does python have any pre-defined libraries like tr's :upper: and :alnum:, and does the replace function accept ranges of characters like [a-zA-Z0-9] in some manner similar to sed?  I guess I'll find out soon.

yes, you can do most of that kind of thing
heres the documentation for strings
http://docs.python.org/library/stdtypes … ng-methods
so you can do stuff like

string = string.upper()

if you  want to do for complicated things such as ranges of characters youll need to look at the re module, which is included as standard http://docs.python.org/library/re.html

for more general help, heres quite a good tutorial that i used when i first started programming in python http://www.openbookproject.net/thinkcs/python/english/
and youll always be able to find one or two examples of programs with google

Last edited by benj1 (2009-11-01 22:24:19)


- - - - - - - - Wiki Pages - - - - - - -
#! install guide           *autostart programs, modify the menu & keybindings
configuring Conky       *installing scripts

Offline

#95 2009-11-01 23:05:23

pvsage
Internal Affairs
From: North Carolina
Registered: 2009-10-18
Posts: 9,017

Re: Images in Conky (specifically rhythmbox album art)

Google ftw!  That's the first place I went when I realized Markéta Irglová's name would give a typical album art fetcher conniptions if I didn't replace the é and á.  The only thing I found for bash is this kludge:

 tr 'àáâãäåçèéêëìíîïðñòóôõöøùúûüýþÿ' 'aaaaaaceeeeiiiionoooooouuuuyyy'`

(just in case I eventually run across every single one of those characters) but it works.

Thanks for the py links!  They're bookmarked for future study.

Last edited by pvsage (2009-11-01 23:06:31)


while ( ! ( succeed = try() ) );
We've earned a reputation as a nice, friendly community; please help us keep it that way.

Online

#96 2009-11-02 01:17:48

benj1
Wiki Wizard
From: Yorkshire, England
Registered: 2009-09-05
Posts: 1,084

Re: Images in Conky (specifically rhythmbox album art)

pvsage wrote:

Google ftw!  That's the first place I went when I realized Markéta Irglová's name would give a typical album art fetcher conniptions if I didn't replace the é and á.  The only thing I found for bash is this kludge:

 tr 'àáâãäåçèéêëìíîïðñòóôõöøùúûüýþÿ' 'aaaaaaceeeeiiiionoooooouuuuyyy'`

(just in case I eventually run across every single one of those characters) but it works.

Thanks for the py links!  They're bookmarked for future study.

if you wanted to do that in python just found this

import unicodedata
unicodedata.normalize('NFKD', title).encode('ascii','ignore')

where title is what you want to convert
http://www.peterbe.com/plog/unicode-to-ascii


- - - - - - - - Wiki Pages - - - - - - -
#! install guide           *autostart programs, modify the menu & keybindings
configuring Conky       *installing scripts

Offline

#97 2009-11-02 03:21:51

pvsage
Internal Affairs
From: North Carolina
Registered: 2009-10-18
Posts: 9,017

Re: Images in Conky (specifically rhythmbox album art)

Another bookmark.  Thanks again.

That Python tutorial at Open Book Project looks like just the ticket!  Every other tutorial I've looked at was written by a programmer; this one was written by an educator.  There's a big difference.


while ( ! ( succeed = try() ) );
We've earned a reputation as a nice, friendly community; please help us keep it that way.

Online

#98 2009-11-02 19:10:01

pvsage
Internal Affairs
From: North Carolina
Registered: 2009-10-18
Posts: 9,017

Re: Images in Conky (specifically rhythmbox album art)

@iggykoopa - three tiny papercuts in the first version of your script that autodetects music player.  I haven't checked the one that gets similar artist info, maybe you've fixed one or more of these already.

1.  I've mentioned this one before, but now I have a cropped screenshot of the result.  If the lastfm module gets confused by the album title, the image from the previous album stays up.  Here's what happens when I go from "F.I.N.E." on Aerosmith's Pump to "Mocking Bird" recorded at one of Megan's live shows:
2009110212571847571024x.th.png

2.  I realize your script uses python-mpdclient, and I'm not sure what tags that (doesn't) report, but is there a way to check for an albumartist tag in case the current track is from a compilation album?  (See the rants thread.)

3.  I understand you've already discussed the complexities of handling source images of unknown aspect ratios...


while ( ! ( succeed = try() ) );
We've earned a reputation as a nice, friendly community; please help us keep it that way.

Online

#99 2009-11-02 20:54:08

iggykoopa
Script Master
Registered: 2008-12-13
Posts: 1,480

Re: Images in Conky (specifically rhythmbox album art)

well here's the first thing you asked for http://crunchbanglinux.org/pastebin/375 it now caches the art to ~/.music_art. Artist art is saved as ~/.music_art/artistname and album art is ~/.music_art/artistname-albumname. If you would prefer a different format it wouldn't be too hard to rewrite.
for your questions...
1. Shouldn't be an issue with the last.fm part, did you copy the picture in my instructions to ~/.noalbum ? That may be part of the issue
2. It only uses python-mpd if you are actually using mpd, I think you said you were using moc. I just looked at the man pages for moc and it doesn't support returning the albumartist tag (I'm not actually reading the tags, just whatever the player gives me)
3. I could look into it more, the issue isn't as much the album art... more artist art. I could try having it detect the original size and put bars around the image so it doesn't get distorted on resize, if it's that big of an issue. I don't really mind it too much.


I say never be complete, I say stop being perfect, I say lets evolve, let the chips fall where they may.

Offline

Be excellent to each other!

#100 2009-11-02 21:57:57

benj1
Wiki Wizard
From: Yorkshire, England
Registered: 2009-09-05
Posts: 1,084

Re: Images in Conky (specifically rhythmbox album art)

just had a look at your script igykoopa pretty cool, although i found a bug tongue
ive posted a change in the pastebin, there was a extra space when looking for mpd in ps aux, which caused it to fail.

also have you considered setting /tmp/artistinfo as a link to the albumart file rather than copying it, it might make it a bit quicker.
something like os.symlink(albumart_location, tmp_location)

ps i can knock up a patch to see if python-mpd exists if mpdclient2 doesnt if you want. thats whats recommended by mpd in their documentation, so it might be a bit more widespread than mpdclient2.


- - - - - - - - Wiki Pages - - - - - - -
#! install guide           *autostart programs, modify the menu & keybindings
configuring Conky       *installing scripts

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.

Debian Logo