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 2035632 times) previous topic - next topic
0 Members and 3 Guests are viewing this topic.

Album Art Downloader XUI

Reply #2325
Hello everybody
I'd like to get the script to 45worlds.com website (Magazines, 78s, 12" Singles and CD Singles). Is it possible?

Thanks in advance
Sorry, didn't spot your post earlier for some reason. Here is a script for 45worlds CD singles: 45worlds-cdsingles.boo, please let me know if its working OK for you, and I'll publish it through online updates.

just edited alex's excellent google script to search for jpeg only. any comments?
Thank you for your contribution. Personally, I prefer not to restrict to jpegs, but anyone who wants to will appreciate your script. One thing I'm not sure about, though, what does the "&sei=1ZCoUfvFNMPWPePggOgM" at the end of the search URL you are using do?

Alex

Album Art Downloader XUI

Reply #2326
Hello everybody
I'd like to get the script to 45worlds.com website (Magazines, 78s, 12" Singles and CD Singles). Is it possible?

Thanks in advance
Sorry, didn't spot your post earlier for some reason. Here is a script for 45worlds CD singles: 45worlds-cdsingles.boo, please let me know if its working OK for you, and I'll publish it through online updates.

just edited alex's excellent google script to search for jpeg only. any comments?
Thank you for your contribution. Personally, I prefer not to restrict to jpegs, but anyone who wants to will appreciate your script. One thing I'm not sure about, though, what does the "&sei=1ZCoUfvFNMPWPePggOgM" at the end of the search URL you are using do?

Alex

the reason i restrict to jpeg is sometimes the script returns .gif and other file types that no not work well when I try to embed them into the id3 tag, which i use another program to do. I does seem you are right about the bit at the end; it does nothing! I was using a browser and fiddling around with advanced search until i got good results, as i am no expert in the syntactical construction of google's urls. As soon as it worked i was happy.

Album Art Downloader XUI

Reply #2327
Could you please make a Hong Kong or Taiwan version? Chinese album covers are lacking in main store too, especially new releases.  Thanks a lot!

EDIT: I think I figured it out somehow. Just replace CountryName with "Hong Kong" and CountryCode with "HK" and it works.

Is it possible to search multiple countries with the iTunes cover option?  I have a lot of Japanese music and would like nice cover art for them.

Yes, see here: iTunes_Country-Specific_Searches. If you download the itunes-JP.boo then you should be able to access iTunes Japan. If it's stopped working, let me know and I'll investigate.

Alex

Album Art Downloader XUI

Reply #2328
Hello Alex,

did i something wrong?

Since the last uptdate i could no longer find der presets. I also unzipped the program in a new folder. In both versions the presets doesn't work.

What was wrong?

bkh

Album Art Downloader XUI

Reply #2329
Since the last uptdate i could no longer find der presets.

Hello, sorry to hear you are having difficulties with this. Please click the Options link and check that the "Save images to" box has the %preset% placeholder somewhere in it (the default would be to have it here: Folder%preset%.%extension%). If it does not, then the drop down for picking a preset will not appear, as it would have no effect.

Alex

Album Art Downloader XUI

Reply #2330
Hi, thanks again for keeping up the good work. New itunes script is great. I was wondering if you could maybe add Russian iTunes to the mix? That'd be great for me  Thanks in advance.

Album Art Downloader XUI

Reply #2331
Hi, thanks again for keeping up the good work. New itunes script is great. I was wondering if you could maybe add Russian iTunes to the mix? That'd be great for me  Thanks in advance.

Sure, they are easy enough to edit and make yourself, but I've added Russia here: itunes-RU.boo, and added links to that and the Hong Kong one mentioned earlier to the wiki page: iTunes Country-Specific Searches

Alex

Album Art Downloader XUI

Reply #2332
Hey guys,
I just want to know, the album covert art is saved as Folder.jpg in the folder album, but I wonder if there is a way to save the downloaded cover directly in the album files, with the ID3 Tag api, cause I've seen that the software is capable of detecting album cover inside music file, why not an option to save into it ?

Album Art Downloader XUI

Reply #2333
I wonder if there is a way to save the downloaded cover directly in the album files, with the ID3 Tag

AAD could be made to save a cover into a single mp3 file instead of a .jpg file, but that isn't really what anyone needs. You need a tag management or library software to do the job of ensuring all the files in your album have the correct cover embedded within them, and that's sort of mass tag management is out of scope for AAD.

I'd suggest Mp3Tag for doing the job. There was a post a while back by g.p.m. that I've linked from the wiki giving instructions on how to make them work nicely together: Mp3Tag with AAD.

Alex

Album Art Downloader XUI

Reply #2334
Hi, thanks again for keeping up the good work. New itunes script is great. I was wondering if you could maybe add Russian iTunes to the mix? That'd be great for me  Thanks in advance.

Sure, they are easy enough to edit and make yourself, but I've added Russia here: itunes-RU.boo, and added links to that and the Hong Kong one mentioned earlier to the wiki page: iTunes Country-Specific Searches

Alex

thanks for the script!

Album Art Downloader XUI

Reply #2335
I had a look at fanart.tv, thanks for the suggestion. Unless I'm missing something, though, there doesn't actually appear to be any way of searching for an album on it... the only thing I can do is search for an artist or a label. I can't find an Advanced Search or anything like that, and even if I could use the API (which I can't, as it needs a key), the API doesn't have any search function either!

Hey guys, I'm a mod over at fanart.tv and finally decided that I ought to sit down and write a script for the site. I've found it's kind of hit and miss for google results, plus Alex said we weren't supposed to have multiple google searches going at the same time. While it's obviously not a problem to get an API key, as Alex said, the API doesn't have a search function. However, you can "search" for artists/albums if you have the musicbrainz ID's for either artist or release group. I tag that information from musicbrainz so I already have it (and I assume many others do as well), but there's no way to pass that information to AAD using the command line as far as I can tell.

What I'd like would be a command line field that would enable those values to be available in a fanartTV.boo script. Extensible would be perfect, so I envision something like this:

AlbumArt.exe /ar "%artist%" /al "%album%" /x MBArId="%MUSICBRAINZ_ARTISTID%" /x MBReId="%MUSICBRAINZ_RELEASEGROUPID%"

Then in my fanartTV.boo I could reference MBArId and MBReId just like we currently can with Artist and Album. If something like that is already possible through the command line, whether it's documented or not, I'd love to know, otherwise it'd be a great feature to have.

Album Art Downloader XUI

Reply #2336
My first post ... Hi to everyone here!!

I was referred to Album Art Downloader XUI by people in the MP3Tag Forum and have the software working on my Windows 8 desktop PC, but I have difficulty getting the software to run on my other windows 7 PC.

Immediately after standard install on Windows 7 I launch Album Art Downloader XUI and get an error log appear. I have uninstalled and reinstalled the .Net Framework v4 and all service packs and updates etc. and uninstalled/reinstalled the software but still no joy... here is the error log details:

....................................................................................................
.......................................

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.46.0.0, running on Microsoft Windows NT 6.1.7601 Service Pack 1 (64 bit)

System.Windows.Markup.XamlParseException: Cannot create instance of 'TextBox' defined in assembly 'PresentationFramework, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. Could not load file or assembly 'UIAutomationProvider, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.  Error at object 'System.Windows.Controls.Grid' in markup file 'AlbumArt;component/splashscreen.xaml'. ---> System.IO.FileNotFoundException: Could not load file or assembly 'UIAutomationProvider, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
File name: 'UIAutomationProvider, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
  at System.Windows.Controls.TextBox.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
  at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
  at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, OperationType operationType)
  at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, OperationType operationType, Boolean isInternal)
  at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
  at MS.Internal.Documents.UndoManager.AttachUndoManager(DependencyObject scope, UndoManager undoManager)
  at System.Windows.Documents.TextEditor..ctor(ITextContainer textContainer, FrameworkElement uiScope, Boolean isUndoEnabled)
  at System.Windows.Controls.Primitives.TextBoxBase.InitializeTextContainer(TextContainer textContainer)
  at System.Windows.Controls.TextBox..ctor()
  at System.Windows.Markup.KnownTypes.CreateKnownElement(KnownElements knownElement)
  at System.Windows.Markup.BamlRecordReader.CreateInstanceFromType(Type type, Int16 typeId, Boolean throwOnFail)

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

  --- End of inner exception stack trace ---
  at System.Windows.Markup.XamlParseException.ThrowException(String message, Exception innerException, Int32 lineNumber, Int32 linePosition, Uri baseUri, XamlObjectIds currentXamlObjectIds, XamlObjectIds contextXamlObjectIds, Type objectType)
  at System.Windows.Markup.XamlParseException.ThrowException(ParserContext parserContext, Int32 lineNumber, Int32 linePosition, String message, Exception innerException)
  at System.Windows.Markup.BamlRecordReader.CreateInstanceFromType(Type type, Int16 typeId, Boolean throwOnFail)
  at System.Windows.Markup.BamlRecordReader.GetElementAndFlags(BamlElementStartRecord bamlElementStartRecord, Object& element, ReaderFlags& flags, Type& delayCreatedType, Int16& delayCreatedTypeId)
  at System.Windows.Markup.BamlRecordReader.BaseReadElementStartRecord(BamlElementStartRecord bamlElementRecord)
  at System.Windows.Markup.BamlRecordReader.ReadElementStartRecord(BamlElementStartRecord bamlElementRecord)
  at System.Windows.Markup.BamlRecordReader.ReadRecord(BamlRecord bamlRecord)
  at System.Windows.Markup.BamlRecordReader.Read(Boolean singleRecord)
  at System.Windows.Markup.TreeBuilderBamlTranslator.ParseFragment()
  at System.Windows.Markup.TreeBuilder.Parse()
  at System.Windows.Markup.XamlReader.LoadBaml(Stream stream, ParserContext parserContext, Object parent, Boolean closeStream)
  at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)
  at AlbumArtDownloader.Splashscreen.InitializeComponent()
  at AlbumArtDownloader.Splashscreen..ctor()
  at AlbumArtDownloader.Splashscreen.ShowIfRequired()
  at AlbumArtDownloader.App.OnStartup(StartupEventArgs e)
  at System.Windows.Application.<.ctor>b__0(Object unused)
  at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
  at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
  at System.Windows.Threading.DispatcherOperation.InvokeImpl()
  at System.Threading.ExecutionContext.runTryCode(Object userData)
  at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
  at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
  at System.Windows.Threading.DispatcherOperation.Invoke()
  at System.Windows.Threading.Dispatcher.ProcessQueue()
  at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
  at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
  at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
  at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
  at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
  at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Boolean isSingleParameter)
  at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
  at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
  at System.Windows.Threading.Dispatcher.TranslateAndDispatchMessage(MSG& msg)
  at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
  at System.Windows.Application.RunInternal(Window window)
  at AlbumArtDownloader.App.AlbumArtDownloader.IPriorInstance.Run()
  at AlbumArtDownloader.InstanceMutex.RunAppAsServiceHost(IPriorInstance instance, String channelUri)
  at AlbumArtDownloader.App.Main(String[] args)

....................................................................................................
................................................................

If anyone can suggest a fix or offer any advice I would be grateful.

Thanks

Ken Griffiths

Album Art Downloader XUI

Reply #2337
What I'd like would be a command line field that would enable those values to be available in a fanartTV.boo script. Extensible would be perfect, so I envision something like this:

AlbumArt.exe /ar "%artist%" /al "%album%" /x MBArId="%MUSICBRAINZ_ARTISTID%" /x MBReId="%MUSICBRAINZ_RELEASEGROUPID%"

Then in my fanartTV.boo I could reference MBArId and MBReId just like we currently can with Artist and Album. If something like that is already possible through the command line, whether it's documented or not, I'd love to know, otherwise it'd be a great feature to have.

Hi, glad to hear you are working on a script for this. I'm afraid there's no way setting variables through the command line like in your example - the only thing that is passes through to the script is artist and album. Is there any reason you can't use those, though?

AlbumArt.exe /ar "%MUSICBRAINZ_ARTISTID%" /al "%MUSICBRAINZ_RELEASEGROUPID%" /sources "fanartTV"

If you really have to pass context information to a script separately to album and artist, then the best I can think of would be to have a batch script that wrote the information to a temporary file before calling AlbumArt.exe, then have the script check for the presence of that file and read the information from it.

Immediately after standard install on Windows 7 I launch Album Art Downloader XUI and get an error log appear. I have uninstalled and reinstalled the .Net Framework v4 and all service packs and updates etc. and uninstalled/reinstalled the software but still no joy... here is the error log details:

[...] System.IO.FileNotFoundException: Could not load file or assembly 'UIAutomationProvider, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified. [...]

Hello, and welcome. I'm sorry to hear that you are having difficulties getting it to run. As you must have guessed, this is an issue with a corrupt .net installation, however it's .NET Framework v3.5 that needs uninstalling and reinstalling, not version 4! That makes things trickier on Windows 7 as it's a built in part of Windows rather than a separate installer, but I think it can be done by going to the normal "Add or Remove Programs" window, then clicking the "Turn Windows features on or off" link on the left. From that you can uncheck the box next to Microsoft .NET Framework 3.5.1 and click OK to uninstall it, then go back to that same box and re-check it to re-install it.

Alex

Album Art Downloader XUI

Reply #2338
How Do I Get Album Art Downloader program to convince it searches only the Artist "David Essex" and only a Album "Silver Dream Racer"? Instead of the word in any combination and order.

 

Album Art Downloader XUI

Reply #2339
I have the following problem, I cant for some reason get AAD to work anymore.

First I got this error on the start saying that it cannot read a configuration file, and said I should reset it. (it was in c:windows and .net something) I did this with admin privileges and AAD deleted the file in question (something.config) but now when I try to start AAD it gives the same error window (encountered an error while attempting to read configuration settings, but now when I try to press reset all settings to default or view configuration file in windows explorer it gives me the following error: could not determine path to configuration file.

Here is the error log generated by pressing create error report:

Album Art Downloader encountered an error when attempting to read its
configuration settings, and could not start.
If you wish to report this error, please include this information, which
has been written to the file: K:\AlbumArtDownloader\errorlog.txt

App version: 0.46.0.0, running on Microsoft Windows NT 6.2.9200.0 (64 bit)

System.Configuration.ConfigurationErrorsException: The configuration section 'connectionStrings' has an unexpected declaration.
  at System.Configuration.ConfigurationManager.get_ConnectionStrings()
  at System.Configuration.PrivilegedConfigurationManager.get_ConnectionStrings()
  at System.Configuration.LocalFileSettingsProvider.GetPropertyValues(SettingsContext context, SettingsPropertyCollection properties)
  at System.Configuration.SettingsBase.GetPropertiesFromProvider(SettingsProvider provider)
  at System.Configuration.SettingsBase.GetPropertyValueByName(String propertyName)
  at System.Configuration.SettingsBase.get_Item(String propertyName)
  at System.Configuration.ApplicationSettingsBase.GetPropertyValue(String propertyName)
  at System.Configuration.ApplicationSettingsBase.get_Item(String propertyName)
  at AlbumArtDownloader.Properties.Settings.get_ApplicationVersion()
  at AlbumArtDownloader.App.Main(String[] args)



Any help much appreciated.

Album Art Downloader XUI

Reply #2340
Hi, glad to hear you are working on a script for this. I'm afraid there's no way setting variables through the command line like in your example - the only thing that is passes through to the script is artist and album. Is there any reason you can't use those, though?

AlbumArt.exe /ar "%MUSICBRAINZ_ARTISTID%" /al "%MUSICBRAINZ_RELEASEGROUPID%" /sources "fanartTV"

If you really have to pass context information to a script separately to album and artist, then the best I can think of would be to have a batch script that wrote the information to a temporary file before calling AlbumArt.exe, then have the script check for the presence of that file and read the information from it.
I did think about passing the information in the album/artist fields, but the problem is that because I don't batch things and actually check the artwork for each album and take the best available from my favorite sources I couldn't use all my sources at the same time. I'd have to have one for just fanart.tv and one for everything else.

The temporary file could work, but it'd be really hard to get other people to use it because it'd be a documentation nightmare.

The other option I've got would be to take the artist/album information and do an API request on musicbrainz first then take the highest matching result for each. It's pretty error prone, but it's also the simplest.

I could also bug the hell out of you until you added extra command line options, or maybe even do it myself if you don't mind.

Album Art Downloader XUI

Reply #2341
How Do I Get Album Art Downloader program to convince it searches only the Artist "David Essex" and only a Album "Silver Dream Racer"? Instead of the word in any combination and order.
That depends on the source being searched. Some are better than others, and unfortunately some seem to include results that can't possibly be relevant, perhaps on the off-chance that you might see something else you like? I don't know. If you are finding that Album Art Downloader is giving worse results for a specific source than you can get by going to the website of that source and doing a search using their site, then let me know the details and I can look into it.

I have the following problem, I cant for some reason get AAD to work anymore.
That's a weird one. Can you check if there is a file called AlbumArt.exe.config in the same folder as your AlbumArt.exe? If so, try deleting that. If not, or if it still doesn't work, then try resetting the settings by deleting the folder %localappdata%\AlbumArtDownloader

The temporary file could work, but it'd be really hard to get other people to use it because it'd be a documentation nightmare.

The other option I've got would be to take the artist/album information and do an API request on musicbrainz first then take the highest matching result for each. It's pretty error prone, but it's also the simplest.

I could also bug the hell out of you until you added extra command line options, or maybe even do it myself if you don't mind.

I can see how it would be a nightmare to document, you'd have to get people to put a .bat file in their AAD directory or something, which would be a pain. If you are interested in contributing code to do the command line options, I'd be open to that, but there's a fair bit of design that needs to go into the issues of scope and lifetime. That's the benefit of the file approach, the scope and lifetime of that file are under your control, and well understood.

For a command line argument, it's assumed it would be available to all scripts for the search that the command line kicks off. But what if the command line just opens a window without a search? Or if it does open a search, but then the user changes the maximum results setting, or adds or removes scripts, and hits Extend Search? Or corrects the album or artist information for a new search? Or starts a new search entirely? In a new window? What if the initial search went into the queue because searches other were already ongoing? The problem is, if this functionality were added, it wouldn't just be for your script, and people might reasonably expect that if they set a variable with the command line, that it would stay set (they could use it for login credentials for a script, for example), and apply to all windows - it is a variable after all. Others might instead expect that it would apply only to the immediate search they are performing, as in your use-case, and I don't see any good way to distinguish between the two.

That's why I'm reluctant to go with a command line approach, because however much of a nightmare documenting the batch-file approach might be, I still think it's less of a nightmare than designing and documenting command line variables in a generally useful way.

Alex

Album Art Downloader XUI

Reply #2342
I can see how it would be a nightmare to document, you'd have to get people to put a .bat file in their AAD directory or something, which would be a pain. If you are interested in contributing code to do the command line options, I'd be open to that, but there's a fair bit of design that needs to go into the issues of scope and lifetime. That's the benefit of the file approach, the scope and lifetime of that file are under your control, and well understood.

For a command line argument, it's assumed it would be available to all scripts for the search that the command line kicks off. But what if the command line just opens a window without a search? Or if it does open a search, but then the user changes the maximum results setting, or adds or removes scripts, and hits Extend Search? Or corrects the album or artist information for a new search? Or starts a new search entirely? In a new window? What if the initial search went into the queue because searches other were already ongoing? The problem is, if this functionality were added, it wouldn't just be for your script, and people might reasonably expect that if they set a variable with the command line, that it would stay set (they could use it for login credentials for a script, for example), and apply to all windows - it is a variable after all. Others might instead expect that it would apply only to the immediate search they are performing, as in your use-case, and I don't see any good way to distinguish between the two.

That's why I'm reluctant to go with a command line approach, because however much of a nightmare documenting the batch-file approach might be, I still think it's less of a nightmare than designing and documenting command line variables in a generally useful way.

Alex

Well, there obviously were some issues I wasn't thinking of, but with passing variables to a batch file we run into many of those exact same issues. Essentially the script couldn't be used at all in batch mode. There'd be no notion of queuing, as you'd only have one file which was continually overwritten each time AAD was launched, changing the Album/Artist wouldn't update the MBIDs, etc. Even if you launched the AlbumArt.exe without passing any variables to the command line the fanart.tv script would still find the last used data file and all your fanart.tv results would be incorrect.

It sounds like the least bad solution is probably just to query musicbrainz and then query fanart.tv with those results. It's not going to be 100% accurate, but I don't really see any other viable options.

Album Art Downloader XUI

Reply #2343
you'd only have one file which was continually overwritten each time AAD was launched

I was rather thinking you'd name the file with the artist and album name, so it would only apply if searching for that album...

Doing the search would probably be easiest, yes, but it does feel a bit of a waste to be throwing away information that is already known.

Alex

Album Art Downloader XUI

Reply #2344
I was rather thinking you'd name the file with the artist and album name, so it would only apply if searching for that album...

Doing the search would probably be easiest, yes, but it does feel a bit of a waste to be throwing away information that is already known.

Alex

I hadn't thought of saving as multiple files because then you'd need some way to clean them up, and I have no idea how to do that.

Anyway, starting with the musicbrainz.boo as a template, things were going along great until I hit a wall.

Code: [Select]
    fanartURL = "http://api.fanart.tv/webservice/album/${key}/${mbid}/json/albumcover/1/2/"
    //System.IO.File.WriteAllText("fanart1.log", fanartURL)
                                                        
    picDoc = GetPage(fanartURL)
    System.IO.File.WriteAllText("fanart2.log", picDoc)
    picResult = json.DeserializeObject(picDoc) as Dictionary[of string, object]

The mbid is correct, and when I write out the results of the picDoc JSON I get this:
Code: [Select]
{"AC/DC":{"mbid_id":"66c662b6-6e2f-4930-8610-912e24c63ed1","albums":{"d3bc1a64-7561-3787-b680-0003aa50f8f1":{"albumcover":[{"id":"3671","url":"http://assets.fanart.tv/fanart/music/66c662b6-6e2f-4930-8610-912e24c63ed1/albumcover/back-in-black-4de2c08a61a5b.jpg","likes":"1"},{"id":"67760","url":"http://assets.fanart.tv/fanart/music/66c662b6-6e2f-4930-8610-912e24c63ed1/albumcover/back-in-black-50fb8236b8530.jpg","likes":"1"}]}}}}

However, the problem is that when I try and to reference anything in picResult, the script just stops. All I want/need is the url values so I set up a "for image as Dictionary[of string, object] in picResult["url"]", but it never went inside. I tried different members of picResult, all with no dice. I tried to just write picResult["mbid_id"] to a file, but the line doesn't seem to execute. I don't understand why I can reference the mbidResults in exactly the same way with no problem, but it just chokes on picResult. Any ideas? What am I missing?

Album Art Downloader XUI

Reply #2345
Immediately after standard install on Windows 7 I launch Album Art Downloader XUI and get an error log appear. I have uninstalled and reinstalled the .Net Framework v4 and all service packs and updates etc. and uninstalled/reinstalled the software but still no joy... here is the error log details:

[...] System.IO.FileNotFoundException: Could not load file or assembly 'UIAutomationProvider, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified. [...]
Hello, and welcome. I'm sorry to hear that you are having difficulties getting it to run. As you must have guessed, this is an issue with a corrupt .net installation, however it's .NET Framework v3.5 that needs uninstalling and reinstalling, not version 4! That makes things trickier on Windows 7 as it's a built in part of Windows rather than a separate installer, but I think it can be done by going to the normal "Add or Remove Programs" window, then clicking the "Turn Windows features on or off" link on the left. From that you can uncheck the box next to Microsoft .NET Framework 3.5.1 and click OK to uninstall it, then go back to that same box and re-check it to re-install it.

Alex



Alex...

Sadly it is the .Net framework v3.5 - files that are corrupted (built into Windows7). I have tried removing and adding it back in but windows 7 is not having it. I have tried sfc /scannow, the msdn verification/repair tool, a popular cleanup utility and numerous other things but it seems it doesn't want to play.. I guess I may have to consider using one of my older backups or even a reinstall if I can't find the answer in the coming days... Bit of a pain really as I have quite a bit of music on the drive that will need moving off (er... Just in case!!) . Oh well ... Thanks for the support.

Ken Griffiths

Album Art Downloader XUI

Reply #2346
I hadn't thought of saving as multiple files because then you'd need some way to clean them up, and I have no idea how to do that.
You could have the script delete them after reading? Or just leave them in the temp folder, plenty of other software seems to have no problem with leaving junk in the temp folder indefinitely and it's never going to be large amounts of data. Messy, though.
I don't understand why I can reference the mbidResults in exactly the same way with no problem, but it just chokes on picResult. Any ideas? What am I missing?
I think it's the structure of the json results that you are missing. I don't think it can be deserialised as just a dictionary as it isn't a flat list of key/value pairs. Take a look with some indenting applied:

Code: [Select]
{"AC/DC":{
    "mbid_id":"66c662b6-6e2f-4930-8610-912e24c63ed1",
    "albums":{
        "d3bc1a64-7561-3787-b680-0003aa50f8f1":{
            "albumcover":[
                {"id":"3671",
                 "url":"http://assets.fanart.tv/fanart/music/66c662b6-6e2f-4930-8610-912e24c63ed1/albumcover/back-in-black-4de2c08a61a5b.jpg",
                 "likes":"1"},
                
                {"id":"67760",
                 "url":"http://assets.fanart.tv/fanart/music/66c662b6-6e2f-4930-8610-912e24c63ed1/albumcover/back-in-black-50fb8236b8530.jpg",
                 "likes":"1"}
            ]}
        }
    }
}
There are probably several ways of parsing json, but for an example of how I've done it using nested classes have a look at discogs.boo.

Sadly it is the .Net framework v3.5 - files that are corrupted (built into Windows7). I have tried removing and adding it back in but windows 7 is not having it.
Sorry to hear that. I'm afraid you've already tried all the tricks that I'd suggest for repairing it, so I don't think there's anything further I can add - you clearly know what you're doing already. So I'll just wish you best of luck with the repair anyway!

Alex

Album Art Downloader XUI

Reply #2347
How Do I Get Album Art Downloader program to convince it searches only the Artist "David Essex" and only a Album "Silver Dream Racer"? Instead of the word in any combination and order.
That depends on the source being searched. Some are better than others, and unfortunately some seem to include results that can't possibly be relevant, perhaps on the off-chance that you might see something else you like? I don't know. If you are finding that Album Art Downloader is giving worse results for a specific source than you can get by going to the website of that source and doing a search using their site, then let me know the details and I can look into it.
Alex

Not exactly what I wanted!
Currently the program finds all the "David", the present is making all "Essex", the "Silver" ... "Dream", ... and "Racer". Bring together several hundred names. But how to write for viewing only by expression "David Essex" + "Silver Dream Racer" and not David OR Essex OR Silver OR Dream OR Racer? I.e. only for these Artist's Album and nothing else!

Album Art Downloader XUI

Reply #2348
I figured out what I was doing wrong when I was using it as a dictionary. The problem is that the JSON is formatted terribly, with the artist name and the MBID being parent objects in the JSON. To access the images I had to do this:

Code: [Select]
    for image as Dictionary[of string, object] in fanartResult["${mbidArtist}"]["albums"]["${mbid}"]["albumcover"]:


And now everything is working properly. I'll clean the script up and then post it here later today for further testing by you guys.

Album Art Downloader XUI

Reply #2349
The problem is that the JSON is formatted terribly, with the artist name and the MBID being parent objects in the JSON.
Ah, yeah, I see the issue now. They haven't really understood JSON as a format, have they? Well done getting it working.

Just as a tip, since you say you were considering contributing code to AAD, that suggests to me that you have a development environment and the know-how to be able to build from source. If you build AAD under the Debug configuration, it also compiles the scripts with debug info turned on, and when running AAD under the debugger Visual Studio will quite happily let you set a breakpoint within the .boo script file. It's not quite as nicely integrated as C# debugging, but you can certainly set watches on variable values, which makes script debugging a lot more pleasant than having to write out test log files all the time.

Alex