ROpdebee's userscripts support thread

For some time now I’ve been seeing Failed to grab images: Apple Music release does not exist for some Apple Music links even though the release clearly exists.
So far this only happens when logged in to an Apple Music account.

The script by @Toad_King seems to be affected similarly. On Apple Music pages where the cover upload script fails I see:
TypeError: Cannot read properties of null (reading 'innerHTML')

I already have a clue what might be causing it but am curious if anyone else has experienced it.

3 Likes

i have experienced this a few times as well, though i haven’t been able to find a pattern. it happens maybe 5% of the time for me

1 Like

Can you link to an album on Apple Music where it fails? I tried it on the edit you linked to in your post but it works there for me.

This one failed a couple times (reloading the page):
https://music.apple.com/de/album/930959393

When logged out it seems to work all the time. I suspect it’s related to parental controls. When I have them enabled with everything allowed the scripts have no trouble:

Once I disable parental controls (content restrictions toggled off) sometimes the scripts fail. The cover uploader script appears to be more susceptible to this.

1 Like

Hmm, I can’t seem to easily reproduce this on Chrome (and I can’t log in to Apple Music on Firefox at all), but if it really is the case that this only happens when you’re logged in, it should be possible to devise a workaround for the cover art uploader.

1 Like

Enhanced Cover Art Uploads

  1. Image Max URL required a bugfix for the upcoming Violentmonkey release:
  1. There seems to be some URL decoding trouble:
    https://archive.org/details/skd815
Followed redirect of https://ia903101.us.archive.org/33/items/skd815/#cover.jpg -> https://ia903101.us.archive.org/33/items/skd815/ while fetching image contents
Skipping maximised candidate https://ia903101.us.archive.org/33/items/skd815/#cover.jpg: Expected to receive an image, but received text. Perhaps this provider is not supported yet?
Followed redirect of https://ia903101.us.archive.org/33/items/skd815/#cover.jpg -> https://ia903101.us.archive.org/33/items/skd815/ while fetching image contents
Skipping https://ia903101.us.archive.org/33/items/skd815/#cover.jpg: Expected to receive an image, but received text. Perhaps this provider is not supported yet?

The actual image is at https://archive.org/download/skd815/%23cover.jpg

  1. On a rare occasion I saw a 429 from Apple. This caused the link for cover art seeding not to be added. Perhaps the script could gracefully retry or show a manual retry option?
    https://atisket.pulsewidth.org.uk/?spf_id=1WRqanANwPz8JyH0p78IPh
9999x9999-100.jpg:1          Failed to load resource: the server responded with a status of 429 ()
MB: Enhanced Cover Art Uploads.user.js:105074 [mb_enhanced_cover_art_uploads] Failed to add seed links to some cover art
onError @ MB: Enhanced Cover Art Uploads.user.js:105074

Display CAA image dimensions

I don’t remember if it ever worked in either case but on “set cover art” pages neither dimension nor size are displayed and on release group pages size is always “??? KB”:

  • https://musicbrainz.org/release-group/e722cfc7-0975-4a33-82dd-bf37cc714321
  • https://musicbrainz.org/release-group/ab26a2e1-76bf-4007-ac86-8f064d456a8a/set-cover-art

Supercharged Cover Art Edits

  1. New statuses
    For better or for worse new statuses were added:
5: 'Withdrawn',
6: 'Cancelled',
  1. New packaging types
21: 'SnapPack',
54: 'Metal Tin',
55: 'Longbox',
5 Likes

If you’re making changes I have a small request - Could resized Bandcamp covers be put before the non-square ones?

In the past I wasn’t sure about putting them on releases at all, but over time I’ve come to realise that since these are what’s displayed on Bandcamp pages, as well as in the download files/in your player, it’s Bandcamp’s intention for them to be the ‘primary’ cover.

The full size weird ratio ones are more like the bonus extra imo. Opinions may differ!

I personally think the opposite, as the artist (or sometimes label) uploaded non-square artwork, therefore I think artist intent may apply. in fact I’ve added one or two albums with a square crop (from Spotify) and only added the full size from their website. (actually, after checking, I didn’t actually add the streaming release… to a-tisket!)

that said, if it were somehow toggleable, I’d be down with that~

Ooh, this would be a rare no-vote from me if it had come up in one of my subscriptions! :stuck_out_tongue_winking_eye:

If it was based on a iTunes/Spotify etc release, anway. After all, we track release-specific imagery. So if it didn’t come with the release…

My thinking is, these days, that Bandcamp lets you upload non-square images because it’s happy to square it up for you. It then displays a cropped/square cover everywhere where it matters. MB displaying non-cropped would be an outlier in this case. An extra click in Bandcamp gets you the non-cropped original, which we can replicate in MB by having the picture second.

2 Likes

A post was split to a new topic: What does “metal tin” packaging type cover?

It didn’t take long for the next bug to reveal itself using Violentmonkey BETA 2.13.0.19

Failed to enqueue some images: Could not find image a0273152139_0.0.png in queued uploads
Successfully added 1 image(s)
instrument.js:102 [mb_enhanced_cover_art_uploads] Searching for images in Bandcamp release…
instrument.js:102 [mb_enhanced_cover_art_uploads] Found 1 image(s) in Bandcamp release
instrument.js:102 [mb_enhanced_cover_art_uploads] Fetching https://f4.bcbits.com/img/a0273152139_10.jpg (1/1)
instrument.js:102 [mb_enhanced_cover_art_uploads] Maximised https://f4.bcbits.com/img/a0273152139_10.jpg to https://f4.bcbits.com/img/a0273152139_0.jpg
instrument.js:102 [mb_enhanced_cover_art_uploads] Failed to enqueue some images Error: Could not find image a0273152139_0.0.png in queued uploads
    at assert (MB: Enhanced Cover Art Uploads.user.js:106014:4515)
    at assertDefined (MB: Enhanced Cover Art Uploads.user.js:106014:4592)
    at setImageParameters (MB: Enhanced Cover Art Uploads.user.js:108139:5)
    at _catch (MB: Enhanced Cover Art Uploads.user.js:106011:5950)
    at MB: Enhanced Cover Art Uploads.user.js:106014:9916
    at MB: Enhanced Cover Art Uploads.user.js:106011:3654
    at MB: Enhanced Cover Art Uploads.user.js:106014:9985
    at async Promise.all (/release/d21b249f-1770-4af3-9fad-8f5752a82b04/index 0)
(anonymous) @ instrument.js:102
onError @ MB: Enhanced Cover Art Uploads.user.js:106014
(anonymous) @ MB: Enhanced Cover Art Uploads.user.js:106014
fireHandlers @ MB: Enhanced Cover Art Uploads.user.js:106014
error @ MB: Enhanced Cover Art Uploads.user.js:106014
(anonymous) @ MB: Enhanced Cover Art Uploads.user.js:108528
Promise.then (async)
_catch @ MB: Enhanced Cover Art Uploads.user.js:106011
(anonymous) @ MB: Enhanced Cover Art Uploads.user.js:108525
t @ MB: Enhanced Cover Art Uploads.user.js:106011
_forOf @ MB: Enhanced Cover Art Uploads.user.js:106011
(anonymous) @ MB: Enhanced Cover Art Uploads.user.js:108520
Promise.then (async)
_continue @ MB: Enhanced Cover Art Uploads.user.js:106011
(anonymous) @ MB: Enhanced Cover Art Uploads.user.js:108508
_call @ MB: Enhanced Cover Art Uploads.user.js:106011
processSeedingParameters @ MB: Enhanced Cover Art Uploads.user.js:108504
(anonymous) @ MB: Enhanced Cover Art Uploads.user.js:108869
(anonymous) @ MB: Enhanced Cover Art Uploads.user.js:108879
(anonymous) @ MB: Enhanced Cover Art Uploads.user.js:108880
window.VMina7ijceh13uhapolm @ MB: Enhanced Cover Art Uploads.user.js:108880
i @ injected-web.js:1
Vt @ injected-web.js:1
set @ injected-web.js:1
(anonymous) @ MB: Enhanced Cover Art Uploads.user.js:1
pt @ VM309 injected.js:1
mt @ VM309 injected.js:1
await in mt (async)
ft @ VM309 injected.js:1
ut @ VM309 injected.js:1
await in ut (async)
(anonymous) @ VM309 injected.js:1
await in (anonymous) (async)
(anonymous) @ VM309 injected.js:1
Re @ VM309 injected.js:1
dt @ VM309 injected.js:1
qt @ VM309 injected.js:1
await in qt (async)
(anonymous) @ VM309 injected.js:1
n @ VM309 injected.js:1
(anonymous) @ VM309 injected.js:1
(anonymous) @ VM309 injected.js:1
instrument.js:102 [mb_enhanced_cover_art_uploads] Successfully added 1 image(s)

As you have probably already noticed, we have merged a PR with the low hanging fruit improvements and the fix for the URL encoding issue:

For the remaining suggestions and bug reports I have created a few tickets, thanks for reporting:

4 Likes

So I’ve been debugging this issue with Violentmonkey Beta for a couple of hours now, turns out it’s not an issue with the cover art uploader itself. I’ll spare you most of the technical details (check the Github issue to know more) but it boils down to a conflict between ECAU and some other script (could be any installed script). There’s unfortunately no way to reliably fix this issue, but I’ll see what I can do. Even if I manage to fix it on my end, it’s still possible that you have some conflict-causing userscript installed which I don’t.

Edit: I fixed my scripts to prevent this. For me, Supercharged Cover Art Edits was causing the conflict, so that might do the trick for you too.

1 Like

What is ECAU?
For the record, I have just had a bug report on beta.
In my case, it’s not caused by ECAU, but by the newer version of React being used, there.

ECAU = Enhanced Cover Art Uploader.

The bug I was discussing above was about the Violentmonkey Beta, unrelated to MBS beta changes (but I’ll keep an eye out for any breakages due to the React upgrade on my scripts, so far all looks fine though).

2 Likes

Can confirm it was this.$ = jQuery stuff. Mostly affects scripts in the @murdos repo.
Notably Musicbrainz UI enhancements

And there is a just added packaging:

56: 'Clamshell Case',
1 Like

Enhanced Cover Art Uploads

  1. Some VGMdb entries have no cover art:
    https://vgmdb.net/album/111880
instrument.js:102 [mb_enhanced_cover_art_uploads] Searching for images in VGMdb release…
instrument.js:102 [mb_enhanced_cover_art_uploads] Failed to grab images TypeError: Failed to construct 'URL': Invalid URL
    at MB: Enhanced Cover Art Uploads.user.js:107774:22
    at _await (MB: Enhanced Cover Art Uploads.user.js:106049:3739)
    at MB: Enhanced Cover Art Uploads.user.js:107767:18
(anonymous) @ instrument.js:102
onError @ MB: Enhanced Cover Art Uploads.user.js:106052
(anonymous) @ MB: Enhanced Cover Art Uploads.user.js:106052
fireHandlers @ MB: Enhanced Cover Art Uploads.user.js:106052
error @ MB: Enhanced Cover Art Uploads.user.js:106052
(anonymous) @ MB: Enhanced Cover Art Uploads.user.js:108518
Promise.then (async)
_catch @ MB: Enhanced Cover Art Uploads.user.js:106049
(anonymous) @ MB: Enhanced Cover Art Uploads.user.js:108513
_call @ MB: Enhanced Cover Art Uploads.user.js:106049
_processURL @ MB: Enhanced Cover Art Uploads.user.js:108510
(anonymous) @ MB: Enhanced Cover Art Uploads.user.js:108494
_finallyRethrows @ MB: Enhanced Cover Art Uploads.user.js:106049
(anonymous) @ MB: Enhanced Cover Art Uploads.user.js:108491
_call @ MB: Enhanced Cover Art Uploads.user.js:106049
processURL @ MB: Enhanced Cover Art Uploads.user.js:108490
syncProcessURL @ MB: Enhanced Cover Art Uploads.user.js:108605
(anonymous) @ MB: Enhanced Cover Art Uploads.user.js:108447
r @ helpers.js:71

Occasionally I’ve seen that error for other providers even though an image is there

  1. Cover art providers

Yandex Music (MBS-12441)

https://music.yandex.com/album/13554341
https://avatars.yandex.net/get-music-content/4382806/8af5be94.a.13554341-1/orig

VK Music (MBS-12439)

https://vk.com/music/album/-2000461927_10461927
https://sun9-86.userapi.com/c858436/v858436178/23326c/FPnyNc-lq6k.jpg

Limited to 1184px? Seen that resolution for other albums too

Trivia

Apple Music of all things has only a horrible upscale for that album:

https://music.apple.com/us/album/1549788134
https://a1.mzstatic.com/us/r1000/063/Music122/v4/81/50/08/8150083f-d7f1-8821-378f-405e04f2c3b0/0.jpg

Audiomack (MBS-12445)

https://audiomack.com/key-glock/song/pain-killers
https://assets.audiomack.com/key-glock/fbc4f33e8133ea04d0fc56abbdee067c117a78ab2f151708346e822d2a1e91aa.jpeg

https://audiomack.com/key-glock/album/yellow-tape-2-deluxe
https://assets.audiomack.com/key-glock/f879a0938375da775a061d710d7bc8d94e7909f52502fa3d00d5d6337c543b59.jpeg

Display CAA image dimensions

Currently trying out the preview version

  1. File info is now centered but this doesn’t fit well on e.g. remove cover art pages.

  2. When I first installed it no file info was shown. So I went and deleted localStorage and IndexedDB entries related to the script, afterwards it worked. Of course when I tried to reproduce it there were no problems.
    ¯\_(ツ)_/¯

  3. Script doesn’t run everywhere anymore. This looks intentional but some pages are missing like
    https://musicbrainz.org/user/<username>/edits/open or collections

Paste multiple external links at once

  1. Seems fully broken
helpers.js:88 Uncaught TypeError: Cannot read properties of undefined (reading 'child')
    at HTMLInputElement.handleLinkInput (MB: QoL: Paste multiple external links at once.user.js:75:52)
    at HTMLInputElement.r (helpers.js:71:23)
handleLinkInput @ MB: QoL: Paste multiple external links at once.user.js:75
r @ helpers.js:71
1 Like

I’m going to squash together some updates into one post.


In case anyone else wants to beta-test the new version of the CAA Dimensions script, follow the link in @chaban’s post above and feel free to report any bugs here or in the GitHub pull request. It’s pretty much been rewritten from scratch, so bugs are definitely possible, but we’ve tested it quite extensively so far and it seems to be quite stable at this point. We’ve definitely missed some edge cases though :slight_smile:

For those that don’t want to beta-test it: Don’t worry, it should release soon, and normally you’ll be auto-updated to the new version within a couple of days of that happening.

Caveat about automatic updates of the beta version

The beta version will not auto-update to new beta versions and your userscript add-on will probably complain that the script is 404 when checking for updates. That’s normal. Unfortunately you’ll have to manually reinstall if you want to catch up with the latest changes in the beta. The link will remain the same, but I might not always remember to actually synchronise it with the latest changes, so ping either me or @kellnerd to update the preview version if necessary.

The beta version will update to the stable version once it’s released.


In other news, you might have been spammed by a pesky update notification in the Enhanced Cover Art Uploads script that just didn’t want to go away yesterday. A hotfix should be out, apologies about that! Next time you’ll see it, it’ll say something useful, promised!


We’ve got changelogs now! :tada: Could be useful if you want a detailed digest of what’s been happening to the scripts. The most important stuff will be covered by the update notifications though.

Only works for Enhanced Cover Art Uploads at the moment, and soon also for CAA Dimensions. The other scripts will be added later.


Question for anyone that uses Enhanced Cover Art Uploads and also uploads homemade cover art scans: Do you use any file naming patterns for your scans? Like cover_front.jpg for front covers? I’ve been thinking of auto-filling types based on file names of uploaded files, either in ECAU or in a new script, so feel free to share your file name patterns!


Thanks for beta testing the new CAA Dimensions rewrite and for the continued bug reports @chaban! I’ll transfer the issues to the GitHub repo.

About the second issue: Can you clarify what you mean by “no file info was shown”?

  1. Nothing was shown at all (neither dimensions nor file size)? If so, is it possible that you had another tab open that was still running the old version of the script? Then it’s probably the bug described at the bottom of this comment.
  2. Dimensions were shown, but no file size?
  3. Dimensions were shown, but file size and type were something like undefined (NaN)? (This shouldn’t happen any longer, but was an issue in earlier previews.)
7 Likes

I suspect that was the reason. I installed the preview version while having some edit search tabs open. Refreshed only one tab and nothing was shown at all.

I don’t but others do

1 Like

I’ll often bulk upload after a scanning session. Nice idea. This would be especially useful when uploading a scanned booklet. If page 2-3.jpg got copied to the comment too it would save a lot of copy pasta work.

Mostly I use the same names, with slight variations like “front”, “CD”, “rear”, “matrix”, “page xx-yy”. Also “CD1”, “CD2” and “DVD1”, “DVD2”.

I don’t know about other people, but if anything with a number in it was copied to the comment field would be very useful. (24 page booklets can be a lot of copy\pasting). If I upload “page 08-09.jpg” and “page 08-09” was copied to the comment, that would be an amazing time saver on bigger booklets.

Oh - and a HUGE thank you for your handy tool. Big time saver when picking up art from elsewhere. Just copy \ pasting a URL has saved so much time. You are a star. :star: :star: :star:

3 Likes