IPB

Welcome Guest ( Log In | Register )

3 Pages V   1 2 3 >  
Reply to this topicStart new topic
artistArt downloader.
paradog
post Jan 1 2010, 06:45
Post #1





Group: Members
Posts: 44
Joined: 22-May 08
From: Wuhan,Hubei
Member No.: 53710



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
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
art.exe "%artist%" "%path%" 5


If you want to save images to one folder call like this:
CODE
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
svn checkout http://artistart.googlecode.com/svn/trunk/ artistart-read-only


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

This post has been edited by paradog: Jan 1 2010, 06:46
Go to the top of the page
+Quote Post
Mar2zz
post Jan 1 2010, 07:19
Post #2





Group: Members
Posts: 669
Joined: 5-September 07
From: Netherlands
Member No.: 46810



Thx for this newyear present. I was using
CODE
"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.


--------------------
http://www.youtube.com/watch?v=whoj6BOSfE4 (foob.fm)
Go to the top of the page
+Quote Post
Innuendo_
post Jan 1 2010, 18:17
Post #3





Group: Members
Posts: 56
Joined: 18-October 09
Member No.: 74121



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.
Go to the top of the page
+Quote Post
q-stankovic
post Jan 1 2010, 19:29
Post #4





Group: Members
Posts: 1740
Joined: 28-May 06
From: Düsseldorf
Member No.: 31251



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


--------------------
german support forum: www.foobar-users.de / user: qwert73
Go to the top of the page
+Quote Post
mudlord
post Jan 1 2010, 23:12
Post #5





Group: Developer (Donating)
Posts: 805
Joined: 1-December 07
Member No.: 49165



....to do that, I need a decent XML parser it seems.
Go to the top of the page
+Quote Post
paradog
post Jan 2 2010, 05:14
Post #6





Group: Members
Posts: 44
Joined: 22-May 08
From: Wuhan,Hubei
Member No.: 53710



QUOTE (q-stankovic @ Jan 2 2010, 02:29) *
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.. rolleyes.gif
Go to the top of the page
+Quote Post
mudlord
post Jan 2 2010, 05:23
Post #7





Group: Developer (Donating)
Posts: 805
Joined: 1-December 07
Member No.: 49165



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) smile.gif 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...
Go to the top of the page
+Quote Post
q-stankovic
post Jan 2 2010, 15:07
Post #8





Group: Members
Posts: 1740
Joined: 28-May 06
From: Düsseldorf
Member No.: 31251



QUOTE (paradog @ Jan 2 2010, 05:14) *
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. smile.gif

This post has been edited by q-stankovic: Jan 2 2010, 15:20


--------------------
german support forum: www.foobar-users.de / user: qwert73
Go to the top of the page
+Quote Post
paradog
post Jan 2 2010, 16:34
Post #9





Group: Members
Posts: 44
Joined: 22-May 08
From: Wuhan,Hubei
Member No.: 53710



QUOTE (q-stankovic @ Jan 2 2010, 22:07) *
QUOTE (paradog @ Jan 2 2010, 05:14) *
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. smile.gif


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..
Go to the top of the page
+Quote Post
paradog
post Jan 2 2010, 17:36
Post #10





Group: Members
Posts: 44
Joined: 22-May 08
From: Wuhan,Hubei
Member No.: 53710



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

This post has been edited by paradog: Jan 2 2010, 17:39
Go to the top of the page
+Quote Post
Chaser
post Jan 2 2010, 18:20
Post #11





Group: Members
Posts: 403
Joined: 30-August 04
From: Germany, Bavaria
Member No.: 16641



As soon as your are elevated to the "Developer" usergroup you can edit your posts.
Go to the top of the page
+Quote Post
q-stankovic
post Jan 2 2010, 21:02
Post #12





Group: Members
Posts: 1740
Joined: 28-May 06
From: Düsseldorf
Member No.: 31251



Hello paradog! smile.gif

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
QUOTE (paradog @ Jan 2 2010, 16:34) *
"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 (q-stankovic @ Jan 2 2010, 19:51) *
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

This post has been edited by Yirkha: Jan 2 2010, 23:50


--------------------
german support forum: www.foobar-users.de / user: qwert73
Go to the top of the page
+Quote Post
paradog
post Jan 3 2010, 08:12
Post #13





Group: Members
Posts: 44
Joined: 22-May 08
From: Wuhan,Hubei
Member No.: 53710



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

Go to the top of the page
+Quote Post
q-stankovic
post Jan 3 2010, 13:56
Post #14





Group: Members
Posts: 1740
Joined: 28-May 06
From: Düsseldorf
Member No.: 31251



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. tongue.gif wink.gif


--------------------
german support forum: www.foobar-users.de / user: qwert73
Go to the top of the page
+Quote Post
odyssey
post Jan 3 2010, 14:28
Post #15





Group: Members
Posts: 2296
Joined: 18-May 03
From: Denmark
Member No.: 6695



Umm, foo_uie_biography already does this...

This post has been edited by odyssey: Jan 3 2010, 14:36


--------------------
Can't wait for a HD-AAC encoder :P
Go to the top of the page
+Quote Post
q-stankovic
post Jan 3 2010, 14:36
Post #16





Group: Members
Posts: 1740
Joined: 28-May 06
From: Düsseldorf
Member No.: 31251



So what? unsure.gif

I don't like foo_biography!


--------------------
german support forum: www.foobar-users.de / user: qwert73
Go to the top of the page
+Quote Post
mudlord
post Jan 4 2010, 00:39
Post #17





Group: Developer (Donating)
Posts: 805
Joined: 1-December 07
Member No.: 49165



@paradog:

Your recent changes look good. I might do a component that might interface with this. smile.gif
Go to the top of the page
+Quote Post
Benji99
post Jan 4 2010, 07:29
Post #18





Group: Members
Posts: 80
Joined: 4-October 04
Member No.: 17477



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!
Go to the top of the page
+Quote Post
q-stankovic
post Jan 4 2010, 19:59
Post #19





Group: Members
Posts: 1740
Joined: 28-May 06
From: Düsseldorf
Member No.: 31251



QUOTE (q-stankovic @ Jan 3 2010, 13:56) *
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")?


--------------------
german support forum: www.foobar-users.de / user: qwert73
Go to the top of the page
+Quote Post
paradog
post Jan 5 2010, 08:14
Post #20





Group: Members
Posts: 44
Joined: 22-May 08
From: Wuhan,Hubei
Member No.: 53710



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 .

This post has been edited by paradog: Jan 5 2010, 08:23
Go to the top of the page
+Quote Post
q-stankovic
post Jan 5 2010, 18:43
Post #21





Group: Members
Posts: 1740
Joined: 28-May 06
From: Düsseldorf
Member No.: 31251



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

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! smile.gif

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

This post has been edited by q-stankovic: Jan 5 2010, 18:45


--------------------
german support forum: www.foobar-users.de / user: qwert73
Go to the top of the page
+Quote Post
chrissl
post Jan 6 2010, 07:35
Post #22





Group: Members
Posts: 2
Joined: 6-January 10
Member No.: 76745



CODE
"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?

This post has been edited by chrissl: Jan 6 2010, 07:37
Go to the top of the page
+Quote Post
paradog
post Jan 7 2010, 14:37
Post #23





Group: Members
Posts: 44
Joined: 22-May 08
From: Wuhan,Hubei
Member No.: 53710



QUOTE (chrissl @ Jan 6 2010, 14:35) *
CODE
"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...
Go to the top of the page
+Quote Post
garbanzo.bean
post Jan 7 2010, 14:50
Post #24





Group: Members
Posts: 261
Joined: 25-September 08
Member No.: 58627



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...
Go to the top of the page
+Quote Post
carmenm
post Jan 7 2010, 16:08
Post #25





Group: Members
Posts: 720
Joined: 24-November 05
From: Grenoble
Member No.: 25981



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
Go to the top of the page
+Quote Post

3 Pages V   1 2 3 >
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 24th July 2014 - 16:37