Skip to content

Commit

Permalink
fix: add ability to detect mobile soundcloud url (#60)
Browse files Browse the repository at this point in the history
* fix: add ability to detect mobile soundcloud url

* Partially revert "fix: add ability to detect mobile soundcloud url"

This reverts commit aa046a7.
Removed dist files from the repo

* Revert "fix: add ability to detect mobile soundcloud url"

This reverts commit aa046a7.

* fix: adding back the changed files
  • Loading branch information
takase1121 authored Apr 5, 2020
1 parent 4dd8cb2 commit f714f2e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/provider/soundcloud.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module.exports = SoundCloud;

SoundCloud.prototype.parseUrl = function(url, result) {
var match = url.match(
/soundcloud\.com\/(?:([\w-]+)\/(sets\/)?)([\w-]+)/i
/(?:m\.)?soundcloud\.com\/(?:([\w-]+)\/(sets\/)?)([\w-]+)/i
);
if (!match) {
return result;
Expand Down
2 changes: 2 additions & 0 deletions lib/provider/soundcloud.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ test('SoundCloud: track urls', () => {
},
urls: [
'https://soundcloud.com/julian-hangst-rfer/odsf0dif92w3j_adfw-edf-1-asdf-1',
'https://m.soundcloud.com/julian-hangst-rfer/odsf0dif92w3j_adfw-edf-1-asdf-1',
],
});
testUrls(newParser(), {
Expand All @@ -56,6 +57,7 @@ test('SoundCloud: track urls', () => {
},
urls: [
'https://soundcloud.com/julian-hangst-rfer/odsf0dif92w3j_adfw-edf-1-asdf-1#t=00:30',
'https://m.soundcloud.com/julian-hangst-rfer/odsf0dif92w3j_adfw-edf-1-asdf-1#t=00:30',
],
});
});
Expand Down

0 comments on commit f714f2e

Please sign in to comment.