Giter VIP home page Giter VIP logo

mb-userscripts's People

Contributors

atj avatar dependabot[bot] avatar jesus2099 avatar julian45 avatar kellnerd avatar renovate-bot avatar renovate[bot] avatar ropdebee avatar schweinepriester avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

mb-userscripts's Issues

Add option to only fetch the first image

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.

`mb_collapse_work_codes` doesn't run on second page of works

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).

Type and comment checks break on non-English languages

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.

Cover art comparisons on uploads/CAA tab

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.

Use cases

  • When uploading new cover art, add a dialog to compare the to-be-uploaded images to any existing ones to ensure they're visually identical when higher quality images are added.
  • On the cover art tab, something similar could be done. Would be nice to be able to provide a URL that gets loaded instead of having to upload a file. E.g., you're wanting to replace a low res image by one from iTunes, so you paste in the image URL to compare it to the existing one.

New provider: VGMdb

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.

Sanity checks in CAA edits

https://chatlogs.metabrainz.org/brainzbot/musicbrainz/msg/4774758/

Spot and highlight shady things CAA edits.

  • Earliest release date in the release events is after the end of the voting period: Cover art may be incorrect
  • Square dimensions while packaging type is typically non-square (digipaks, digibook, book, gatefold (?), ...): Most likely wrong
  • Typical digital media dimensions (3000x3000, 1400x1400) on a physical release: Should be scrutinised to make sure the cover is the same as the physical release.
  • Non-front cover on a digital media release: Likely wrong
  • Track on a physical release: Non-sensical type
  • No types set: Non-ideal
  • Obi on non-JP releases: Likely wrong
  • Watermark type set: Non-ideal
  • Liner on non-Vinyl releases: Uncommon, but possible
  • Non-matching barcodes: Maybe https://serratus.github.io/quaggaJS/ ?
  • Cover art on pseudo-releases
  • URLs in comments: Arguably shouldn't be there

MB: QoL: Seed the batch recording comments script v2021.6.5

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.

VGMdb: Not all images are fetched

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.

More edit date woes

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')?

New provider: MusicBrainz

I think there are use cases where it makes sense to copy over images from one release to another.

UI improvements

UI on the work code script is a bit iffy.

  • I don't want it to use alert on errors.
  • The button is in a weird place.

Don't minify first-party code

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:

  • Minify and name-mangle third-party code (babel helpers, JSX, etc)
  • Minify but don't name-mandle first-party lib/ code, OR don't minify at all.
  • Don't minify first-party src/ code.

Chrome version pattern

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.

Better modularisation and distribution

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.

Roadmap

  • Create new build system
  • Typescript support
  • SCSS support
  • JSX support
  • Basic CI
  • Unit tests (#68, #72)
  • E2E tests
  • Automated deployment (#45)
  • Continuous deployment, i.e. automatically build, version bump, and release after every PR. (#84)
  • Set up dependabot (#99)
  • Scheduled "integration" tests where we run the test suite in PollyJS' "passthrough" mode on a weekly basis so that we can e.g. find changes in cover art provider responses and ensure the code still handles that correctly. Would lead to too many issues when upstream services have issues. Replaced by monthly notifications to re-record the HTTP requests. (#115)

Scripts to migrate

  • 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

Support other languages on ISWCNet

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

Removing a URL breaks the link splitter

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.

New provider: Qobuz

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).

Incompatibility with Opera/Tampermonkey

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 :)

New provider: Bandcamp

#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.

AJAX lookups

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.

Upload covers directly from iTunes/Spotify/Discogs/... link

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.

Cache image dimensions between different runs

#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:

  1. The entries in the cache will pile up and would have to be cleared periodically to prevent it from growing too large. Seems easy enough by including a timestamp and removing entries after x days.
  2. Race conditions. If the script is opened on multiple tabs and both tabs write to local storage at the same time, something's going to clash. If two tabs try to load the same image which doesn't exist in the cache, both of them would load it. There would need to be some synchronisation between the tabs and/or locking to prevent this. OTOH, this is probably not that big of a deal...
  3. Size limits. Local storage is limited in size, and I think it would be really easy to reach those limits given the number of images that one could see if intensively browsing MB.

Alternatively, we could use IndexedDB, but that might incur portability issues..

Integrate maxurl into the CAA URL uploader

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.

Importing new codes from existing codes

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.

CAA Dimensions blocks edits

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.

2021-02-18_17-03-03

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.