Commit graph

97 commits

Author SHA1 Message Date
Laurent Monin
4a8f5d00b3
Make Eslint happier 2020-02-14 18:16:56 +01:00
Laurent Monin
6e1f053bc3
Bandcamp Importer: display UPC instead of adding to barcode field
This UPC may not be the one of the submitted release.
See https://community.metabrainz.org/t/digital-release-with-two-bandcamp-links-different-release-or-not/454077/10?u=zas
2020-02-14 15:08:57 +01:00
Laurent Monin
147f954495
Fix typo in bandcamp importer 2019-12-21 13:33:39 +01:00
Laurent Monin
f538b9b6bb
Fix bug introduced in 2019.12.21.1, check for undefined value 2019-12-21 12:24:35 +01:00
Laurent Monin
59aa1e7f5c
Bump Bandcamp & Beatport importers versions 2019-12-21 11:19:17 +01:00
John Laws Harrison
ba39df6c43 Fix Bandcamp label name initialization from backlink 2019-12-16 14:19:00 -08:00
Laurent Monin
f5869e7c95
Prefill barcode if possible
See https://community.metabrainz.org/t/digital-release-with-two-bandcamp-links-different-release-or-not/454077/7
2019-12-07 16:52:07 +01:00
Aurélien Mino
0426b890bc Remove unsafeWindow usage in logger and in scripts that don't need it and grant unsafeWindow for scripts that actually use it. 2019-01-12 15:54:18 +01:00
Aurélien Mino
14a32dab62 Applied prettier and eslint tools on existing code
None of these changes are manual changes made a human
2018-11-20 23:18:49 +01:00
Laurent Monin
b901f77430
Bandcamp Importer: Use only https URLs
- Bandcamp now redirects all http URLs to https
- They didn't change URLs in DOM data yet, most are still http
- MB changed Bandcamp URLs normalization to use https
- MB didn't change old Bandcamp http URLs in the database yet

Basically this breaks some features of the importer, like detection of existing artists, labels, and releases (small icons)
Since the importer has no way to know if the url is stored as http or https, the result is quite random.

One solution would be to query for both, doubling the number of requests to the web service.
Another, much better, is to convert all old Bandcamp http URLs in MB database to https (all new URLs are normalized to https).

This patch only fix http URLs still appearing in pages, and look up for https URLS on the web service.
So, at the moment, the fix is incomplete.
2018-06-01 23:22:19 +02:00
Laurent Monin
bc3f5df6f5
Bandcamp importer: bump version to 2018.3.7.1 2018-03-07 10:19:29 +01:00
Laurent Monin
01ee374100
Bandcamp importer: count tracks actually streamable, and add Stream for free link only if fully streamable
Fix https://github.com/murdos/musicbrainz-userscripts/issues/157
2018-03-07 10:18:31 +01:00
Laurent Monin
6c5c083dba
Change version format on all scripts
Related to https://github.com/murdos/musicbrainz-userscripts/pull/171
2018-02-18 18:16:45 +01:00
Laurent Monin
da58524d1a
Bandcamp importer: fix up extra space in tags, and few semicolons in code 2018-01-14 18:48:02 +01:00
Laurent Monin
ec81ba7c59
Bandcamp Importer: set the label name from the back link text 2017-09-05 10:51:31 +02:00
Laurent Monin
4459dfebb7
Bandcamp importer: use back link to label to find out label mbid 2017-09-05 10:34:13 +02:00
Laurent Monin
98f69b23c6
bandcamp_importer: Use _0 image as original image instead of _1
The change from _0 to _1 was made last year because some _0 images were cropped at the bottom,
prolly due to a bug on Bandcamp side.
I rechecked concerned images, and it seems all are working now as expected.
See also:
- https://community.metabrainz.org/t/reference-bandcamp-album-art-sizes/214623/4
- 044037ab49
2017-02-21 15:31:19 +01:00
Laurent Monin
044037ab49
Provides a better original image link, using _1 instead of _0
Since some time _0 images which are PNGs are truncated at the bottom, using _1 instead
seems to provide the same but correct image.
2016-07-30 19:31:18 +02:00
Laurent Monin
8eb66c1e4b
Bump version of scripts depending on lib/mblinks.js
This is to ensure they are upgraded to include image links change.
2016-05-29 14:47:17 +02:00
Laurent Monin
88b9c07023 Bandcamp importer: fix multiple artists detection with numbered tracklist
If all tracks are of the form 'number - title', number was taken as a possible
artist in a VA album.

Example of page where the problem arises: https://thegrave666.bandcamp.com/album/the-grave
Such tracklists aren't that uncommon on Bandcamp unfortunately.
2015-09-07 23:35:53 +02:00
Laurent Monin
f6d5c441fb Bandcamp importer: set icon for the script 2015-07-10 14:27:31 +02:00
Laurent Monin
646ba53047 Bandcamp importer: bump version 2015-07-10 13:44:01 +02:00
Laurent Monin
2157a2efe1 Try to get the label mbid from cache
Suggested by pankkake in https://github.com/murdos/musicbrainz-userscripts/issues/72
2015-07-10 10:14:01 +02:00
Laurent Monin
3d2e5f8fef Query MB for a label having this root url and display link if found 2015-07-10 10:12:48 +02:00
Laurent Monin
46d2031f25 artist_link -> root_url 2015-07-10 10:12:01 +02:00
Laurent Monin
3be8834d4e Bump bandcamp import script version 2015-06-21 17:36:35 +02:00
Laurent Monin
e9baa959b7 Use MBImport.specialArtist() 2015-06-21 17:33:38 +02:00
Laurent Monin
8e1fcea4f7 Bandcamp: try to detect multiple artists releases
- there is no indicator of compilation or split release, etc..
- bandcamp builds titles from artist + track title, "artist - title"
- only works if ALL tracks have this format
- set release artist to Various Artists only when original release artist contains Various or Various artists AND we detect all tracks in format "artist - title"

I did tests, and didn't find any problematic releases yet (but i guess they'll be some)
Examples:
http://tartarusrecords.com/album/split-2
http://shop.bornbadrecords.net/album/wizzz-french-psychorama-vol-3
https://bedroomcassettemasters.bandcamp.com/album/bedroom-cassette-masters-1980-89-volume-one
2015-06-21 17:29:21 +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
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
7343042f5c bandcamp: bump version 2015-06-16 21:44:53 +02:00
Laurent Monin
e2f318c128 bandcamp_importer: support bandcamp pages having their own domain
Currently, one has to add the domain to userscript preferences for pages provided by bandcamp
but under another domain (ie. http://bearthemammoth.com/album/yamadori)

This change makes the @include wider (it may match totally unrelated pages) and test for
a bandcamp-specific object before doing anything.
2015-06-16 21:38:33 +02:00
Laurent Monin
38e732a3c4 bandcamp: try to use mblinks cache to get artist mbid 2015-06-16 21:24:01 +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
bfe25c7da5 mblinks: make expiration optional
Use a common default value of 90 days.
2015-06-16 16:16:59 +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
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
e0ca73766a bandcamp_importer: use MBReleaseImportHelper.guessReleaseType 2015-06-12 23:54:01 +02:00
Laurent Monin
6283a0c9ed bandcamp_importer: use MBReleaseImportHelper.URL_TYPES 2015-06-12 23:53:35 +02:00
Laurent Monin
203438fd9d Update versions 2015-06-11 15:59: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
328964ff39 Update versions 2015-06-10 15:02:24 +02:00