Commit graph

178 commits

Author SHA1 Message Date
Laurent Monin
5f08654b16 Simplify initCache() 2015-06-05 17:15:04 +02:00
Laurent Monin
14179dda3f Move hardcoded musicbrainz url to a MBLinks property 2015-06-05 17:01:19 +02:00
Laurent Monin
3e16227cd9 Do '-' to '_' replacement in type once, outside the each loop 2015-06-05 16:56:37 +02:00
Laurent Monin
41c5f675cf Encode URI passed as parameter in MB ws request url 2015-06-05 16:53:15 +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
573c1d7eba CD1D importer: update version 2015-06-04 16:53:18 +02:00
Laurent Monin
7f6f2be7ee CD1D importer: use much more recent jquery version 2015-06-04 16:15:09 +02:00
Laurent Monin
aebed5afdd CD1D importer: fix a fatal typo 2015-06-04 16:13:31 +02:00
Aurélien Mino
c72f353f6e Merge pull request #45 from zas/subtracks
Handle sub-tracks and their titles
2015-06-04 08:48:06 +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
Aurélien Mino
e6adb9814a Merge pull request #44 from zas/discogs_disc_titles
Discogs: import disc titles when possible
2015-06-03 19:38:14 +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
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
66faf22f6b Merge pull request #43 from zas/hiddentracks
Bandcamp importer: better handling of hidden tracks
2015-06-01 11:03:34 +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
Aurélien Mino
496472415a Improve generated README to be friendlier, and less technical. 2015-05-27 21:29:19 +02:00
Laurent Monin
7cb969b327 Add README.md 2015-05-27 16:40:30 +02:00
Laurent Monin
4498e60c2f Add a python script to generate a human-readable list of user scripts 2015-05-27 16:40:06 +02:00
Laurent Monin
cd25e521ae Tidy up 2015-05-27 14:31:14 +02:00
Laurent Monin
ca2040fa07 CD1D importer: add support to import any of available formats
Import button now appears on the bottom of release tracklist, and change with active tab.
So when a release is available in vinyl and CD, user can now choose which one he wants to import.
2015-05-27 14:11:01 +02:00
Laurent Monin
3bc5a63e5f Better handling of multiple discs and digital releases
For now, only first release can be imported
2015-05-27 11:03:12 +02:00
Aurélien Mino
93b627adfa Merge pull request #38 from zas/bandcamp_importer_cleanup
Bandcamp importer: tidy up code
2015-05-27 05:12:00 +02:00
Aurélien Mino
505e33f440 Merge pull request #39 from zas/cd1d_importer
CD1D importer
2015-05-27 05:04:20 +02:00
Laurent Monin
55955213cb CD1D importer
CD1D.com is a french website distributing independent music, in digital and physical formats.
The importer supports following features:
- release date, including "today", and "yesterday"
- label
- multiple artists
- vinyl/CD/digital (whenever possible, not perfect due to the way releases are listed)
- track times conversion (the website don't use mm:ss format)
- add a download link for digital, a mailorder link for physical
2015-05-26 22:24:51 +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
Aurélien Mino
e933144d2f Merge pull request #37 from zas/bci_label
Bandcamp import: attempt to detect label when release page is a sub-page of one.
2015-05-24 11:40:43 +02:00
Aurélien Mino
6b76728d75 Merge pull request #36 from zas/bci_helper
New script for Bandcamp that displays the link to the current album when not on an bandcamp /album/ page.
2015-05-24 11:38:45 +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
3c2a7641fd Display the link to the current album when not on an bandcamp /album/ page 2015-05-20 00:26:50 +02:00
Aurélien Mino
2ff1b9fa1f Merge pull request #35 from zas/bci_new_links
Bandcamp importer: Add commas after tags, and a link to original image
2015-05-19 20:35:03 +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
9aef576d3b [ui_enhancements] Fix display of releases with many mediums after Server update, 2015-02-09. 2015-02-14 13:56:20 +01:00
Aurélien Mino
a21eae18e6 [ui_enhancements] Fix display of releases with few mediums after Server
update, 2015-02-09.
2015-02-14 12:29:36 +01:00
Aurélien Mino
f217ccf005 Use new logging system in all import scripts. 2015-01-18 14:13:32 +01: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
7716463be2 [import_functions] Improve header documentation 2015-01-18 13:34:10 +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
Aurélien Mino
5424744063 Merge pull request #29 from VxJasonxV/discogs-updates
removes GreaseMonkey's JQuery, uses pure json instead of JSON-P
2015-01-07 21:58:50 +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
18015ca130 [ui_enhancements] Improve highlighting of year in ISRC. 2014-12-25 21:28:46 +01:00
Aurélien Mino
3fd86d7f5b [ui_enhancements] Also display recording comment on release track
listing.
2014-12-25 21:14:06 +01:00
Aurélien Mino
fd658e0714 [ui_enhancements] Display ISRC on release tracklisting.
This replaces the feature provided by the "MusicBrainz Advanced Release
view" userscript that is now entirely defunct.
2014-12-22 00:03:22 +01:00
Aurélien Mino
ba5dacdae1 [ui_enhancements] Reindented and fixed eol. 2014-12-21 23:25:10 +01:00