Aurélien Mino
2bfb8bfa33
discogs: update code comments.
2015-06-18 23:02:01 +02:00
Aurélien Mino
704cfec565
discogs: also display link for the Discogs entity of the current page.
...
Previously this feature was only available for releases.
2015-06-18 23:00:31 +02:00
Aurélien Mino
0bf2671eaf
Bump versions
2015-06-18 00:32:37 +02:00
Aurélien Mino
a4b23129d0
Refactoring: renamed import_functions lib to mbimport.
2015-06-18 00:29:08 +02:00
Aurélien Mino
116410ad45
discogs: code style improvements
2015-06-18 00:18:22 +02:00
Aurélien Mino
9b8a8ef5c4
discogs: ignore medium formats that are not mapped to MB formats.
...
This should prevent trying to map e.g. "Box-set".
2015-06-17 23:50:22 +02:00
Laurent Monin
44a5a1282a
discogs: fix up buttons on chrome
2015-06-17 14:44:06 +02:00
Laurent Monin
5dea6f5cab
Bump versions
...
- updated edit note
2015-06-17 11:53:36 +02:00
Laurent Monin
49eef81c43
Advertise the userscripts homepage in the edit note.
2015-06-17 11:51:51 +02:00
Laurent Monin
979c4fce13
discogs: bump version
2015-06-17 10:59:07 +02:00
Laurent Monin
30be1ef964
discogs: try various places to insert buttons, sometimes section social isn't available
...
http://www.discogs.com/Joy-Orbison-Boddika-Trickys-Team/release/5609148
Fix the second link issue reported at:
https://github.com/murdos/musicbrainz-userscripts/issues/13#issuecomment-74458495
2015-06-17 10:50:52 +02:00
Laurent Monin
0cf959ba61
discogs: bump version
2015-06-17 09:50:25 +02:00
Laurent Monin
f7552d244a
Merge pull request #56 from zas/discogs_search_entities
...
Discogs importer: display links for direct search of entities on MB
2015-06-17 09:47:09 +02:00
Laurent Monin
1c71b7c79a
discogs: add a warning near Import button when tracklist is perhaps buggy
...
Example of such release: http://www.discogs.com/Undertone-Sexy-Thing/release/1009184
See discussion at 1bf80fbaf9 (commitcomment-11717691)
2015-06-17 09:43:57 +02:00
Laurent Monin
86a4c286f6
discogs: bump version
2015-06-17 00:37:17 +02:00
Laurent Monin
1bf80fbaf9
discogs: make the script tougher against weird track numbering
...
http://www.discogs.com/release/73531 was leading to an error:
when it tries to parse track 3 position (AA1) it thinks it's a new disc and increase
releaseNumber.
Of course there is no matching release format, so it generates an exception..
http://www.discogs.com/Undertone-Sexy-Thing/release/1009184 also leads to the same exception, somehow for a similar reason (track numbering has the usual scheme),
but the real fix is on the discogs side for this one, tracks 7.1-7.6 should be track 7 with sub-tracks.
Just make the script tougher here again, it just tries to import tracks as they are.
2015-06-17 00:37:17 +02:00
Laurent Monin
8eaef73605
discogs: catch parseDiscogsRelease() exceptions and insert an error message
2015-06-16 23:24:24 +02:00
Laurent Monin
6a57231062
Bump versions
2015-06-16 16:19:53 +02:00
Laurent Monin
9ee0a2ee48
Add Search button to all importers and improve integration on each website
2015-06-16 16:17:00 +02:00
Laurent Monin
4719a5d7d7
mblinks: swap version and expiration parameters
2015-06-16 16:16:59 +02:00
Laurent Monin
bfe25c7da5
mblinks: make expiration optional
...
Use a common default value of 90 days.
2015-06-16 16:16:59 +02:00
Laurent Monin
5a4058eb6b
discogs_importer: display search links for not-yet-found entities
2015-06-15 23:09:26 +02:00
Laurent Monin
5b43dd6938
Bump modified scripts versions
2015-06-15 09:54:21 +02:00
Laurent Monin
5a2d439d55
Unify the style of the MB import button among websites
...
- display musicbrainz icon in it
- unify css style
- add a new lib/mbimportstyle.js (store functions inserting css)
2015-06-15 09:52:59 +02:00
Laurent Monin
67f1325327
Bump versions
...
libs changed a bit.
2015-06-14 15:02:07 +02:00
Laurent Monin
857cdf7c30
discogs_importer: in debug mode, display a border around the import div
2015-06-14 14:25:10 +02:00
Laurent Monin
b26c5407de
discogs_importer: improve display of links to this page
...
- only display if there is actually a link
- make text smaller
- change text to '... linked to this page'
- vertical align icons
2015-06-14 14:21:18 +02:00
Laurent Monin
2b1bb7f7e1
discogs_importer: make the musicbrainz import block appears smoothly
2015-06-14 14:17:49 +02:00
Laurent Monin
b7a52ff58c
discogs_importer: make /master/view/ pages act like /master/
2015-06-14 14:08:55 +02:00
Laurent Monin
6e2e20eb7a
Bump versions
2015-06-13 04:29:28 +02:00
Laurent Monin
6d44668600
importers: move release type guessing to fnBuildFormParameters()
...
- use milliseconds for track durations everywhere for consistency
- use total duration in guessing only if all tracks have a duration
- improve a bit the differenciation single/EP/album
- it only happens if no release type was set by user script
2015-06-13 04:25:31 +02:00
Laurent Monin
18805276c5
Bump versions
2015-06-13 00:55:28 +02:00
Laurent Monin
a2710a1067
discogs_importer: if no release type was found, try to guess one
2015-06-13 00:55:28 +02:00
Laurent Monin
3bf4752cbc
discogs_importer: use MBReleaseImportHelper.URL_TYPES.discogs
2015-06-13 00:23:45 +02:00
Laurent Monin
f5255fb22e
discogs_importer: update version
2015-06-12 16:34:29 +02:00
Laurent Monin
c5ad8604bf
discogs_importer: also match artist simple alias
2015-06-12 16:20:57 +02:00
Laurent Monin
c1c1f1682e
discogs_importer: simplify code using getDiscogsLinkKey()
...
Parse current page url once, and propagate the resulting key.
2015-06-12 16:20:57 +02:00
Laurent Monin
d9a58d0820
discogs_importer: get clean url from the release json data instead of window.location
2015-06-12 16:20:57 +02:00
Laurent Monin
01bba52c05
discogs_importer: include artist link ending with ?noanv=1 (main artist name)
2015-06-12 16:20:57 +02:00
Laurent Monin
8172a6a5f2
discogs_importer: use add_mblinks()
...
As a major change, magnifyLinks() is only called on elements selected instead on the whole page.
Types are now passed as an array, which prevents repeated expansion of selectors
2015-06-12 16:20:56 +02:00
Laurent Monin
6ac8a4f740
discogs_importer: add_mblinks() function
2015-06-12 16:20:56 +02:00
Laurent Monin
52a6b17908
getCacheKeyFromUrl(): remove useless console.log()
2015-06-12 16:20:56 +02:00
Laurent Monin
152db36755
magnifyLinks(): drop force parameter, and use a counter for processed nodes
...
Using a counter helps for debugging.
2015-06-12 16:20:56 +02:00
Laurent Monin
a9695a21ca
discogs_importer: improve debug_color() output
2015-06-12 16:20:56 +02:00
Laurent Monin
bce2b544d5
discogs_importer: disable pjax navigation
...
At least until someone can get get pjax events to work with GM
2015-06-12 16:20:56 +02:00
Laurent Monin
ed894db18e
discogs_importer: update cache version, since we are using keys now
2015-06-12 16:20:56 +02:00
Laurent Monin
48093bda90
searchAndDisplayMbLinkInSection(): use cache key and improve support for places
...
Test case: http://www.discogs.com/Thomas-Fersen-Triplex/release/1307146 (companies)
2015-06-12 16:20:56 +02:00
Laurent Monin
ed92c733ef
Use a cache key instead of url for discogs release page
2015-06-12 16:20:56 +02:00
Laurent Monin
42086bf1af
MBIDfromUrl(): make it use a cache key instead of url
2015-06-12 16:20:56 +02:00
Laurent Monin
dab6f5ccc1
discogs_importer: introduce two functions building a cache key including mb type
2015-06-12 16:20:56 +02:00
Laurent Monin
dd9e2895cd
searchAndDisplayMbLinkInSection(): make mb_type optionnal
...
If not given, defaults to the type usually matching the discogs type.
At the moment, only 'master' maps to a different mb type (release-group).
2015-06-12 16:20:56 +02:00
Laurent Monin
203438fd9d
Update versions
2015-06-11 15:59:23 +02:00
Laurent Monin
f653ebe164
discogs_importer: discogsRelease.master_url may not be defined
2015-06-11 15:57:15 +02:00
Laurent Monin
fd78099113
discogs_importer: display places for links in companies section
...
Preliminary support.
2015-06-11 15:34:16 +02:00
Laurent Monin
2725bdf76d
discogs_importer: improve mblink_done attribute
...
It was a boolean, it is now a list of all MB types tried.
2015-06-11 15:33:11 +02:00
Laurent Monin
7ab2e249e4
discogs_importer: add more mb links
...
Improve selectors, and add a fancy debug mode coloring zones, and adding a debug_discogs attribute
for matching elements.
2015-06-11 11:57:52 +02:00
Laurent Monin
3be144bf25
discogs_importer: instead of replacing hrefs, add an attribute mlink
...
Modifying hrefs may cause various issues with the host website, using our own key will ease
searchs.
2015-06-11 11:22:23 +02:00
Laurent Monin
be0d245a2f
Update version
2015-06-11 00:24:15 +02:00
Laurent Monin
0da85a03dc
Ensure parseInt() base to be 10
...
Octal as default was dropped since ECMAScript 5, but better safe than sorry.
Also it ensures parsing '0xa' returns 0, and not 10 (hexa->dec)
2015-06-11 00:21:39 +02:00
Laurent Monin
b2cf577bd3
Update version
2015-06-10 23:56:27 +02:00
Laurent Monin
328964ff39
Update versions
2015-06-10 15:02:24 +02:00
Laurent Monin
641ef5c837
Add missing script descriptions
2015-06-10 15:00:03 +02:00
Aurélien Mino
439201356f
[discogs] No MB links should be added for Marketplace links.
2015-06-08 07:16:20 +02:00
Laurent Monin
3047bce8d7
Update versions due to recent changes
2015-06-08 01:57:42 +02:00
Laurent Monin
8df35d0330
Fix a typo causing the logger to fail: None != none
...
@grant None is incorrect, the correct "@grant none" is the default since greasemonkey 2.0
so just drop those lines.
2015-06-07 23:34:18 +02:00
Aurélien Mino
f89b8f0a85
Update discogs importer version
2015-06-07 21:51:05 +02:00
Aurélien Mino
74ea93381e
[discogs] Use mblinks cache to seed MBIDs for artists, labels,
...
release-group.
2015-06-07 21:49:51 +02:00
Aurélien Mino
a193e5079f
[discogs] Display more MusicBrainz links:
...
- track artists
- labels
- "All Versions of this Release" link
2015-06-07 20:00:05 +02:00
Laurent Monin
0ed808ff11
Bump discogs and bandcamp versions
2015-06-06 13:44:05 +02:00
Laurent Monin
4bc4e9e3c8
Use latest jquery version
...
Old version is getting ... old.
2015-06-06 13:12:47 +02:00
Laurent Monin
138943667f
Fix mb links display when navigating through pages
...
Pages are pjax-loaded, an event was listening for changes but due to discogsLinksMagnified attribute set in magnifyLinks(), the step was ignored (we want the links to be magnified again).
So, ignoring this attribute on triggered event is working.
I'm not sure this is the best fix for that yet.
2015-06-06 13:12:07 +02:00
Laurent Monin
e66f4c45df
Fix an old issue causing the mb link to be added more than once.
...
Mark links as processed using an attribute.
Note: there is another old issue related to discogs page navigation, links don't always show up
2015-06-06 10:42:28 +02:00
Laurent Monin
636c9e0ca9
Display link to MB artist on master and release pages
2015-06-05 23:28:45 +02:00
Laurent Monin
3b3ea553f6
Normalize discogs artist urls
2015-06-05 23:28:09 +02:00
Laurent Monin
beef49f3e1
Drop unused variable
2015-06-05 23:26:13 +02:00
Laurent Monin
6d778043fc
Discogs importer: use mblinks lib
...
Behavior changed slightly:
- cached entries are now refreshed after a week (tune-able)
- icons are now specific to types (release, release-group)
2015-06-05 22:17:24 +02:00
Laurent Monin
5dcd552f13
Use relative paths in @require for libs
2015-06-05 20:49:23 +02:00
Laurent Monin
adf6c4fdca
Calculate total duration of sub-tracks if needed
...
Tested with: http://www.discogs.com/release/1156598
Suggested by https://github.com/murdos/musicbrainz-userscripts/pull/45#issuecomment-108753443
2015-06-04 10:08:03 +02:00
Laurent Monin
45c0216ea0
Discogs importer: append sub-track titles to main title
...
If we have an index titled "A" with 2 sub-tracks "B" and "C", set the track title to "A: B / C"
Tested on http://www.discogs.com/release/5880212
2015-06-04 00:37:15 +02:00
Laurent Monin
0d4b481ac5
Merge commit 'a5138fe3d7013393c5c3f4aaea8510caaf60e40a'
2015-06-04 00:02:37 +02:00
Laurent Monin
acd9488c2e
Update discogs importer version after e6adb9814a
2015-06-03 23:52:26 +02:00
Laurent Monin
2e16ad5a27
Discogs: import disc titles when possible
...
https://github.com/murdos/musicbrainz-userscripts/issues/6
2015-06-03 17:09:38 +02:00
Aurélien Mino
59e0f8b244
Enhanced logging system factored in a new lib: logger.js.
2015-01-18 14:00:58 +01:00
Aurélien Mino
7890f15146
[discogs_importer] Fixes #16 : comma after every artist.
...
Some odd/old Discogs releases have comma as ending join phrase in the
artist credit. While Discogs data is wrong, it's better to handle such
case.
2015-01-18 02:01:36 +01:00
Pascal "Pixel" Rigaux
a5138fe3d7
fix #31 : handle discogs tracks in case of sub-tracks
...
in case of sub-tracks (at least for http://api.discogs.com/releases/5880212 ),
json field "position" is "" so previous code ignored the track.
The solution here is to use first sub-track position which is good enough to detect change of CD numbers.
2015-01-16 13:56:36 +01:00
Jason Salaz
8108a1449b
removes GreaseMonkey's JQuery, uses pure json instead of JSON-P
2014-12-30 08:35:11 -08:00
Aurélien Mino
f8dd7116bd
Update @version
2014-09-27 19:52:04 +02:00
nikki
8491eb1c0e
Revert "Check that a variable is set before trying to use it"
...
This reverts commit f4fc0abf9f
.
2014-09-26 16:21:01 +02:00
nikki
075e459f2e
Map "Memory Stick" to "Other" instead, since after investigation it seems it's also used for SD cards
2014-08-15 06:04:41 +02:00
nikki
c63c914c0e
Set unsafeWindow in a way which works in Opera
2014-08-15 05:47:18 +02:00
nikki
f4fc0abf9f
Check that a variable is set before trying to use it
2014-08-15 04:46:15 +02:00
nikki
90586d5ec6
Update some format mappings: CDV is now available separately, Floppy Disk wasn't being correctly mapped to a format and Memory Stick is essentially equivalent to MusicBrainz's USB Flash Drive
2014-08-15 02:25:58 +02:00
nikki
0492f90949
Add support for more specific CD/DVD formats (VCD, SVCD, CD+G, HDCD, DVD-Audio, DVD-Video, 8cm CD)
2014-08-15 02:23:51 +02:00
nikki
94cbef72d5
Map Discogs "Album", "EP" and "Mini-Album" and support secondary types separately from primary type
2014-08-15 01:55:30 +02:00
nikki
36de6b612e
Map Discogs "Unofficial Release" to MusicBrainz "Bootleg"
2014-08-15 00:51:44 +02:00
Aurélien Mino
39149d1cae
New releases for all scripts.
2014-02-22 10:33:26 +01:00
Frederik "Freso" S. Olesen
d8c6b8eb65
[discogs_importer] Add Discogs URL in release editor.
2014-02-21 20:05:25 +01:00
Frederik "Freso" S. Olesen
bf39917070
Manual indentation of $.ajax() call in discogs_importer.user.js.
...
Follow-up to commit 1a3a2414dc
.
2014-02-21 19:45:11 +01:00
Frederik "Freso" S. Olesen
1a3a2414dc
Line up indentations properly.
...
`sed -E 's/^(( )*) {1,3}([^ ])/\1\3/'`
(Thanks to @warpr and @JonnyJD for help with cracking that one!)
2014-02-21 19:43:59 +01:00
Aurélien Mino
66dfc41313
[discogs] Code clean-up
2013-12-31 19:21:47 +01:00