Commit graph

215 commits

Author SHA1 Message Date
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
Aurélien Mino
035eb6861e [discogs_importer] Adapt script with recent changes on Discogs site and
done some refactoring in order to also display the MusicBrainz
release(s) that link to the displayed Discogs release.
2013-12-04 08:36:53 +01:00
Aurélien Mino
446c9487ea [discogs_importer] Fixed a bug in MB links 2013-08-19 00:36:01 +02:00
Aurélien Mino
c15c6938f9 [discogs_importer] Display links to MB release/release-group from Discogs site. 2013-08-04 10:33:02 +02:00
Frederik "Freso" S. Olesen
48da95808d Use https for GoogleAPIs' jQuery lib 2013-03-04 11:40:06 +01:00
Aurélien Mino
753ea9b1bd Remove old Script Update Checker 2012-12-08 22:36:54 +01:00
Aurélien Mino
be2d8bab13 Fix handling of packaging. Previously only digipack was working. 2012-12-08 22:30:19 +01:00
Aurélien Mino
9567a32281 Parse all existing formats, rathern than only the first one. Patch by Prommah. 2012-12-08 22:23:04 +01:00
Aurélien Mino
4752c78e11 Cosmetics: trailing whitespaces and carriage returns. 2012-06-09 01:58:47 +02:00
Aurélien Mino
b6c1b69aec Added support for free-form track number. 2012-06-09 01:55:12 +02:00
Aurélien Mino
8419ef2368 Code cleanup: replaced tabs by spaces. 2012-04-22 11:33:06 +02:00
Aurélien Mino
0dc0770ba2 Canonical Discogs URLs use www.discogs.com, not discogs.com. 2012-04-22 11:31:04 +02:00
Aurélien Mino
36208d11e4 Version has not been updated in last commit. 2012-03-29 00:48:00 +02:00
Nicolás Tamargo
d8681fef89 Fixing country code for North Korea 2012-03-29 01:27:25 +03:00
Aurélien Mino
86c25abe7d Swith to github as a source for import_functions.js (instead of userscripts.org) 2012-03-29 00:23:30 +02:00
Aurélien Mino
ae6f3649bf 2012-02-22 2012-03-29 00:20:03 +02:00
Aurélien Mino
ee1c613ece 2012-02-14 2012-03-29 00:19:49 +02:00
Aurélien Mino
e235e4a291 2012-01-19 2012-03-29 00:19:33 +02:00
Aurélien Mino
a493b840da 2011-11-29 2012-03-29 00:19:11 +02:00
Aurélien Mino
217fd901c7 2011-11-06 2012-03-29 00:18:50 +02:00
Aurélien Mino
d05af45f65 2011-09-11~3 2012-03-29 00:18:21 +02:00
Aurélien Mino
e71561eade 2011-09-11~2 2012-03-29 00:18:04 +02:00
Aurélien Mino
e24d22263b 2011-09-11~1 2012-03-29 00:17:47 +02:00
Aurélien Mino
990eb160c3 2011-08-28 2012-03-29 00:17:17 +02:00
Aurélien Mino
821dfa4f07 2011-08-20~2 2012-03-29 00:16:42 +02:00
Aurélien Mino
a586084994 2011-08-20 2012-03-29 00:16:10 +02:00
Aurélien Mino
a4e7d1675d 2011-06-19 2012-03-29 00:14:20 +02:00
Aurélien Mino
6afa4e6b6d 2011-05-26~2 2012-03-29 00:13:59 +02:00
Aurélien Mino
523b47720c 2011-05-26~1 2012-03-29 00:13:47 +02:00
Aurélien Mino
abecca4a39 2011-05-25 2012-03-29 00:13:27 +02:00
Aurélien Mino
6d800c7489 2011-05-24~2 2012-03-29 00:12:53 +02:00
Aurélien Mino
9c65d9c0ea 2011-05-24~1 2012-03-29 00:12:40 +02:00
Aurélien Mino
689bf7f1db 2010-09-21 2012-03-29 00:11:05 +02:00
Aurélien Mino
4a68df1acf 2010-09-20 2012-03-29 00:10:49 +02:00
Aurélien Mino
7120295508 2010-09-15 2012-03-29 00:10:23 +02:00
Aurélien Mino
a0772476da 2010-08-31 2012-03-29 00:03:27 +02:00
Aurélien Mino
ce34b98165 2010-07-07 2012-03-29 00:01:23 +02:00
Aurélien Mino
db4c0368ed 2010-07-01~2 2012-03-29 00:00:55 +02:00
Aurélien Mino
0aa15bf6de 2010-07-01~1 2012-03-29 00:00:30 +02:00
Aurélien Mino
3344200310 2010-04-27 2012-03-29 00:00:05 +02:00
Aurélien Mino
eb4de43d41 2010-02-16 2012-03-28 23:59:37 +02:00
Aurélien Mino
cfdbaabbb6 2010-02-04 2012-03-28 23:58:50 +02:00
Aurélien Mino
a92dfae130 2010-02-03~2 2012-03-28 23:58:36 +02:00
Aurélien Mino
b3caec1133 2010-02-03~1 2012-03-28 23:58:22 +02:00
Aurélien Mino
da5db06201 2010-01-14 2012-03-28 23:58:02 +02:00
Aurélien Mino
4daef0f6c8 2010-01-04~2 2012-03-28 23:57:44 +02:00
Aurélien Mino
5ad3877b35 2010-01-04~1 2012-03-28 23:57:28 +02:00
Aurélien Mino
8335751d6e 2009-01-12 2012-03-28 23:57:01 +02:00
Aurélien Mino
01b96cd4f1 2008-11-04 2012-03-28 23:56:32 +02:00
Aurélien Mino
e5ccdb94f4 2008-11-03~2 2012-03-28 23:56:15 +02:00
Aurélien Mino
bf4b5758a1 2008-11-03~1 2012-03-28 23:55:58 +02:00
Aurélien Mino
a8c1c1e7ee 2008-11-01~2 2012-03-28 23:55:40 +02:00
Aurélien Mino
49b748b5d8 2008-11-01~1: First version 2012-03-28 23:55:12 +02:00