Add initial Amazon Music support

This commit is contained in:
Jonathan Cremin 2018-04-08 16:31:46 +01:00
parent bd85678303
commit b0fcf55071
25 changed files with 248 additions and 222 deletions

View file

@ -0,0 +1,11 @@
import { parse } from 'url';
export default function match(url) {
const parsed = parse(url);
if (!parsed.host.match(/\.amazon\.com$/)) {
return false;
}
const matches = parse(url).path.match(/\/(albums)[/]+([^/]+)/);
return (matches && !!matches[2]);
}