Add initial Amazon Music support
This commit is contained in:
parent
bd85678303
commit
b0fcf55071
25 changed files with 248 additions and 222 deletions
11
lib/services/amazon/url.js
Normal file
11
lib/services/amazon/url.js
Normal 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]);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue