Commit graph

78 commits

Author SHA1 Message Date
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
Laurent Monin
429df69112 Unify Import scripts names 2015-06-10 14:59:12 +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
Laurent Monin
0442f76f55 Update bandcamp importer version 2015-06-07 01:46:50 +02:00
Laurent Monin
92aa8cca37 Clarify single/track/album and related code
- track, /track/ on bandcamp, belongs to an album, not importable
- single, /track/ on bandcamp, standalone, importable
- album, /album/ on bandcamp, importable
2015-06-07 01:46:03 +02:00
Laurent Monin
ff19d2f96f parent_album -> parent_album_url 2015-06-07 01:26:56 +02:00
Laurent Monin
670074e07b Fix up album/artist links on track pages 2015-06-07 01:22:49 +02:00
Laurent Monin
67204007b8 Retrieve release info before anything else. 2015-06-07 01:20:23 +02:00
Laurent Monin
f431b89623 Store url instead of title in release.parent_album
Title is unused in itself, but the whole purpose is to differentiate single tracks vs single tracks belonging to an album.
2015-06-07 01:18:27 +02:00
Laurent Monin
e29787ecc0 Use url provided by Bandcamp in albumData instead of window.location
Provided url is cleaner.
2015-06-07 00:30:25 +02:00
Laurent Monin
166cfd57a9 Fix single import not showing regression
Bug introduced by me in 34584e7b77
2015-06-07 00:22:03 +02:00
Laurent Monin
0ed808ff11 Bump discogs and bandcamp versions 2015-06-06 13:44:05 +02:00
Laurent Monin
b306925b98 Move MBLinks js class to lib/mblinks.js, and use relative paths for @require 2015-06-05 11:13:42 +02:00
Laurent Monin
507641ee33 Bandcamp importer: add links to matching MB artist and releases
Based on the discogs importer code, but with few improvements:
- localStorage entries can expire (set to 1 week)
- code has its own namespace, and is more generic (it will move to a lib later)
- prevent jquery libs conflicts (GM vs website), jquery upgraded to 2.1.4
2015-06-05 10:39:00 +02:00
Laurent Monin
d00dfc4ca3 Improve style of the original image link
Open image in another tab by default (yes, i know target blank is evil).
2015-06-01 12:01:08 +02:00
Laurent Monin
7d9c9d8ea5 Bandcamp importer: better handling of hidden tracks
Sometimes, Bandcamp album contains more tracks in the download than shown for streaming
In this case, append unknown tracks to the imported release to match the download
and remove the stream for free link (if any) as it doesn't match the whole release

This is a bit hacky since there is only one way i found to know how many tracks has the download:
- the info is from meta property description
- hidden tracks don't appear anywhere else
- no title (but sometimes artist lists them in annotations) and of course no duration
- script assumes hidden tracks are at the end of the release (which is very likely though)

Examples:
https://benfrost.bandcamp.com/album/by-the-throat
https://calicogalaxy.bandcamp.com/album/the-great-388-with-bonus-tracks
https://davyjones.bandcamp.com/album/christmas-jones-special-download-edition-w-bonus-tracks
https://theactivelistener.bandcamp.com/album/white-candles-flowers-for-delia-al009
2015-05-29 10:58:14 +02:00
Laurent Monin
4012edd162 Add @description in script headers and re-generate README.md 2015-05-28 10:26:38 +02:00
Laurent Monin
34584e7b77 Bandcamp importer: tidy up code
- add missing curly brackets
- add missing semicolons
- fix up global vs local variables (missing var)
- move importer functions to their own namespace
- beautify code
- remove unneeded commented lines

Code behavior shouldn't have changed but risk of conflicts with third-party scripts is heavily reduced.
2015-05-25 18:13:40 +02:00
Laurent Monin
c2f688be23 Bandcamp import: attempt to detect label when release page is a sub-page of one
When a label has its own bandcamp page, most releases have a back link to the root page for the label.

Ie. https://baroness.bandcamp.com/album/yellow-green has a link on the top left to Relapse Records artists page (https://relapserecords.bandcamp.com/artists)

The code detects if such link exists and use the label's name to prefill the Add Release form.
Of course, sometimes it will be wrong, because the so-called label on Bandcamp isn't a real label, the user should be able to sort it out.
2015-05-20 14:01:35 +02:00