Commit graph

97 commits

Author SHA1 Message Date
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
Laurent Monin
50391d1969 Update version 2015-05-16 14:41:35 +02:00
Laurent Monin
c3d552dfe5 Add a link to the original cover art image under the album image.
On Bandcamp, original images can be downloaded replacing _10 by _0 in image links.
2015-05-16 14:41:23 +02:00
Laurent Monin
ed4e372ea6 Add commas to tags to ease cut'n'paste to MusicBrainz
MusicBrainz accept list of tags separated by commas.
2015-05-16 14:39:51 +02:00
Aurélien Mino
f217ccf005 Use new logging system in all import scripts. 2015-01-18 14:13:32 +01:00
Laurent Monin
d81573718e Bump @version 2014-10-18 14:33:21 +02:00
Laurent Monin
6d23a1e629 Fix up off-by-one error concerning months
getUTCMonth() returns month as 0..11
2014-10-18 14:33:07 +02:00
Laurent Monin
7a35a63e01 Use publish date if album release date is before Bandcamp launch
Date is parsed using native js Date(), not sure why an external lib was used before.



See http://musicbrainz.org/edit/29612074
2014-10-08 23:24:41 +02:00
Laurent Monin
d1cb622d77 Fix up free/paid download links
The matter is quite complex here, as Bandcamp is providing many options for the artist.
Mostly this should fix mixing up free download / paid download links in almost all cases.
2014-09-26 11:51:15 +02:00
Laurent Monin
8868beeb5c Set default values for packaging, language and script
Most of stuffs imported from Bandcamp is eng/latin, and packaging should be None for digital releases.
2014-09-26 11:47:44 +02:00
Laurent Monin
941638c6ec Fix release date (use microdata date published) 2014-09-26 11:46:03 +02:00
Aurélien Mino
39149d1cae New releases for all scripts. 2014-02-22 10:33:26 +01:00
Frederik "Freso" S. Olesen
a4cf5c7998 [bandcamp] Fix URL adding "name your price" downloads.
The logic checked for minimum_price > 0 and == 0 both, while they
obviously cannot both be true.
2014-02-21 23:58:30 +01:00
Frederik "Freso" S. Olesen
f8097a6bc4 [bandcamp] @require dateFormat.js.
From jquery.dateFormat.js:
"""
// require dateFormat.js
// please check `dist/jquery.dateFormat.js` for a complete version
"""
2014-02-21 22:23:35 +01:00
Frederik "Freso" S. Olesen
29ecb71ad7 [bandcamp] Check for Creative Commons license URLs too. 2014-02-21 22:07:16 +01:00
Frederik "Freso" S. Olesen
d511817a4d [bandcamp] Add Bandcamp URLs to the release editor. 2014-02-21 21:38:05 +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
Frederik "Freso" S. Olesen
9f346bc8e4 Replace tabs with spaces.
`sed 's/\t/    /g'`
2014-02-21 19:43:51 +01:00
Frederik "Freso" S. Olesen
25fcd18750 Remove trailing whitespace.
`sed 's/[[:space:]]*$//'`
2014-02-21 19:43:36 +01:00
Frederik "Freso" S. Olesen
0f6e854037 [bandcamp_importer] Include HTTPS'd Bandcamp pages 2014-01-02 14:20:19 +01:00
kolen
df6cf098b3 Updated URL of jquery-dateFormat (added 'src' path component) 2013-12-30 20:44:34 +04:00
Frederik "Freso" S. Olesen
f0409b75da Use https for GoogleAPIs' jQuery lib 2013-03-04 11:38:13 +01:00
Aurélien Mino
19120cbe60 Follow Mozilla versioning. 2012-12-13 07:45:51 +01:00
Jason Salaz
0f913943f6 we like conditionals that actually work, and appropriate seed data too 2012-12-12 04:15:06 -07:00
Jason Salaz
52edbaf0a2 Support singles when not part of a parent album 2012-12-12 03:48:28 -07:00
Aurélien Mino
963e204cb1 Swith to github as a source for import_functions.js (instead of userscripts.org) 2012-03-29 00:51:26 +02:00
Aurélien Mino
6034d55c5c 2012-02-22 2012-03-29 00:50:21 +02:00
Aurélien Mino
8010252030 2012-01-09 2012-03-29 00:50:04 +02:00
Aurélien Mino
b16a842afb 2011-11-09 2012-03-29 00:49:43 +02:00