Add support for rdio short urls
This commit is contained in:
parent
e4a856e228
commit
c7b9ea5b00
1 changed files with 3 additions and 2 deletions
|
@ -6,6 +6,7 @@ module.exports.match = function(url) {
|
|||
if (!parsed.host.match(/rd\.io$/) && !parsed.host.match(/rdio\.com$/)) {
|
||||
return false;
|
||||
}
|
||||
var matches = parsed.path.match(/[\/]*artist[\/]*([^\/]*)[\/]*album[\/]*([^\/]*)[\/]*([track]*)?[\/]*([^\/]*)/);
|
||||
return !!matches[2];
|
||||
var regular = parsed.path.match(/[\/]*artist[\/]*([^\/]*)[\/]*album[\/]*([^\/]*)[\/]*([track]*)?[\/]*([^\/]*)/);
|
||||
var short = parsed.path.match(/[\/]*x[\/]*([^\/]*)/);
|
||||
return (regular && !!regular[2]) || (short && !!short[1]);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue