ROpdebee's userscripts support thread

No, I have not seen backover yet, album cover json looks like that

       'image' => {
                    'thumbnail' => 'https://static.qobuz.com/images/covers/83/32/7619990103283_50.jpg',
                    'large' => 'https://static.qobuz.com/images/covers/83/32/7619990103283_600.jpg',
                    'back' => undef,
                    'small' => 'https://static.qobuz.com/images/covers/83/32/7619990103283_230.jpg'
                  },

Also no luck getting the album json without authentication. This could be done as I have a working script but user would need to provide credentials to get authorization token and then album json can be returned.

As you said before, it does not fit well as a user script.

1 Like

Alright, if you come across one with a back cover that can be accessed without authentication, let me know and I’ll see whether it can be integrated.

I’ve just pushed 2021.9.23 which adds support for Amazon, Amazon Music, and Qobuz. Thanks for the suggestion @nadl40!

@crayonbro: VGMdb seems like a great provider to add, I’ve created a ticket to track it: #36. Extracting the images should be very easy, but I’d like to translate its captions to MB artwork types and comments too, so it’s going to take a little while longer to add.

2 Likes

This script has been absolutely incredible. Clicking the Discogs or Bandcamp button is a HEAVENLY experience. VGMDB will be the icing :cake:

Does anyone else get a double button for releases with 1 Bandcamp link?

Might be on purpose, but the second button here doesn’t return anything so seems like something might be broken? Note that it has a ‘stream at’ and ‘purchase’ relationship for the same link. It doesn’t happen for this release which only has 1 relationship.

Hmmm I was just going to mention that if a release doesn’t have art it would be cool if we didn’t have to click through an empty cover art page to submit (should really be a MB request but you are faster ahaha), but I saw that the mb. INLINE STUFF script is already doing that for me :smiley:


Not sure why I didn’t notice it yesterday…

2 Likes

That’s not intentional and was due to the script not properly deduplicating URL ARs. It should’ve been fixed in 2021.9.22 or 2021.9.22.2 yesterday.

On the topic of updates, is everyone receiving automatic updates now that the script location has changed? If you’re on any version above 2021.9.21, then automatic updates are working. Keep in mind that the first update has only been out for less than 24h though, depending on your update frequency, your userscript engine might not have checked yet.

1 Like

@ROpdebee thanks for this great script, I think you can improve the edit note:

  • Bandcamp URLs have a comma appended when an attribute is added: https://bandcamp.url, maximized. It would be better if there was a whitespace at the end of url to ease cut’n’paste: https://bandcamp.url (maximized)
  • the actual source URL of the image should be provided too (in Bandcamp case, f4.bcbits... url)
  • userscript signature should be at the end, and sources before it

Something like:

https://avecaesar.bandcamp.com/album/split (maximised)
https://f4.bcbits.com/img/a0032185859_0.jpg
–
MB: Enhanced Cover Art Uploads 2021.9.23
7 Likes

I wonder if you could add qobuz.com

Good cover art but most importantly they also have booklets when labels provide it.
I have some perl scripts that can provide a url for both, might you save time figuring out qobuz API.

Please let me know if interested.

Enhanced Cover Art Uploads

Paste multiple external links at once

  • Can it be made to run on add and create pages too? Especially in the release when having to add new artists would be nice.
  • Bug? When pasting multiple URLs, some of which are already present it eventually no longer splits and the "don't split" option disappears. Also misses paypal URL on first try
    1. https://musicbrainz.org/artist/b719e113-3113-4f71-b768-afe8a5cdaf04/edit
      https://open.spotify.com/artist/2V7GcwRUXpWdgYSyPXv870
      https://www.instagram.com/jera.isidore/
      https://twitter.com/JeraIsidore
      https://www.youtube.com/channel/UCPHrO3_NSeOZ3ONErcBMZLQ
      https://www.facebook.com/Jera-Isidore-104861881873537/
      https://paypal.me/JeraIsidore
    2. https://musicbrainz.org/artist/20fa23d9-bb5d-4bea-8bfe-72e6939be6c7/edit
      https://www.facebook.com/smartstephanie
      https://www.youtube.com/user/SmartStephanieTV
      After pasting remove any of the two new links.
3 Likes

Personally I think we shouldn’t do that. This script has saved me so much time! I’m super happy to just hit and keep it running in a tab while I add other date and check if it’s done a minute or two later. It feels to me better to have those cover artworks in CAA & MB than to miss out on them.

That would be great to know the dimensions of the cover coming through. Sometimes the ones on discogs are so tiny there’s no readable text on it, but you can’t see that until you click through. I’m not a fan of having those uploaded, but if they were at least sucked in to the upload page first I can then quickly scan and delete the ones that don’t meet my personal cut off.

3 Likes

2021.9.23.2 is out, with two enhancements:

  1. Full VGMdb support (thanks @crayonbro for the suggestion). Types and comments are extracted on a best-effort basis, so make sure to double-check the pre-filled data to make sure its correct and well-formed.
  2. Improved edit notes (thanks @zas for the suggestions). Source URLs now go at the top, URLs extracted from a page are included, as are the non-maximised URLs for provenance. Those are truncated to three URLs to prevent too much noise in the edit history for releases with a lot of covers (imagine if all URLs were shown on all edits after importing all the images from this Discogs release :sweat_smile: ) Ideally each edit would only include the URLs relevant to the single image in the edit, but that’d require hooking very deeply into the upload process, and I’d likely break stuff. Example of how it is now:
https://vgmdb.net/album/86043
 * https://media.vgm.io/albums/34/86043/86043-1555603051.jpg
 * https://media.vgm.io/albums/34/86043/86043-1560159976.jpg
 * https://media.vgm.io/albums/34/86043/86043-1560159983.jpg
 * …and 1 additional images
https://www.amazon.co.jp/gp/product/B07QTNG28W
 * https://images-na.ssl-images-amazon.com/images/I/51Avck-4usL.jpg
   Maximised from https://images-na.ssl-images-amazon.com/images/I/51Avck-4usL._AC_US40_.jpg
–
MB: Enhanced Cover Art Uploads 2021.9.23.2
https://github.com/ROpdebee/mb-userscripts

@chaban: It’ll take me a while to fully triage all of that (update from the future: It took 2 hours), but first impressions:

An option to abort and/or add only front/first cover.

Aborting while it’s fetching images would be quite tricky, and I generally agree with @mattgoldspink here. I’m concerned that allowing an abort might lead to partial cover sets, and that wouldn’t be ideal. OTOH, having the option to fetch only the first image (presumably the front cover) would be a good compromise, IMO. #37

In general, I think it’d be nice if it first grabbed and displayed small thumbnails for all images, and only then fetches and queues the full image. That’s a non-trivial change to make though.

Bandcamp provider: Grab track images

Good idea, definitely feasible and worth it. #38

Bandcamp provider: Consider also grabbing the image as presented on the page

That should also be feasible. Off the top of my head, I’d say 1) grab the original image since we’ll definitely need it, 2) check whether its dimensions are non-square, 3) grab the thumbnail if it is. I’d argue that there should be some allowance of non-squareness though, there’s not much point in doing that if the original is 1000x1010. So maybe anything within a 1.0 ± 0.05 ratio could be considered square (So 1000x1050 would be kept as-is, 1000x1100 would get the square thumbnail)? #40

VGMdb provider: To see all images one needs to be logged in.

The VGMdb provider added in the most recent update uses the vgmdb.info 3rd-party open API, which seems to return all covers without requiring any account or API token.

Display hint about cover provider quality (ideally they can be compared)

That would be a good addition for sure, but I’m a bit stumped on how to best display it. Adding a markdown file in the repo and linking to it (like what’s being done for the supported providers) would be easiest, would that be an acceptable solution? To summarise the edit notes:

  • SoundCloud has bad compression
  • iTunes PNGs are often useless unless the source image is a PNG
  • Deezer is upscaled and badly compressed (and IIRC they used to/still do apply color filters on some covers?)
  • Bandcamp is mostly fine
  • Spotify is always 640x640

I don’t think there will be any reliable way to always grab the “best” image (and “best” is often subjective anyway), like e.g. the Bandcamp example that’s upscaled from a 400x400 image, I don’t believe there’s any way that could be detected automatically without significantly hampering UX and hogging browser resources. For Apple Music, at first glance it does seem possible to automatically do the substitution of the file extension (there are some exceptions, notably URLs given by a-tisket, which use the iTunes URLs instead of Apple Music, and those don’t include the original file name). However, are we sure that those JPEGs aren’t lossily re-encoded versions of a lossy source JPEG?

In general, I think three things are needed:

  1. A central overview of caveats of cover art providers.
  2. A way of previewing the queued images in full size (like the artwork dialogs on the cover art page itself)
  3. Basic properties of the image (dimensions, size, file type)

Points 2 and 3 would be feasible to do once the CAA Dimensions and Supercharged CAA Edits scripts are ported to TypeScript. It’d also be nice if all of the image properties would be calculated for all images prior to actually fetching it, but I’m concerned that that would be too taxing on the network connection.

I’ve created #41 to track, but I have to work out the details a lot more.

Paste multiple external links at once

#42 and #43.

Adding it on more pages should be possible. The other thing is indeed a bug which I had encountered already, in short, the script isn’t listening for URL removals so it’s also not adding itself to the new input boxes.

6 Likes

Possible bug: Enhanced Cover Art Uploads (2021.9.23.3) using Tampermonkey adds undefined instead of the homepageURL in edit note footer. Works fine using Violentmonkey though.

2 Likes

Thanks, there is an inconsistency between the different userscript managers:

console.log(GM_info.script);

{ // Violentmonkey
  ...
  "namespace": "https://github.com/ROpdebee/mb-userscripts",
  "homepageURL": "https://github.com/ROpdebee/mb-userscripts",
  // "homepage" is undefined
  ...
}

{ // Tampermonkey
  ...
  "namespace": "https://github.com/ROpdebee/mb-userscripts",
  "homepage": "https://github.com/ROpdebee/mb-userscripts",
  // "homepageURL" is undefined
  ...
}

// Greasemonkey: script is not running at all

Edit: Fix has been tested and published in version 2021.9.24.

4 Likes

And this is why I added @kellnerd as a collaborator to the repo :slight_smile:

// Violentmonkey: script is not running at all

Can you clarify that? I assume you meant GreaseMonkey? Is the Enhanced CAA script not running on GreaseMonkey at all? That would be…bad

3 Likes

Yes, of course I meant Greasemonkey, the classical copy-paste error :flushed:
I guess it is related to the GM_* functions too, they are called GM.* there. Violentmonkey supports both styles and Tampermonkey only the first one:

But to be honest, since I often had problems with many MusicBrianz userscripts under Greasemonkey since their rewrite for version 4, I am no longer using it and also have not tested my userscripts with it. So far there has been a single complaint.

There’s a polyfill for the new API, but I’ve never used it. Might be worth a try, but since most other userscripts don’t support GM4 either, it’s not a priority.

Just noticed that it doesn’t seem possible to paste multiple URLs in Enhanced Cover Art Uploads.
And I guess URL decoding would be nice:


“Paste multiple external links at once” seems to conflict with “Create entity or fill data from wikipedia / wikidata / VIAF / ISNI” by @loujin:

  • Uncaught TypeError: Object.getOwnPropertyDescriptor(...) is undefined
  • Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'set')
2 Likes

About Qobuz. Maybe there is hope.
I have found something at:
https://open.qobuz.com/album/0825646089178

The goodies were right there unguarded and I just couldn’t resist


A teeny tiny bit got archived:

3 Likes

Where, exactly? I’m not seeing any goodies on that page.

Watch the network log :wink:
https://www.qobuz.com/api.json/0.2/album/get?album_id=0825646089178&offset=0&limit=20

app_id (X-App-Id) is also part of request

2 Likes

Derp, when adding PDFs “Display CAA image dimensions” (2021.9.13) displays an image size:

1 Like

We can haz 7digital cover provider? No hi-res images but better than nothing.
A key might not be necessary if the URLs can be guessed that easily:
https://de.7digital.com/artist/tu-ves-ovnis/release/curva-al-final-del-t%C3%BAnel-14385941http://artwork-cdn.7static.com/static/img/sleeveart/00/143/859/0014385941_800.jpg

1 Like