mirror of
https://github.com/wukko/cobalt.git
synced 2024-11-18 06:09:58 +00:00
match: light cleanup
This commit is contained in:
parent
f9feaa41ce
commit
c458423e03
1 changed files with 6 additions and 5 deletions
|
@ -37,7 +37,6 @@ export default async function(host, patternMatch, url, lang, obj) {
|
||||||
break;
|
break;
|
||||||
case "vk":
|
case "vk":
|
||||||
r = await vk({
|
r = await vk({
|
||||||
url: url,
|
|
||||||
userId: patternMatch["userId"],
|
userId: patternMatch["userId"],
|
||||||
videoId: patternMatch["videoId"],
|
videoId: patternMatch["videoId"],
|
||||||
quality: obj.vQuality
|
quality: obj.vQuality
|
||||||
|
@ -57,11 +56,13 @@ export default async function(host, patternMatch, url, lang, obj) {
|
||||||
isAudioMuted: obj.isAudioMuted,
|
isAudioMuted: obj.isAudioMuted,
|
||||||
dubLang: obj.dubLang
|
dubLang: obj.dubLang
|
||||||
}
|
}
|
||||||
if (url.match('music.youtube.com') || isAudioOnly === true) {
|
|
||||||
|
if (new URL(url).hostname === 'music.youtube.com' || isAudioOnly === true) {
|
||||||
fetchInfo.quality = "max";
|
fetchInfo.quality = "max";
|
||||||
fetchInfo.format = "vp9";
|
fetchInfo.format = "vp9";
|
||||||
fetchInfo.isAudioOnly = true
|
fetchInfo.isAudioOnly = true
|
||||||
}
|
}
|
||||||
|
|
||||||
r = await youtube(fetchInfo);
|
r = await youtube(fetchInfo);
|
||||||
break;
|
break;
|
||||||
case "reddit":
|
case "reddit":
|
||||||
|
@ -83,9 +84,9 @@ export default async function(host, patternMatch, url, lang, obj) {
|
||||||
break;
|
break;
|
||||||
case "tumblr":
|
case "tumblr":
|
||||||
r = await tumblr({
|
r = await tumblr({
|
||||||
id: patternMatch["id"],
|
id: patternMatch.id,
|
||||||
url: url,
|
user: patternMatch.user,
|
||||||
user: patternMatch["user"] || false
|
url
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case "vimeo":
|
case "vimeo":
|
||||||
|
|
Loading…
Reference in a new issue