ropdebee / mb-userscripts Goto Github PK
View Code? Open in Web Editor NEWCollection of userscripts for MusicBrainz
License: MIT License
Collection of userscripts for MusicBrainz
License: MIT License
https://community.metabrainz.org/t/ropdebees-userscripts-support-thread/551947/17
An option to abort and/or add only front/first cover. Especially Discogs can have quite a lot of images.
To save time and accommodate for people who don’t have as much bandwidth (admittedly for Discogs the latter is not much of an issue right now 😦)
Adding the option to only fetch the first image (presumably the front cover) would be a good compromise, although aborting in the middle might lead to partial image sets.
Reported by Tiske Tisja via DM:
On page 1 of the works everything collaps like it should with this addon. However on the rest of the pages it does not.
Do you understand what I mean? Hard for me to explain in English
Example: See page 1 and page 2 of the works of dolly parton
My first guess is that it's missing some @match
stanzas, but it might also be react-related (I can't remember how other pages are loaded).
Twice the same picture: https://musicbrainz.org/release/d5022396-b0d8-4378-ac38-8151ab96558c/edits
Just if it's easy to store results in page for next time there is same picture on same page (usually edit list):
mb-userscripts/mb_caa_dimensions.user.js
Line 92 in 4570caa
If not easy for you (for me, it's not easy), please quickly close as wontfix. :)
Since checks for the cover art types and comments match the required HTML elements by textual content, they don't work properly on non-English MB.
Extracting the necessary data would be more reliable by using the raw edit data. Selecting the elements on which a warning would need to be displayed would require a more robust solution.
Supercharged CAA Edits is currently mainly focused around reviewing cover art edits. The comparison dialog is (IMO) really useful, and it may be useful to also provide it when adding new cover art.
https://community.metabrainz.org/t/ropdebees-userscripts-support-thread/551947/3
Third party open API here: https://vgmdb.info
Seems like cover captions have a semi-structured format, so it should be possible to extract types from them (as well as potentially descriptions):
Captions
You can create the image caption from the list of common components, and append additional text to the end, using the textbox.
(None) - if you leave it as this, only the content of the second textbox will be saved as the caption.
Front - this is for scans which only have the front and back. If there are individual booklet pages, use Booklet Front for consistency.
Booklet Front - see above. If the scan is a 2-page, put "& Back" in the second textbox to produce "Booklet Front & Back".
Booklet Back - last page of the booklet (the one facing the disc).
Booklet p. - for individual booklet scans. Remember to denote the booklet number(s) in the textbox. ("02-03", "05-06", etc)
Booklet - use with the second textbox for special parts or mention of an incomplete booklet (ex: "Booklet (upper left part)" or "Booklet (credits)"
Jacket - for DVD casing. Put the necessary details in the second textbox ("Front", "Back", etc)
Disc - if there are numbers, put them in. ("1", "3 & 4" for scans of multiple discs, etc)
Cassette - if the sides are different, put the details in the second textbox ("Side A", "Side 1", etc)
Vinyl - if the sides are different, put the details in the second textbox ("Side A", "Side 1", etc)
Tray - the inner portion of the traycard (the one right underneath the disc). (Some releases have a traycard as a front cover (like the back cover/traycard), we generally use the following captions for the set: Front/Front Tray/Back/Back Tray)
Back - back of the case / outer portion of the traycard
Obi - spinecard. Some scans have both sides of the obi, so put "Front" or "Back" in the textbox as appropriate
Box - for boxes. Put the necessary details in the second textbox ("Front", "Top", etc)
Card - cards, postcards, etc. Again, details in the second textbox
Sticker - either those bonus stickers they stuff into the case (if it's attached to the obi, put it in the obi description instead), or those blurbs / promotions that are stuck to the shrinkwrap.
Slipcase - for slipcases. Put the necessary details in the second textbox ("Front", "Back", etc)
Digipack - for digipacks. Put the necessary details in the second textbox ("Exterior Left", "Exterior Right", etc)
Insert - single sheet or smaller booklet that is included in the album
Case - some people actually scan the jewel case in.
Contents - global picture that show all the package and its content, including bonus items like obi, card, sticker, etc.
https://chatlogs.metabrainz.org/brainzbot/musicbrainz/msg/4774758/
Spot and highlight shady things CAA edits.
Reported by chaban in forums: https://community.metabrainz.org/t/ropdebees-userscripts-support-thread/551947/25
One little small error. Guidelines state to use USA for United States, not just US.
https://musicbrainz.org/doc/Style/Specific_types_of_releases/Live_bootlegs.
Also, you can't add live disambiguation without going through the release and attaching a work to every recording set to live? Shouldn't the live release group type be enough? I know of no other way to mark a relationship as live except for the work - recording relationship and I get errors saying that it skips all recordings not set to live.
https://community.metabrainz.org/t/ropdebees-userscripts-support-thread/551947/31
https://community.metabrainz.org/t/ropdebees-userscripts-support-thread/551947/17
I was under the impression that vgmdb.info provided all the covers, that's evidently not true. There doesn't seem to be a way for us to grab the missing images without somehow logging in to an account, and adding account support it something I'd like to avoid altogether.
It appears the most we can do here is warn if images are missing, but for that, we need to know how many images a given album has in total. That's available through this table, but extracting that information would be inefficient since we need to traverse the table page-by-page. Binary search would work, but still requires a fair few requests in the worst case.
At the very least, the provider support table should be updated to make note of this.
655fa67#commitcomment-49182569
FYI, this warning is shown to me for every single artwork edit with Firefox 87 and Violentmonkey.
I had a brief look at the code of get closeDate() but did not found anything why the date detection should not work as expected...
@kellnerd Can you tell me what language and timezone you've set in your MB profile, and what the text says when you hover over the close date? Also, what's the output of e.g. new Date('2021-04-06')
?
https://community.metabrainz.org/t/ropdebees-userscripts-support-thread/551947/29
It appears like it's calculating the dimensions of the PDF placeholder image.
I see some edits with data URL.
It breaks the MB page width.
I think data URL should no be included completely in the edit notes.
https://musicbrainz.org/edit/80219294
https://musicbrainz.org/edit/80219185
I think there are use cases where it makes sense to copy over images from one release to another.
“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')
https://community.metabrainz.org/t/ropdebees-userscripts-support-thread/551947/25
You can do that in the repo settings, so that we can find it through this kind of tags: https://github.com/search?q=topic%3Amusicbrainz+topic%3Auserscripts
Currently the MB: Upload to CAA From URL message is repeated for each URL unless the user manually changes the generated edit note.
It would be great if the script could detect this and would append only the new URL in this case.
Depending on how you want to implement #23 it is going to be even more needed then.
UI on the work code script is a bit iffy.
alert
on errors.I ran a test on a release. Just wanted to let you know the script doesn't work if there is more than one date on recordings.
https://chatlogs.metabrainz.org/brainzbot/musicbrainz/msg/4774744/
Seems reasonable, although loading it will be slow. But it'll be better than having no image at all.
Same could be done for the dialog too without requiring checking that checkbox. The option could still be useful to load full-size images even when thumbs are available, so should be kept.
In retrospect, 5669114 was a bad idea. Debugging is impossible and asking for stack traces to diagnose an issue is useless. It should be reverted to the prior minification strategy, which was:
lib/
code, OR don't minify at all.src/
code./add
and /create
. Should use the same trick to load in iframes as the work code script.
https://community.metabrainz.org/t/ropdebees-userscripts-support-thread/551947/17
Hi.
Could you use one of the 2 version schemes/patterns that works in 100% userscript engines?
Either Chrome specs that allow convenient yyyy.m.d(.hm)
date versions like you already use, but you must remove your leading zeros (which proved to stop auto updates in some engine).
Or SemVer x.y.z
, personally I don't like it as much.
I hate how some of these scripts are so large, they really need to be modularised better. Maybe take inspiration from @kellnerd's repo?
If I had better modularisation, adding more providers to the work code importer would be a lot easier.
mb_blind_votes.user.js
(Partial work done in wip-blind-edits-rewrite branch, but unfinished)mb_bulk_copy_work_codes.user.js
mb_caa_dimensions.user.js
(#451)mb_collapse_work_attributes.user.js
(removed in #246)mb_multi_external_links.user.js
(#473)mb_qol_inline_recording_tracks.user.js
mb_qol_seed_recording_disambiguation.user.js
mb_qol_select_all_update_recordings.user.js
mb_supercharged_caa_edits.user.js
mb_upload_to_caa_from_url.user.js
(3f85710)mb_validate_work_codes.user.js
Hi, I'm trying to use your script, (chrome latest version with Tampermonkey) and when I click "copy work code" on ISWC, it doesnt get any info at all and when I tried to paste with the button it always report "Log - No data found. Did you copy anything?" Is there something I don't do right, sorry I might not be an Issue, probably an error on my part.
Also, I've tried with Firefox (greasemonky) and Vivaldi (violentmonkey)... always the same issue
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
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
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.
It's not listening for link removals, so when a link is removed, the DOM is updated but the splitting listeners aren't attached to the new <input>
elements.
https://chatlogs.metabrainz.org/brainzbot/musicbrainz/msg/4774744/
Should use events
in the release details. Have to think about how to best handle multiple dates.
https://www.qobuz.com/[language]/album/[name]/[id]
, language is optional
Full-size cover URL is https://static.qobuz.com/images/covers/{id[-2:-1]}/{id[-4:-3]}/{id}_org.jpg
, e.g. https://static.qobuz.com/images/covers/83/32/7619990103283_org.jpg
for ID 7619990103283
Apparently they offer booklets as well, and the booklet download itself doesn't require authentication, but figuring out the URL does require auth (see https://community.metabrainz.org/t/ropdebees-userscripts-support-thread/551947/4).
Reported by @Lotheric on IRC
22:13 <Lotheric> ROpdebee, the new enhanced CAA script doesn't seem to work with Tampermonkey/Opera for me
22:13 <Lotheric> v2021.9.23.3
22:14 <Lotheric> w/ Opera 79.0.4143.66
22:14 <Lotheric> and Tampermonkey for Opera v4.13.6138
22:14 <Lotheric> previous one was working for me
22:20 <Lotheric> something seems to appear and disappear almost immediately
22:20 <Lotheric> probably a problem du to React?
@Lotheric: If you've managed to figure out more info, please add :)
https://community.metabrainz.org/t/ropdebees-userscripts-support-thread/551947/17
See my reply in that thread too. Full details still need to be worked out.
#23 should be fixed relatively soon, but not all popular cover art providers will be included, so I'm creating a couple of issues to track those.
Bandcamp seems like an obvious provider to add.
It might be possible to use AJAX to look up work codes rather than forcing the user to do the search on ISWCNet and pressing a button there. Problem is the captcha, but jacking the cookie from the page might be enough? Should investigate and make sure the ToS doesn't disallow that.
I think they serve WebP by default, not sure if we can work around that easily.
https://chatlogs.metabrainz.org/brainzbot/musicbrainz/msg/4774744/
All of these regularly appear on cover art, so would be useful to have. The data is already loaded anyway, might as well display it.
It would be really cool if I could paste in an Apple Music, Spotify, Amazon, Deezer, Discogs, … link into the pastebox of the CAA URL uploader, and it would grab all covers and insert them automatically.
It would be even cooler if it could just get the URLs from the release, instead of having to paste them.
Depends on #20.
#3 made me think of caching dimensions persistently to prevent them from being reloaded when the page is reloaded or the image is encountered again. Local storage can be used for that on a per-url basis.
Main challenges:
Alternatively, we could use IndexedDB, but that might incur portability issues..
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-14385941
→ http://artwork-cdn.7static.com/static/img/sleeveart/00/143/859/0014385941_800.jpg
https://community.metabrainz.org/t/ropdebees-userscripts-support-thread/551947/30
Suggested by @Aerozol in the forums
Can urls be automatically run through Image Max URL and then the full image loaded? Then I can right click thumbnails to copy the URL, and plug it in directly!
I currently open all the images in new tabs so that the max image URL script gives me the big URL, and then I plug that in. I end up with a lot of open tabs. I’m being greedy but this would be a dream if it was possible!
+1 from me too, but postponing until after #20 because this is another external library that would need to be added. In addition, we may need to customise maxurl's configuration a bit, so having that in a separate file would be ideal.
There are a bunch of works which have some but not all available codes (e.g., ISWC but no agency codes, only an ASCAP code, …). If we can figure out a way to make #6 work, we could use that to look up by ISWC or other agency code from within the MB edit page directly.
I love the idea of this extension but I had to disable it because I can't submit ANYTHING on MB website while it's active: edits, votes, edit notes, etc. I always get this message, and clicking continue doesn't do anything. I know this was implemented recently to fix some security issues, but normally only affects things like the discogs release seeder.
https://community.metabrainz.org/t/ropdebees-userscripts-support-thread/551947/17
https://musicbrainz.org/edit/66611500
https://musicbrainz.org/release/39770706-b67e-4bf5-a63e-33d7c4d8ab44/cover-art
https://tickets.metabrainz.org/browse/MBS-6641
Could be retrieved from MDAPI.
In addition to the file size it would be useful to know whether an image is a JPEG or a PNG.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.