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

Re: Album Art Downloader XUI

Reply #3125
thank you so much, alex

Re: Album Art Downloader XUI

Reply #3126
Such a great program.  FWIW, with everything checked, the only sites that find images for me are Deezer, iTunes, MusicBrainz, LastFM Cover, YesAsia, Discogs, 45world CD Singles, Juno Download, and Qobuz (fr-fr).

The main one I'm interested in troubleshooting is 45cat as it's where I can find the best singles artwork.  I'm not sure if I'm supposed to be modifying its .boo script in some way?

Re: Album Art Downloader XUI

Reply #3127
Thanks. Unfortunately scripts tend to stop working over time, as websites change design or deliberately block access. If someone asks me to look at a specific script here I usually manage to un-break it. Of course if anyone else would like to fix a .boo script that has become broken, that would always be appreciated

Here's an updated 45cat script: 45cat.boo

Re: Album Art Downloader XUI

Reply #3128
Excellent! Thanks a ton, Alex.

Re: Album Art Downloader XUI

Reply #3129
Hey there! Absolutely loving this tool but I have a question about something I cant seem to find an answer to..
All the images that are downloaded have 'Folder-' at the beginning even if i set the preset to anything else (for example if I set it to CD the filename will be 'folder-CD'.
I hadn't realized and started to download a whole bunch of stuff once I got the Discogs working and realized i really mucked up!
Cheers for the help in advance.

Re: Album Art Downloader XUI

Reply #3130
All the images that are downloaded have 'Folder-'
Click the Options link just below the search box, and look in the "Save images to" box. Just before %preset% it probably says "Folder-", remove that and it won't be in the filename any more.

Re: Album Art Downloader XUI

Reply #3131
All the images that are downloaded have 'Folder-'
Click the Options link just below the search box, and look in the "Save images to" box. Just before %preset% it probably says "Folder-", remove that and it won't be in the filename any more.

Amazing! thanks so much!
I had actually already changed that and for some reason it did not save my setting when I tried. But I tried again and restarted the application and that seemed to have fixed it! Truly appreciate you for being quick to respond and of course for making such an awesome program!

Re: Album Art Downloader XUI

Reply #3132
When saving multiple covers from the same source, there is a dialog that pops up:



Is there a way to format "Options"> "Save images to" to avoid this pop-up by saving successive images with "%n" appended to filename? I've tried using %size% and %type%, but often the files have the same. Thanks.

Re: Album Art Downloader XUI

Reply #3133
Sorry, no, I've checked the source and there is no way of auto-appending a number without seeing this prompt.

Re: Album Art Downloader XUI

Reply #3134
Hi Alex.. I'm new using App and seems beautiful so thanks in advance for your work....

I'm fixing my music library and copying to Nas ( tags, names, covers ) and a big part of covers are presents in Discogs and Musicbrainz. I've a lot of Dance music that are part of Dj Collections ( not presents in Standard Web ).

There are pages like mastermixdj, dmc, djpools, ukdj, dance music club and others , that  sells digital music and have covers in their pages and can be downloaded with browser.

If you want i can write here all pages o send in PM ( i've not writed here because i don't know if is possible.)

All this services are services for dj's but very famous.. Is possible to create scripts for this type of pages or if i can read a page how to create a script, i can try to create myself.

Thanks in advance and sorry for my  english

Re: Album Art Downloader XUI

Reply #3135
Hi, if you have any web scraping experience, or want to learn it, then it would not be difficult for you to create a script, depending on how difficult the website makes it. I would suggest making a copy of one of the simple ones, like bandcamp.boo and see how you get on.

If you try this and want to ask any questions about the script formats or syntax I'll answer, but the fundamental web scraping techniques of being able to determine the search URL to fetch, and how to craft a regular expression to extract the image URLs from the results HTML is not something I can teach.

Re: Album Art Downloader XUI

Reply #3136
I have a little knowledge of php. editing etc etc but i can open a script with a text editor to understand how it works.

If you want i will send you the homepages in a private message because i don'tn know if is possible here... ( if possible , tell me and i write here )

I explain that i'm not writing to ask to have personals scripts created only for me but only understanding if is possible to use these pages with one o more scripts because ave very famous pages, especially for dj's

Thanks for losting time for my questions




Re: Album Art Downloader XUI

Reply #3137
I will do a worked example with you. Looking at, for example mastermixdj, I can do a test search on it and see that the search URL is https://mastermixdj.com/?s=

Running with the network inspector devtool open I can see that it's dynamically creating the results HTML by calling an API, it calls:
https://mastermixdj.com/wp-json/api/v1/get/search/results?type=albums&search=TheSearchTerm&limit=4 and also the same API with type singles and limit 10. When writing your script you can customise this to whatever you want, but for now let's just do albums and keep the same limit they have.

The JSON returned is nice and easy to deal with, we don't even have to do HTML scraping, so great.

For JSON, the idea is to create a class that matches the bits structure of the JSON returned that we are interested in, and then do:
Code: [Select]
json = JavaScriptSerializer()
searchResults = json.Deserialize[of (SearchResults)](jsonSearchResults)
on it to parse it. SearchResult is wrapped in () because in the case of MasterMixDj it's an array of results retuned. If it was a single object, it wouldn't have those parenthesis. The JSON structure returned by MasterMixDj is an array of objects, where the interesting bits of the object (for us) are labelled title, artwork and link, so this would mean a class like:

Code: [Select]
	class SearchResult:
public title as String
public artwork as String
public link as String

Now we've parsed the results, they must be reported to AlbumArtDownloader. This is done using the results.Add method, which takes the parameters object thumbnail, string name, string infoUri, int fullSizeImageWidth, int fullSizeImageHeight, object fullSizeImageCallback, CoverType coverType, string suggestedFilenameExtension. There are overloads with fewer parameters you can see at IScriptResults.cs. For our case, we know the artwork, title (name) and link (infoUri). For artwork, this source doesn't provide separate small thumbnail images, it just shows the full size images resized. So we won't bother with thumbnails and just provide the artwork as the thumbnail.

As we don't have a separate full size image, we can just ignore fullSizeImageCallback and pass null to that. It's what gets given back to us in the RetrieveFullSizeImage method, which again, as we don't have separate full size images, we don't care about.

For size, we don't know it. the source doesn't provide that info, so just use -1, -1 for "unknown". For cover type, it looks like they are all just front covers, so we can pass CoverType.Front for that and end up with:

Code: [Select]
		for searchResult in searchResults:
results.Add(searchResult.artwork, searchResult.title, searchResult.link, -1, -1, null, CoverType.Front)

Final result is attached.

There's more that could be done with this source. For example, looking at the album page I can see that there is a facility for getting thumbnails, by appending "-100x100" to the artwork between "primary" and "jpg" so we could use that for faster results without downloading the full size one for every result. I can also see that there are additional images that could be found by replacing primary with "additional-1" (and presumably numbers past 1 if they existed). I'll leave all of that as an exercise for the reader, though.

This should give you enough of an idea as to how to do it that you can work on other scripts. If you produce any, please post them here for others to enjoy too!

Alex

Re: Album Art Downloader XUI

Reply #3138
Is anyone having issues with the VGMdb script, for some reason it's no longer working anymore.

Re: Album Art Downloader XUI

Reply #3139
I've fixed the VGMdb script: vgmdb.boo v0.8, please give that a try. Note that if you've edited the script to add your VGMdb username and password then this will need to be re-done for the updated script.

If it's still not working for you, let me know if you are using a username and password in the script or just anonymously, and what you searched for.

Re: Album Art Downloader XUI

Reply #3140
I've fixed the VGMdb script: vgmdb.boo v0.8, please give that a try. Note that if you've edited the script to add your VGMdb username and password then this will need to be re-done for the updated script.

If it's still not working for you, let me know if you are using a username and password in the script or just anonymously, and what you searched for.

Thank you for fixing this, working perfectly again :)

Re: Album Art Downloader XUI

Reply #3141
Got to say I love this app Alex!  i have a ridiculous amount of digital music and am working my way through tagging and sorting at the moment; your app is saving me a lot of hassle!
I have a few questions and suggestions....
1. Is there a way to allow the app to check for the presence of different artwork files in the album/single folders?  for example, some of my collection have not got artwork embedded in the mp3/flac files, but have a file in the format <artist>-<title>.jpg in the folder instead, which it doesn't appear to be picking up.
2. This query is about the search logic - if a single or album artist includes "feat" or multiple artists, it fails to find a result - if i change the artist name to "," between artist names, it seems to work.  is there a way to make it handle this better?
3. Options Settings on artwork search - even when i update the option on a window to say close after selecting artwork, it still reverts back - is there a way i can hardcode the config anywhere or make this work?
4. also in the artwork search window, would it be possible to change the order the artwork is searched for from various sources?  A lot of my music is beatport for instance, but other sources find these matches as well sometimes; it would be great to be able to search these resources before other more extensive ones (like allcdcovers etc)
5. on a final note - beatport doesn't appear to be returning any results at the moment.....is it possible you could look at it?







Re: Album Art Downloader XUI

Reply #3142
1. Yes, in the File Browser, click the Options link and in the "Specify path to find images" you can edit it, or add additional paths separated by |. So in your case you would want to add |%artist%-%title%.%extension% to the end of it.
2. This is entirely dependent on the source, so if a certain source gives better results from it then you could edit the script of the source you are using to do some search and replace of the artist string before using it, but it's not something that can be done in general.
3. Make sure you have only one Search window open, check the box, then close the window. It should remember it. Confusion arises when there are multiple search windows open, as the last one to be closed will update the settings and 'win'.
4. On the sources you want to search first, click the ... link in the bottom right of the source in the list, then check the "Search first" box. There's no way to set an absolute priority list, but Search First will make AAD search only those sources first. If they return no results, sources without Search First will be searched. Or you can click the Search button a second time to manually trigger searching the non-Search-First sources (Extend Search).
5. I'll take a look at beatport when I get some time, sure.

Re: Album Art Downloader XUI

Reply #3143
thank you for the super quick reply - and answers - brilliant to see i can do everything i need :)

I worked out the confused window problem this morning - nothing like a fresh pair of eyes on a problem!

I have got some basic knowledge of api calls and network inspector, so i will try and work out whats wrong with beatport myself and let you know if i work out the problem before you do!

Re: Album Art Downloader XUI

Reply #3144
Just a quick update on the beatport issue - from a quick look it seems they have moved to using oauth to allow access to their catalogue now - which would explain why it no longer returns anything - the api.beatport.com url has now changed to https://oauth-api.beatport.com/ as well.

Re: Album Art Downloader XUI

Reply #3145
I've updated beatport.boo, should be working now. I'm not going to start dealing with OAuth, it's a total pain, so I'll just use public endpoints.

Re: Album Art Downloader XUI

Reply #3146
Is there a way to have the program automatically give each downloaded artwork image a unique filename?

I ran the program on a folder having many mp3 files, but as each image was found it would name it "folder.jpg", in the process overwriting the jpg file it had earlier searched for and saved as "folder.jpg".

Re: Album Art Downloader XUI

Reply #3147
You can include presets like %name%, %type%, and %source% in the file name (edit this in the options section), those should make it fairly unique. There's no fully unique option, though, if you download the same result from the same source a second time it would still overwrite it.


Re: Album Art Downloader XUI

Reply #3149
In the box labelled "Save images to", you can edit that. Where it says "Folder%preset%.%extension%" you could change it to be something like "%name% (%type%) from %source%.%extension%"