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: Album Art Downloader XUI (Read 2066383 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Album Art Downloader XUI

Reply #1025
Yes, selecting all text in any input field. Isn't this how almost all programs work nowadays?

Album Art Downloader XUI

Reply #1026
The "Save images to" field is read only when the search window is spawned from the file browser but not otherwise. I find this read only behavior difficult to work with. I read another post to same effect. I know you said that you thought it was better this way and don't want to change it; I disagree but if that's still the case, I wonder if it could be made a little more user-friendly. Two ideas:
1.  It could be read-only by default, but have a small check box to make it editable. (This is already in the "minimized" options window).
2.  Alternatively, could you put something in the File browser window that helps set up how the "save images to" string will be formed? It took me a long time to figure out that if I searched my music for %source%.jpg, that would put the %source% in the "save to" string. Could it be separated so that there's a search string and then below that a "default save to" string with the cool auto insert drop down box like exists in the search window? (it could even be greyed out and require a checkbox selection to activate)

Another idea: I've read that people would like to solve the "unknown" file size. One way to quickly fake this manually is to click on the image but immediately release the mouse button without waiting for it to download. I believe the first part of the file contains the frame with size information; this information is downloaded without actually downloading the whole image. Could this be automated by only downloading the first 500 bytes (or whatever) of every image with unknown size?

Thanks for your continued work here. It a great app that I use all the time.

Album Art Downloader XUI

Reply #1027
Yes, selecting all text in any input field. Isn't this how almost all programs work nowadays?
Not as far as I can tell. Double click to select a word is standard, and AAD does that. I haven't seen triple click to select all in any other program. Word processors usually use it for select line, but that's not really the same thing. Anyway, just because no-one else doesn't doesn't mean we can't. I'll see what would be involved in doing it, and whether it would have any adverse effects, but if not then it could probably be done.

It could be read-only by default, but have a small check box to make it editable
Would you really want to be editing this every time? The reason it is read only is that changes made here would not affect the file browser search path. I think option 2 is better, I'll see if I can think of a good way of letting you customise the location to save images to from the file browser.

The partial downloading idea for full size images is interesting. I'm not sure if it is practical or not, but I'll look into it. What you are doing with clicking on the image is not partial downloading, though. It doesn't matter how quickly you release the mouse, the full image will still be downloaded, and the dimensions measured once the download is complete. There are a couple of existing options for dealing with unknown image sizes - in the Options you can choose to automatically download full size images when the dimensions are unknown. This is the equivalent of your manual method, but for all unknown images, and automatically. The second, newly introduced option, is for specific sources you can tell them to always download full size images straight away, instead of bothering with a thumbnail first.

Alex

Album Art Downloader XUI

Reply #1028
Not as far as I can tell.

You're right. I didn't test it enough.. and the fact that this was (probably) the first time I really missed this functionality in an app clouded my view on the matter.

Not a high priority enhancement.. if you easily get it to work and without no problems, implementing it would be nice. The triple-click select all is easier and more "dependable" than "click+hold+drag to select" method (sometimes you don't get all text selected this way). Ctrl+A is useful too.. but old mouse usage habits die hard.

Thanks again.

Album Art Downloader XUI

Reply #1029
Is there possibility for Auto Save of the cover?

Album Art Downloader XUI

Reply #1030
Cans someone help me make this %type% param work?

this is what i have:
"C:\Program Files\AlbumArtDownloader\AlbumArt.exe" -ar "$if2(%album artist%,%artist%)" -al "%album%" -p "$replace(%_path%,%_filename_ext%,%type(%preset%folder,back,cd,inside)%,) .jpg"

what i'm expecting is to have folder.jpg or cd.jpg and so on, according the known cover type.

thanks

Album Art Downloader XUI

Reply #1031
Is there possibility for Auto Save of the cover?
I'm not sure what you mean by this. Could you describe how you think this would work?

Can someone help me make this %type% param work?
I think the problem here is that you need to escape the % marks for titleformatting, as %%:
"C:\Program Files\AlbumArtDownloader\AlbumArt.exe" -ar "$if2(%album artist%,%artist%)" -al "%album%" -p "$replace(%_path%,%_filename_ext%,%%type(%%preset%%folder,back,cd,inside)%%,) .jpg"

Note that you've got a space before .jpg, which would give you something like "cd .jpg", not "cd.jpg". I'm not sure what the last comma is for in the $replace function? I think you also have the type parameter slightly off, you probably meant to have a comma between %preset% and folder - and are you sure you want CD and Inside reversed like that? Assuming that you want to use a preset for when the cover type is unknown, and no space before .jpg, then you would want:

"C:\Program Files\AlbumArtDownloader\AlbumArt.exe" -ar "$if2(%album artist%,%artist%)" -al "%album%" -p "$replace(%_path%,%_filename_ext%,%%type(%%preset%%,folder,back,inside,cd)%%).jpg"

I hope this helps,

Alex

Album Art Downloader XUI

Reply #1032
Is there possibility for Auto Save of the cover?
I'm not sure what you mean by this. Could you describe how you think this would work?

Can someone help me make this %type% param work?
I think the problem here is that you need to escape the % marks for titleformatting, as %%:
"C:\Program Files\AlbumArtDownloader\AlbumArt.exe" -ar "$if2(%album artist%,%artist%)" -al "%album%" -p "$replace(%_path%,%_filename_ext%,%%type(%%preset%%folder,back,cd,inside)%%,) .jpg"

Note that you've got a space before .jpg, which would give you something like "cd .jpg", not "cd.jpg". I'm not sure what the last comma is for in the $replace function? I think you also have the type parameter slightly off, you probably meant to have a comma between %preset% and folder - and are you sure you want CD and Inside reversed like that? Assuming that you want to use a preset for when the cover type is unknown, and no space before .jpg, then you would want:

"C:\Program Files\AlbumArtDownloader\AlbumArt.exe" -ar "$if2(%album artist%,%artist%)" -al "%album%" -p "$replace(%_path%,%_filename_ext%,%%type(%%preset%%,folder,back,inside,cd)%%).jpg"

I hope this helps,

Alex



Thanks Alex this works great now....

Album Art Downloader XUI

Reply #1033
perfect software, can you add ability to put album picture directly to mp3 file, thx

Album Art Downloader XUI

Reply #1034
Is there a way to add more formats?

Album Art Downloader XUI

Reply #1035
What other formats would be relevant? PNG, GIF, and JPEG are pretty much the standards.

 

Album Art Downloader XUI

Reply #1036
Hi, Alex,
it's been a long time since I've visited this forum. I was kind of ashamed for going on a rant with Akkurat...  For this reason, I have not been able to comment on the new version (0.31.1.0).

First of all, I really like the new "Extend Search" button, very clever! (I don't see anyone possibly getting confused with this any more)

The Group by size banding is great! It's helping a lot (and I must personally thank you for meeting this request so fast). It's much easier now to locate the cover I want to keep. The banding-scheme that you used is also very good (as well as the naming conventions). I only think that covers that are like 600x530 should be in the Medium band instead of the Small.

Maybe you could consider lowering the Medium band limit to something like 520, just because there are covers that well belong to that category but happen to have a larger than usual width, resulting in a "small" height. I don't think this change would shift too many (if any) undesirable covers to the upper category. (I might have sugested 540 as a limit before, but I was thinking about the greater dimention, rather than the smaller one.)

Another great thing about the image banding is that it is so much easier now to spot all the similar or identical images sorted side by side. I'm lovin' it!

I've been reorganizing my entire music colection (Lp's, CD's, Cassetes), digitalizing stuff, getting new covers, re-tagging, etc. I am so happy to be able to use AAD. It saves a HUGE amount of time. I am pleased to say that I could get, so far, more than 96% of the covers I searched through AAD (without the need to go on a separate, more deep search through the WEB). I don't think it is really needed, but if you're even considering adding more sources to the program, allow me to suggest the various "7digital.com" stores ( http://us.7digital.com/ http://es.7digital.com/ etc).

Since I've been using AAD (a lot!) lately, I've come to meet some tiny issues:
When doing a queue search (from an MP3 folder containing some albums properly divided into their own folders), I noticed that the characters "&" and ":" always lessen the chances of finding the right album on most sources. When I manually removed these characters from the search input and did a new search, the results were always better (much better actually). Most times when I also removed the "Various Artists" string from the artist field I found even more accurate results from the sources.

My question is:
Is there any way you could strip those characters ( & and : ) from the search strings you get from the queue? (I tried to figure out a reason why it wouldn't be benefitial doing this but couldn't get any reason so far... Perhaps you saw something I didn't...)

Another thing with those kind of searches (from the queue) is that whenever I have albums with multiple CD's (in separate folders), AAD will always put the covers on the 2nd (or 3rd) one (not to mention that the "Local Files" source won't display the files that are already on the 1st folder). Is there any way to configure the program to search and put the images on the 1st folder?

And, at last, I would like to offer my sincere appologies to Akkurat for goin' on and on against him. I was having a really bad week. I was completely wrong. I should really have kept quiet, that was not my place to go. Again, I'm terribly sorry.

Album Art Downloader XUI

Reply #1037
audio20, it was a bit heated conversation but I don't think that it would warrant an apology, not that I don't appreciate the gesture, thanks. I'm really sorry that I didn't act like a "mature adult" there, I was a bit angry then. No harm done, it's in the past (I even had to check it out what it was all about.. I had forgotten it already), now is now, welcome back.

Sorry for this OT. I wanted to answer in public.

Album Art Downloader XUI

Reply #1038
...appreciate the gesture, thanks...No harm done, it's in the past
Thanks, Akkurat, good to know, I am really pleased to hear that. 

I was talking to a doctor today about BMI (Body Mass Index), about how diffent factors can affect it and, strangely enough, I remembered how the covers were sorted in AAD.

As it is now, I think AAD use the pure numbers from width and height to sort the covers, and even an image with 600x300px will get sorted before one with 598x600px.

So, I correlated it, thinking that the program could use the area of the image insted of the "width first, height second" approach to sorting. By using the numbers derived from the area calculation, all the "almost equal" results will get sorted right next to it's similar image (e.g. a 600x600px image will be followed by a 598x600, instead of being followed by a number of other images with 600px width, like 600x534, 600x545, etc).

I really think this sorting method would be better. I would really like to hear Alex's and anybody else's thoughts on that.

Album Art Downloader XUI

Reply #1039
Hello all,

I live in the Quebec province, in Canada, and often buy CDs from artists that are well known here. I created a script that gets cover art from the Archambault online store, which typically finds the best matches for me (I buy from their brick and mortar shops).

There is a single problem that I am unsure how to fix.  Results sometimes include "accents" and for some reason the downloader does not seem to use the correct code page to display them.

This is my first attempt at a script, feel free to comment.

Code: [Select]
import System.Text.RegularExpressions
import AlbumArtDownloader.Scripts
import util

class Archambault(AlbumArtDownloader.Scripts.IScript):
Name as string:
get: return "Archambault"
Version as string:
get: return "0.1"
Author as string:
get: return "Sebastien Leclerc"

def Search(artist as string, album as string, results as IScriptResults):


resultsPage = GetPage(GetPageStream("http://www.archambault.ca/qmi/search/SearchResults.jsp?hierarchicalCategoryId=ACH&search=${EncodeUrl(artist)}&searchSubmit.x=0&searchSubmit.y=0", null, true))

resultsRegex = Regex("div\\s[^>]*class=\"browseListItem\"[^>]*>.*?\\ssrc\\s*=\\s*\"(?<image>http://storage[^=]*=?)(?<picsize>[1-9]*x[^&]+)(?<imageparm>[^\"]*?)\".*?<div\\s[^>]*class\\s*=\\s*\"description[^=]*<a\\s*href\\s*=\\s*\"(?<url>[^\"]+)[^>]*>(?<title>[^<]+)", RegexOptions.Singleline | RegexOptions.IgnoreCase)
resultsMatches = resultsRegex.Matches(resultsPage)

results.EstimatedCount = resultsMatches.Count;

for resultsMatch as Match in resultsMatches:
  image = resultsMatch.Groups["image"].Value;
  picsize = resultsMatch.Groups["picsize"].Value;
  imageparm = resultsMatch.Groups["imageparm"].Value;
  url = "http://www.archambault.ca"+resultsMatch.Groups["url"].Value;
  title = resultsMatch.Groups["title"].Value;
  results.Add(image+"1500x1500"+imageparm, "${title}", url, -1, -1, image , CoverType.Front);

def RetrieveFullSizeImage(fullSizeCallbackParameter):
return fullSizeCallbackParameter


Album Art Downloader XUI

Reply #1040
Hello again,

Below is a script for a popular music store in Canada.  I tried my best to make it work but I can't find the error. The search string is correct, and I did validate the regex in a test tool using the search result page.

Can anyone please help?

Code: [Select]
import System.Text.RegularExpressions
import AlbumArtDownloader.Scripts
import util

class HMVCanada(AlbumArtDownloader.Scripts.IScript):
Name as string:
get: return "HMV Canada"
Version as string:
get: return "0.1"
Author as string:
get: return "Sebastien Leclerc"

def Search(artist as string, album as string, results as IScriptResults):

searchParameter as string = "${artist}".Trim()+" ${album}".Trim().Replace(" ","+")
resultsPage = GetPage(GetPageStream("http://www.hmv.ca/Search.aspx?keyword=${searchParameter}", null, true))
resultsRegex = Regex("div\\s*[^>]*class='chartItemImage'[^>]*>.*?\\ssrc\\s*=\\s*'(?<path>(/(?!sm)\\w+)+/)small/(?<filename>[^']*)(?:[^>]*>){1,5}[^\\s]*\\s*href\\s*='(?<url>/Products/Detail/[^']*)[^>]+>(?<title>[^<]*)[^?]+[^>]+>(?<artist>[^<]*)", RegexOptions.Singleline | RegexOptions.IgnoreCase)
resultsMatches = resultsRegex.Matches(resultsPage)

results.EstimatedCount = resultsMatches.Count;

for resultsMatch as Match in resultsMatches:
  loc= "http://www.hmv.ca"+resultsMatch.Groups["path"].Value;
  filename = resultsMatch.Groups["filename"].Value;
  title = resultsMatch.Groups["title"].Value;
  url = "http://www.hmv.ca"+resultsMatch.Groups["url"].Value;
  artistname = resultsMatch.Groups["artist"].Value;
 
  results.Add("${loc}large/${filename}", "${artistname} - ${title}", url, -1, -1, "${loc}large/${filename}" , CoverType.Front);

def RetrieveFullSizeImage(fullSizeCallbackParameter):
return fullSizeCallbackParameter


Album Art Downloader XUI

Reply #1041
I got AAD constantly crashing when I does File Browser (CTRL+B)

Code: [Select]
Album Art Downloader has encountered a fatal error, and has had to close.
If you wish to report this error, please include this information, which
has been written to the file: C:\Program Files\AlbumArtDownloader\errorlog.txt

App version: 0.31.1.0, running on Microsoft Windows NT 5.1.2600 Service Pack 3 (32 bit)

System.Reflection.TargetInvocationException: Une exception a été levée par la cible d'un appel. ---> System.InvalidOperationException: Impossible de trouver l'élément supprimé.
  à System.Windows.Controls.ItemContainerGenerator.GetBlockAndPosition(Object item, Boolean deletedFromItems, GeneratorPosition& position, ItemBlock& block, Int32& offsetFromBlockStart, Int32& correctIndex)
  à System.Windows.Controls.ItemContainerGenerator.GetBlockAndPosition(Object item, Int32 itemIndex, Boolean deletedFromItems, GeneratorPosition& position, ItemBlock& block, Int32& offsetFromBlockStart, Int32& correctIndex)
  à System.Windows.Controls.ItemContainerGenerator.OnItemRemoved(Object item, Int32 itemIndex)
  à System.Windows.Controls.ItemContainerGenerator.OnCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args)
  à System.Windows.Controls.ItemContainerGenerator.System.Windows.IWeakEventListener.ReceiveWeakEvent(Ty
pe managerType, Object sender, EventArgs e)
  à System.Windows.WeakEventManager.DeliverEventToList(Object sender, EventArgs args, ListenerList list)
  à System.Windows.WeakEventManager.DeliverEvent(Object sender, EventArgs args)
  à System.Collections.Specialized.CollectionChangedEventManager.OnCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args)
  à System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
  à System.Windows.Data.CollectionView.OnCollectionChanged(NotifyCollectionChangedEventArgs args)
  à System.Windows.Controls.ItemCollection.System.Windows.IWeakEventListener.ReceiveWeakEvent(Type managerType, Object sender, EventArgs e)
  à System.Windows.WeakEventManager.DeliverEventToList(Object sender, EventArgs args, ListenerList list)
  à System.Windows.WeakEventManager.DeliverEvent(Object sender, EventArgs args)
  à System.Collections.Specialized.CollectionChangedEventManager.OnCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args)
  à System.Windows.Data.CollectionView.OnCollectionChanged(NotifyCollectionChangedEventArgs args)
  à System.Windows.Data.ListCollectionView.ProcessCollectionChangedWithAdjustedIndex(NotifyCollectionCha
ngedEventArgs args, Int32 adjustedOldIndex, Int32 adjustedNewIndex)
  à System.Windows.Data.ListCollectionView.ProcessCollectionChanged(NotifyCollectionChangedEventArgs args)
  à System.Windows.Data.CollectionView.OnCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args)
  à System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
  à AlbumArtDownloader.ObservableAlbumCollection.RaiseCollectionChanged(NotifyCollectionChangedEventArgs e)
  à AlbumArtDownloader.ObservableAlbumCollection.Remove(Album album)
  à AlbumArtDownloader.FileBrowser.<>c__DisplayClass12.<DetectVariousArtistsAlbums>b__e()
  --- Fin de la trace de la pile d'exception interne ---
  à System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
  à System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
  à System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
  à System.Delegate.DynamicInvokeImpl(Object[] args)
  à System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
  à System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
  à System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
  à System.Windows.Threading.DispatcherOperation.InvokeImpl()
  à System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
  à System.Threading.ExecutionContext.runTryCode(Object userData)
  à System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
  à System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
  à System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
  à System.Windows.Threading.DispatcherOperation.Invoke()
  à System.Windows.Threading.Dispatcher.ProcessQueue()
  à System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
  à MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
  à MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
  à System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
  à System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
  à System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
  à System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Boolean isSingleParameter)
  à System.Windows.Threading.Dispatcher.Invoke(DispatcherPriority priority, Delegate method, Object arg)
  à MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
  à MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
  à System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
  à System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
  à System.Windows.Threading.Dispatcher.Run()
  à System.Windows.Application.RunDispatcher(Object ignore)
  à System.Windows.Application.RunInternal(Window window)
  à System.Windows.Application.Run(Window window)
  à System.Windows.Application.Run()
  à AlbumArtDownloader.App.AlbumArtDownloader.IPriorInstance.Run()
  à AlbumArtDownloader.InstanceMutex.RunAppAsServiceHost(IPriorInstance instance, String channelUri)
  à AlbumArtDownloader.App.Main(String[] args)

Album Art Downloader XUI

Reply #1042
Hello all, sorry it's been a long time since I've posted. Let me answer some posts here:

Maybe you could consider lowering the Medium band limit to something like 520

520 instead of 540? Will that really make a big difference?

Is there any way you could strip those characters ( & and : ) from the search strings you get from the queue?
The only problem I have with this is that if a source did make good use of those, they would then not be available any more. I'd really rather not throw away data if I don't have to. A better idea would be to modify the scripts of sources which work better without those characters to strip them before sending the query to the server. To do that, I'd have to do a survey of each site, testing which one works better with the characters removed, and which with them left in.

Is there any way to configure the program to search and put the images on the 1st folder?
Tricky, as it would have to know which the 'first' folder is. Alphabetically would probably be best, but it would then have to find every folder to check which was the first, rather than just taking the first matching result. I'll think about it, see if there is any good way of handling it. Otherwise, there's already a feature request to save multiple copies of the result in all sub folders. I haven't come up with a good idea for that either yet.

the program could use the area of the image insted of the "width first, height second" approach to sorting.
The problem with this is that the area isn't obvious, you probably won't be able to tell why an image was sorted or grouped where it was, and it will just look wrong. It's important that things appear to be sorted in the correct order. I could, of course, add an "Area" label somewhere, but that would just be weird. Most covers are at least reasonably square, so I don't think this is a big issue.


This is my first attempt at a script, feel free to comment.
Thank you for the script, sle118! Can I suggest you add the album title to the search string too? To fix the accent thing, encode the Url as IsoLatin1 (as archambault uses this encoding).

How about:
Code: [Select]
resultsPage = GetPage("http://www.archambault.ca/qmi/search/SearchResults.jsp?hierarchicalCategoryId=ACH400000000000&search=" + EncodeUrlIsoLatin1(artist + " " + album))


For the HMV Canada one, it seems to me that the search functionality on that website only seems to allow searching by either artist or album, but if I put in both artist and album, it never returns any results for me. I suppose the script could search for just album name, but it's not ideal. Also, your regex seems slightly off, try adding
Code: [Select]
[^']*?
before
Code: [Select]
(?<url>/Products/Detail/


One trick I use to help debug this stuff is to write out the page as actually downloaded, using:
Code: [Select]
System.IO.File.WriteAllText("hmvcanada.log", resultsPage)
just after the GetPage line.

Once you have them working, may I add your scripts to the Online Updates service, so they appear automatically when Get More Scripts is clicked?

I got AAD constantly crashing when I does File Browser
Thanks for reporting this. Could you please see if you can track it down to a specific album or folder causing the problem? It is something to do with the various artists detection, but I don't see exactly why it is occurring.

Thanks,

Alex

Album Art Downloader XUI

Reply #1043
This is my first attempt at a script, feel free to comment.
Thank you for the script, sle118! Can I suggest you add the album title to the search string too? To fix the accent thing, encode the Url as IsoLatin1 (as archambault uses this encoding).

How about:
Code: [Select]
resultsPage = GetPage("http://www.archambault.ca/qmi/search/SearchResults.jsp?hierarchicalCategoryId=ACH400000000000&search=" + EncodeUrlIsoLatin1(artist + " " + album))



This fixed the search part. So searching for "12 hommes rapaillés" returns the same as "12 hommes rapailles". Now the problem is that the result page returns "12 hommes rapaill&eacutes", with encoded accents. This is just an annoyance and does not prevent the album art to be downloaded, but I would like to understand how to decode these accents in the final string.

For the HMV Canada one, it seems to me that the search functionality on that website only seems to allow searching by either artist or album, but if I put in both artist and album, it never returns any results for me. I suppose the script could search for just album name, but it's not ideal. Also, your regex seems slightly off, try adding
Code: [Select]
[^']*?
before
Code: [Select]
(?<url>/Products/Detail/


You rock! This fixed the issue right away. I am surprised though that my regex was actually working in tests.

One trick I use to help debug this stuff is to write out the page as actually downloaded, using:
Code: [Select]
System.IO.File.WriteAllText("hmvcanada.log", resultsPage)
just after the GetPage line.


Very helpful indeed.

Once you have them working, may I add your scripts to the Online Updates service, so they appear automatically when Get More Scripts is clicked?


Please do so.


Album Art Downloader XUI

Reply #1045
Hi, Alex,
thank you for all the replies. It is very much appreciated. 

520 instead of 540? Will that really make a big difference?

Oh, yes, most definitely. All the 600px wide covers will probably be bumped into the Medium Band (were they actually belong).

Quote
...strip those characters ( & and : ) from the search strings...
The only problem I have with this is that if a source did make good use of those...rather not throw away data...

I completely undestand...
Only thing I can say is that I tested this on all the sources that I use (all minus 8 or 9) for almost 200 albums. I can say with confidence that whenever these characters don't actually prevent the source from giving good results, stripping them from the input string does not affect the outcome (they still give the same results as before). Resuming, I was pretty convinced that they could be considered "unnecessary".

Quote
A better idea would be to modify the scripts of sources which work better without those characters to strip them before sending the query to the server. To do that, I'd have to do a survey of each site, testing which one works better with the characters removed, and which with them left in.

That is a great idea! I will try to do that (one source at a time).
(I think you might have already too much work on your hands as it is, this seams too much extra work for you to do it)

Quote
...configure the program to search and put the images on the 1st folder...
Tricky, as it would have to know which the 'first' folder is.

I see.. Indeed.

Quote
Alphabetically would probably be best, but it would then have to find every folder to check which was the first, rather than just taking the first matching result.

May I ask how is it done today? (if it is not too much trouble)
It seams to me that the program takes the last folder result from the "File Browser", whenever it encounters albums with the exact same name (which is the case with multiple-CDs albums), as if it just goes with the last parameter it encounters for that album.
If that was the case, I was just wandering if the program could stick to the first parameter it encounters (the first folder) instead. If it will give the program too much trouble to inspect and figure out which is the first folder, maybe it's not worth it...

Quote
I'll think about it, see if there is any good way of handling it. Otherwise, there's already a feature request to save multiple copies of the result in all sub folders. I haven't come up with a good idea for that either yet.

You're absolutely right. It won't be easy to figure this out, specially because each person will adopt their own organizing and naming scheme for their folders (there won't be a universal logic to it, probably).
I agree that storing in all folders would be a good idea, though.

Quote
...the program could use the area of the image insted...
The problem with this is that the area isn't obvious, you probably won't be able to tell why an image was sorted or grouped where it was, and it will just look wrong. It's important that things appear to be sorted in the correct order.

I get it... You're absolutely right (gotta think about the average user first). It could never be the default configuration, it would indeed confuse a lot of people.

Although I agree with the not obvious part and not with the look wrong part...

You could make an experiment and sort a set of images by area (or "combined dimentions"  ), you'll see it looks completely logical and natural, specially if you look only at the 'size' of the image and don't get caught in the pure numbers of width and height.

(It's just like telling someone is obese considering only their weight - pure numbers won't do the trick. If you want 'bigger' images you should consider both parameters simultaneously)

I should point out that I am only thinking about correcting one annoying side effect of the current "sort by: Size" scheme:
Images that are almost identical (but sometimes have better jpeg quality, or sothing else) and lack only 1 or 2 pixels in their width from their counterparts are always sorted "far away", making it more difficult to compare and sometimes even to realize they are similar images as further appart they are sorted.

That's why I wish we had this extra sorting option.

Quote
I could, of course, add an "Area" label somewhere, but that would just be weird. Most covers are at least reasonably square, so I don't think this is a big issue.

I got it now. I might not have made myself very clear then... I don't really need to know the area value (ever! it would be weird indeed), it would only serve for sorting purposes. Images with more area are, literally, bigger, and should be sorted first.

Maybe you could add a Sort by: 'Area' option for 'weirdoes' (like me  ) that think it's more logical to have the images sorted that way (because size is always relative and more directly connected with the area - an image with 598x600 is bigger than one with 600x300).

Album Art Downloader XUI

Reply #1046
Maybe you could add a Sort by: 'Area' option for 'weirdoes' (like me  ) that think it's more logical to have the images sorted that way (because size is always relative and more directly connected with the area - an image with 598x600 is bigger than one with 600x300).
Add me to the weirdoes group.

Alessandro

Album Art Downloader XUI

Reply #1047
Quote
May I ask how is it done today? (if it is not too much trouble)
First, albums are added in the order that their files are returned by FindNextFile. For NTFS this is usually, but not guaranteed to be, alphabetical. The first file (or folder, if path matching against a folder pattern) found has an Album entry created for it, whose path points to where it was found. Subsequent files or folders which have the same Artist and Album information are ignored.

Once all albums have been added (but not necessarily had existing art searched for yet, that's slower and runs in the background), then a second pass is done to find Various Artists albums. A list is produced of all albums which share the same folder and album name, but different artist names. For each folder like this, all album entries are removed and a new Various Artists album is added with the Album name and path of the first one. Incidentally, this is where uZi's crash is occurring, but I haven't been able to reproduce the problem or figure out why it happened yet.

Alex

Album Art Downloader XUI

Reply #1048
Maybe you could add a Sort by: 'Area' option for 'weirdoes' (like me  ) that think it's more logical to have the images sorted that way (because size is always relative and more directly connected with the area - an image with 598x600 is bigger than one with 600x300).
Add me to the weirdoes group.

Alessandro

Fine, I've put it up as a Feature Request. Hopefully no-one will be too confused by seeing "Area" in the sort-by list, if they don't understand what it means.

Album Art Downloader XUI

Reply #1049
Hi, Alex,
thank you so much for detailing the process for us. I fully understand it now. I promise I will stop bothering you with this particular issue.
First, albums are added in the order that their files are returned by FindNextFile. For NTFS this is usually, but not guaranteed to be, alphabetical. The first file (or folder, if path matching against a folder pattern) found has an Album entry created for it, whose path points to where it was found. Subsequent files or folders which have the same Artist and Album information are ignored.

Once all albums have been added (but not necessarily had existing art searched for yet, that's slower and runs in the background), then a second pass is done to find Various Artists albums. A list is produced of all albums which share the same folder and album name, but different artist names. For each folder like this, all album entries are removed and a new Various Artists album is added with the Album name and path of the first one.

Very interesting! It's more complex than I thought it would be...

I wouldn't figure out that part about the Various Artists albums in a million years...
I thought the program was getting it from the "Album Artist" field from the iD3v2 tag.
(I always tidy my tags before scanning the folders - and it shows Various Artists there)