fixed the overlapping issue with short soundcloud links
ids of some of new links overlap with old ones, so i decided to remove support for old shareable links. keeping support for soundcloud.app.goo.gl links makes no sense, you can't even get them from any of the apps anymore.
This commit is contained in:
parent
de3b0cdfd2
commit
a2e7212285
2 changed files with 9 additions and 2 deletions
|
@ -36,8 +36,7 @@ async function findClientID() {
|
|||
export default async function(obj) {
|
||||
let html;
|
||||
if (!obj.author && !obj.song && obj.shortLink) {
|
||||
html = await fetch(`https://soundcloud.app.goo.gl/${obj.shortLink}/`).then((r) => { return r.status === 404 ? false : r.text() }).catch(() => { return false });
|
||||
if (!html) html = await fetch(`https://on.soundcloud.com/${obj.shortLink}/`).then((r) => { return r.status === 404 ? false : r.text() }).catch(() => { return false })
|
||||
html = await fetch(`https://on.soundcloud.com/${obj.shortLink}/`).then((r) => { return r.status === 404 ? false : r.text() }).catch(() => { return false });
|
||||
}
|
||||
if (obj.author && obj.song) {
|
||||
html = await fetch(`https://soundcloud.com/${obj.author}/${obj.song}${obj.accessKey ? `/s-${obj.accessKey}` : ''}`).then((r) => { return r.text() }).catch(() => { return false });
|
||||
|
|
|
@ -280,6 +280,14 @@
|
|||
"code": 200,
|
||||
"status": "stream"
|
||||
}
|
||||
}, {
|
||||
"name": "on.soundcloud link",
|
||||
"url": "https://on.soundcloud.com/AG4c",
|
||||
"params": {},
|
||||
"expected": {
|
||||
"code": 200,
|
||||
"status": "stream"
|
||||
}
|
||||
}],
|
||||
"youtube": [{
|
||||
"name": "4k video (h264, 1440)",
|
||||
|
|
Loading…
Reference in a new issue