jesus2099 / konami-command

power‐ups for various web sites
123 stars 27 forks source link

COOL_SEARCH_LINKS: Show pure entity edits (with and without relationships) #664

Closed jesus2099 closed 1 month ago

jesus2099 commented 2 years ago

https://tickets.metabrainz.org/browse/MBS-11374

Filter out:

jesus2099 commented 2 years ago

I did not include relationships, though. I don't know if it is possible.

jesus2099 commented 2 years ago

It should work with does not match any and release is not MBID and type is not xxx and Relationship type is not yyy. But it didn't work!

Example, this release has 2 Add disc ID edits.

The same release has 1 discogs edit.

But if I combine these (very long search time): I only get the disc ID edits, discogs edit is missing.

jesus2099 commented 2 years ago

Ah OK it works but I have to include Add relationship in the edit types!

jesus2099 commented 2 years ago

So maybe I will do this (and Remove relationship, and Add/Remove relationship attribute?) but it makes a very slow search to try to have both non-relationship edits and relationship edits.

jesus2099 commented 2 years ago

I will make this:

Example with a release:

jesus2099 commented 2 years ago

Maybe I should try a more top-down logic order, where we can see which ones are included in which?

Edit amounts are here for illustration, it would be too naughty with MBS to display them.

jesus2099 commented 2 years ago

There are 3 Add relationship (post-NGS) edits (type 90):

But also 5 Add relationship (pre‐NGS) edits (type 233):

Pre-NGS edit types are incompatible with post-NGS relationship types. So if I want an edit search that gives me all relationship edits, I must use the same technique (edits that do not match any of the following conditions: is not, is not, is not) as the full search, which is very slow.

jesus2099 commented 2 years ago

I could make a quick AJAX / XHR request to test if this entity has any pre-NGS relationship edits, to switch to the quick query, if not, and keep the slow query, if yes (if the test returns <div id="edits">).

Or maybe even more clever, is the NGS frontier the same as these old/new relationship frontier?

Maybe I can use this 14459456 NGS magic number, or its date (2011-05-17), to avoid an AJAX / XHR check?

Maybe I could try to find the first NGS entity row ID for each type! No it's not valid.

Maybe those row ID could be reliable to judge if I put the slow search (pre-NGS entities) or the quick search (post-NGS entities).

But my method is not valid. A newer row ID could still be pre-NGS if it was merged into a newer entity (greater row ID).

jesus2099 commented 2 years ago

IMG_20220503_184900 Kiwi Browser in landscape mode

Strange display on mobile, both in portrait and landscape modes. The Pure entity edits should not appeared between refine and effective.

Maybe it's because the script running order is not the same in my mobile and on my PC.

jesus2099 commented 2 years ago

It's indeed a problem in PENDING EDITS.

IMG_20220503_195032

As soon as I run it before COOL_SEARCH_LINKS, it displays nicely.

jesus2099 commented 2 years ago

Apparently I forgot Add medium edits for Releases.

jesus2099 commented 9 months ago

Apparently I forgot to add links for Pure recording edits: https://musicbrainz.org/recording/2e87df3a-7b74-4ee3-8d04-73dfb094ed9f

jesus2099 commented 3 months ago

And for Events, too, now.

jesus2099 commented 1 month ago

I can close this ticket, this feature has been running for months, now.