Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: artistArt downloader. (Read 37144 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

artistArt downloader.

artistArt downloader

Is it a standard foobar2k component?
No, it's meant to be called like AlbumArtDownloader with foo_run.

What does it do?
It fetches artist's photos by using Last.fm's api.
You can specify the number of photos you want to download, path the photos to be saved in.
There is Discogs around that also does the job, but it only downloads a limited number of
photos together with writing tags. Discogs also has a relatively small collection of artists. So I set off to make this *component*.

*It won't read tags itself.It must work with players like foobar2000

Requirement
It requires .Net Framework 2.0.
To work with foobar2000, you need foo_run.

Usage
art.exe <artist> <path> <number>
<artist>: artist name
<path>:save path
<number>:number of photos

Because it's more easier to call %path% in foobar.so <path> must contain filename. Call like this:
Code: [Select]
art.exe "Fall Out Boy" "L:Fall.Out.Boy.-.Folie.A.Deux\09-fall_out_boy-27.mp3" 5


In foobar2k with foo_run, call like this:
Code: [Select]
art.exe "%artist%" "%path%" 5


If you want to save images to one folder call like this:
Code: [Select]
art.exe "Katharine McPhee" "K:\artistart\foobar" 5

foobar is a random string, it's just to make string cut in the program work. It will save images to K:\artistart\.

Source code and download:
Download binary code here.

Download source code here.
or just
Code: [Select]
svn checkout http://artistart.googlecode.com/svn/trunk/ artistart-read-only


Sorry about my English..again..sigh..

artistArt downloader.

Reply #1
Thx for this newyear present. I was using
Code: [Select]
"C:\Program Files\foobar2000\Album Art Downloader\AlbumArt.exe" /sources "LastFM Artist" /ar "%artist%" /mn 300 /mx 1000 /path "$replace(%_path%,%_filename_ext%,)artist.jpg"
until now, that could only save one picture.

artistArt downloader.

Reply #2
paradog, this is majorly cool. Not only usable with foobar2000, but I can see how it could easily be made to work with mp3tag and Total Commander as well! That's pure awesome.

Thank you for your hard work & don't worry about your English. Your English skills are at least as good, if not better, than some native English speakers I have run across.

artistArt downloader.

Reply #3
Very nice and useful! Thanks!

I, however, would be happy to see someone picking up the source and writing an origin foobar component with some nice features more: f.e. window where you can browse by artist and see already downloaded pictures or preview pictures before downloading ...

artistArt downloader.

Reply #4
....to do that, I need a decent XML parser it seems.

artistArt downloader.

Reply #5
Very nice and useful! Thanks!

I, however, would be happy to see someone picking up the source and writing an origin foobar component with some nice features more: f.e. window where you can browse by artist and see already downloaded pictures or preview pictures before downloading ...


Sorry, if somebody is going to write an original component, my source can't be helpful (because it's all C#).. However I think making a GUI for it would be enough..

I'll see if I can do it when I has some time.

To mudlord
I wrote it in c#, just using System.Xml; This is a very small program, only 200 lines..

To all others, thanks for reply..

artistArt downloader.

Reply #6
Quote
I wrote it in c#, just using System.Xml; This is a very small program, only 200 lines..


I noticed, and thats the nice strength of .NET (all the inbuilt functionality)  Unfortunately for me to do a component, it has to be native C++. Which means I need a external XML parser as well as I need to read up on using the Wininet API for reading data from Internet streams...

artistArt downloader.

Reply #7
However I think making a GUI for it would be enough..

I'll see if I can do it when I has some time.
Thanks for considering it. I think that could be something simple: a) a nice window popup with progressbar instead of command prompt window and b) a result window that contains images to be checked for downloading.

I have some questions:

The downloaded pictures have names that are builded by artist name and number. What is the meaning of the number? The order of storage on disk of randomly picked images or order in Last.fm? I would like to know if for example "David Bowie_12" would be always the same image. In that context let me ask for two three special values for <number> parameter:
  • "ALL" -> would download all images
  • "REST" -> would take a look in the storage folder to find out the image with highest number and then download the rest of available images (assuming the order is fixed by last.fm). Useful to download newly added images.
  • "10 MORE" -> similar like "Rest" but just downloads 10 images more.
One question more: So far i didn't have success to download images for multiple artists with foo_run wich i am not familiar enough. Did art.exe support that at all and if yes is there a way to achieve that with foo_run?


Once again: many thanks for this little tool, it helped me so far to download a huge amount of tasteful images.

artistArt downloader.

Reply #8
However I think making a GUI for it would be enough..

I'll see if I can do it when I has some time.
Thanks for considering it. I think that could be something simple: a) a nice window popup with progressbar instead of command prompt window and b) a result window that contains images to be checked for downloading.

I have some questions:

The downloaded pictures have names that are builded by artist name and number. What is the meaning of the number? The order of storage on disk of randomly picked images or order in Last.fm? I would like to know if for example "David Bowie_12" would be always the same image. In that context let me ask for two three special values for <number> parameter:
  • "ALL" -> would download all images
  • "REST" -> would take a look in the storage folder to find out the image with highest number and then download the rest of available images (assuming the order is fixed by last.fm). Useful to download newly added images.
  • "10 MORE" -> similar like "Rest" but just downloads 10 images more.
One question more: So far i didn't have success to download images for multiple artists with foo_run wich i am not familiar enough. Did art.exe support that at all and if yes is there a way to achieve that with foo_run?


Once again: many thanks for this little tool, it helped me so far to download a huge amount of tasteful images.

1.filename: the number is the order of the image in returned xml..yes,there is a possibility "David Bowie_12" won't be the same file. I mentioned it in the Issue 1 before posting here..
2."ALL" and "REST" are not quite practical.. There are too many images in Last.fm's collection, usually one artist can have over 100 photos. Downloading that many... is just not practical.
3.So far it only support one artist.. And I don't if foo_run supports calling with multiple artists as well..Just tried, it seems it can only work for the track you click right click on.

More:
I have being doing this thing since morning(GT+8)..and fix Issue 1, and made a working GUI..I'm still testing, when I'm done, I will update this post..

artistArt downloader.

Reply #9
Update

New Gui Version

Usage

First browse the destination path by clicking on the disabled(gray) textbox, Then input the artist name in the other textbox, number in the numberbox.
Click "Get list"..and wait until the list with preview is fetched.

It also support usage in the commandline.

Code: [Select]
artistArtGui.exe <artist> <save_path> <number>


Click download under each preview.Then the image will be download to destination path with Last.fm's number identifier.(Thus,  Issue 1  won't happen again)

Note:
1.Select path first, or it won't judge whether you have already downloaded that file.
2.If previous downloaded file is found, using local file for preview, "Download" label would be changed to "Downloaded".

Download Gui Version Here

Fixed Issues in Commandline Version

Issue 1:  save filename may not be identical to remote file ....fixed

*Issue 1 ls what q-stankovic mentioned in his post about the filename problem, which he explained better...

Commandline Version Download Url is not changed.

Download Commandline Version

other stuff:

Because I'm using CERNET, an ISP that you can't tolerate when going outside China, or even sometimes within, I tried my best to
test it before release.. But there will be bugs.. hope you can tell me if you encounter one..

And .. Somebody tell me why I can't edit my original post?? I can only add an reply here, hope I've not violated your rules Hydrogenaudio..

artistArt downloader.

Reply #10
As soon as your are elevated to the "Developer" usergroup you can edit your posts.

artistArt downloader.

Reply #11
Hello paradog! 

I had a quick test with artistArtGui and it looks very good! I like especially the solved issue1 and the feature that downloaded images are recognized.

Here a list with some suggestions:

1. The field for path and artist name could be a little bit longer to show full/more content.
2. An option inside the Gui to show only images that aren't downloaded or only images that are downloaded
3. A possibilty to select multiple images and to download the selection
4. A possibilty to download all images displayed in the Gui


Here some problems i discovered.

1. If artistArtGui is called from commandline by foo_run then the "get list"-button could be activated automatically (additional parameter necessary?)
2. If you choose a relative high number for images (for example 100) an error message is shown. I assume that more images are demanded than there are on last.fm. Any way for a workaround to at least show all available images without any error message?

Edit
"ALL" and "REST" are not quite practical.. There are too many images in Last.fm's collection, usually one artist can have over 100 photos. Downloading that many... is just not practical.
Well, the most artist don't have more than 100 images and even if the time to download them is not too much. I didn't count the time but i would estimate that you need 1 minute to download 100 images completely. Furthermore in context of artistArtGui "All images" would not mean to download them but to fetch them for display before downloading.

Edit2
I have no chance to create a download path that contains artists name. I tried following in foo_run: artistArtGui.exe "%artist%" "C:Artist Art%artist%" 10 But the path field in artistArtGui remains empty.

Edit3
Quote from: q-stankovic link=msg=676876 date=
3. A possibilty to select multiple images and to download the selection
i am such an idiot: you just have to click "download" and before you have a chance to click another "download the image is already downloaded. How it is know you can even faster download a selection. However, possibility to download all images in Gui is useful.

Moderation: @mod: Please merge my two last post

artistArt downloader.

Reply #12
Update..Again

Changed

Parameter format changed*:
<save_path> parameter is changed in GUI version and commandline version.
I don't think we like that random string at the end of <save_path>. so I modified it to be used as standard directory path.


Call from foobar like this, if you want to download images into your music directory.
Code: [Select]
artistArtGui.exe "%artist%" "$replace(%path%,%filename_ext%,)" 100


Call like this, if you want to download images into specific directory.(Here is "K:\artistart\by_artistName\")
Code: [Select]
artistArtGui.exe "%artist%" "K:\artistart\by_artistName\" 100


Quote
1. The field for path and artist name could be a little bit longer to show full/more content.

1. Ui is modified now, making browse  field like a status bar.
Quote
2. An option inside the Gui to show only images that aren't downloaded or only images that are downloaded

err..I didn't get around to add this feature yet.. It's not my priority in this project..
Quote
3. A possibilty to select multiple images and to download the selection

I'm using multiThreading, so you can click many "download" buttons at the same time, and watch all their progress bars roll 
Quote
4. A possibilty to download all images displayed in the Gui

Feature Added now, The "Download All" button will download images on current page..
Quote
I have no chance to create a download path that contains artists name. I tried following in foo_run: artistArtGui.exe "%artist%" "C:Artist Art%artist%" 10 But the path field in artistArtGui remains empty.

Will now create folder..

Now, the preview will display in pages according to your number setting.
Set the max number to Last.fm's 50. But you can always turn to the next one..

Click on the downloaded image will open it.

Commandline Download url is the same:
Commandline
Gui Version is changed to
Gui


artistArt downloader.

Reply #13
Wow, the pages are a very elegant and useful solution. Thanks!

This almost is now perfect for me: just filtering by display by "donloaded, not downloaded, all" would be very useful for either browsing one artist downloaded pictures or watch not downloaded images. Combining this filter feature with pages would be great.

Another little features: scrolling with mouse wheel and deleting downloaded images. And: "Reach limit" sounds like a demand - "Limit is reached" sounds somehow better.   

artistArt downloader.

Reply #14
Umm, foo_uie_biography already does this...
Can't wait for a HD-AAC encoder :P

artistArt downloader.

Reply #15
So what? 

I don't like foo_biography!

artistArt downloader.

Reply #16
@paradog:

Your recent changes look good. I might do a component that might interface with this.

artistArt downloader.

Reply #17
Wow this tool works really well!
One little problem though, is there anyway to edit the file name of the pictures?
More precisely, I'm trying to fetch pictures for 'AC/DC' and the '/' in the name seem to be creating problems for the filename.
Any chance you could an option so that the program would remove any illegal characters?

NOTE: I'm using the commandline version
Thanks!

artistArt downloader.

Reply #18
just filtering by display by "donloaded, not downloaded, all" would be very useful for either browsing one artist downloaded pictures or watch not downloaded images.

In the meantime i think that feature would have a bad side effect: each time you download an image displayed by "filter: show not downloaded" would cause removal of image and hence an annoying reordering of rest images that makes quick downloading of remaining pictures impossible. You anyway just can see just 12 pictures at same time in window, so you have an good overview anyway.

What do you think of possibility to delete stored picture (maybe by clicking an red "X")?

artistArt downloader.

Reply #19
Quote
Quote
just filtering by display by "donloaded, not downloaded, all" would be very useful for either browsing one artist downloaded pictures or watch not downloaded images.


In the meantime i think that feature would have a bad side effect: each time you download an image displayed by "filter: show not downloaded" would cause removal of image and hence an annoying reordering of rest images that makes quick downloading of remaining pictures impossible. You anyway just can see just 12 pictures at same time in window, so you have an good overview anyway.

What do you think of possibility to delete stored picture (maybe by clicking an red "X")?


I add two small links in the program to switch display. But only "downloaded" and "all".. filtering not downloaded may make current page blank, and some other problems, so I didn't add it.
But viewing local files works fine. All local files will display in one page.

"A"-All.
"B"-Browse local files.
* I want to make the UI minimized..So sorry about the one-letter link.

Delete local files is added now.
The "Downloaded" will be changed to "Delete" if local file is found or downloading is completed.
Deleting image in standard display (both remote and local files) will refresh the displaying image to
a preview from Last.fm server.

But it will still remain in the display window if you are browsing local files, even though the file is already deleted.
That's because download link is not included in the filename, so it can't get a preview version, and I don't want to rerender the
display. Instead the label will be changed to "Deleted".

Manually refreshing is there by clicking "B" again.

Quote
Wow this tool works really well!
One little problem though, is there anyway to edit the file name of the pictures?
More precisely, I'm trying to fetch pictures for 'AC/DC' and the '/' in the name seem to be creating problems for the filename.
Any chance you could an option so that the program would remove any illegal characters?

NOTE: I'm using the commandline version
Thanks!

Okey.Now, it will change all illegal chars in artist name to "-"

Quote
Another little features: scrolling with mouse wheel and deleting downloaded images. And: "Reach limit" sounds like a demand - "Limit is reached" sounds somehow better. tongue.gif wink.gif

Scrolling with mouse is enabled as default ,but I was stupid not to give that panel focus..
Now, that may works, if not , try clicking on the blank part of the display panel.


Commandline Version:
Commandline
Gui Version is changed to
Gui

BTW:
Because my Internet connection is sometimes dying hard to reach Last.fm server, testing the program is extremely horrible for me.
Sometimes I get replies from Last.fm , sometimes I don't. I've been testing it using my local cache. But it still makes debug like hell.
So, I will stop developing it soon. It works for me quite well though.. as long as I don't make requests from server as often as I do when debugging .

artistArt downloader.

Reply #20
Hello paradog,

there is a small bug:

when you delete a picture in browse-mode and then you switch to all-mode the deleted picture is still decribed as "downloaded" (without any scrollbar).

Another point: The A and B links look strange and are not intuitive. Why don't you place just two big buttons at top of the window: "All Art" and "Browse Downloaded" - that is more friendly. 

Can you also take a look into the interplay between field for artist name, "get list" button and page-changing. I don't know how to describe it: sometimes the get-list button is disabled and sometimes not. You can change artist name in artist name field and can't get list.

Thanks!

Edit:
The confirmation window after deleting is annoying: it is faster to redownload a picture than to confirm a deleting.

artistArt downloader.

Reply #21
Code: [Select]
 "C:\Program Files\foobar2000\Artists\art.exe" "%artist%" "%path%" 1


Is it possible to expand the command line so it's automatically renaming the file to %artist%.jpg?

artistArt downloader.

Reply #22
Code: [Select]
 "C:\Program Files\foobar2000\Artists\art.exe" "%artist%" "%path%" 1


Is it possible to expand the command line so it's automatically renaming the file to %artist%.jpg?


That will throw image's identity away, may cause problem in the future...

artistArt downloader.

Reply #23
the GUI version is great!

any chance you could show the dimensions of each image below the preview? i don't want to bother grabbing tiny thumbnail-sized pics...

artistArt downloader.

Reply #24
Very nice application. One thing that bug me right away. Problem with "the"

YOu should make no difference between
The artist
artist
artist, The
the artist
artist, the