added ability to download full audios from tiktok (3.3.5)

- it's now possible to download full audios from tiktok videos, you just have to turn that on in settings.
- tiktok audios are better in quality when it's possible to get exact audio used in video and not the full version of it.
- cleaned up the way user preference stuff is passed over between modules, should be way more flexible now.
- added audio ignore list to services config json instead of hardcoding it.
This commit is contained in:
wukko
2022-08-23 20:43:56 +06:00
parent 189ecf8fe7
commit a8b5555a1b
14 changed files with 182 additions and 114 deletions

View File

@@ -7,7 +7,7 @@ import { errorUnsupported } from "./sub/errors.js";
import loc from "../localization/manager.js";
import match from "./match.js";
export async function getJSON(originalURL, ip, lang, format, quality, audioFormat, isAudioOnly, noWatermark) {
export async function getJSON(originalURL, lang, obj) {
try {
let url = decodeURI(originalURL);
if (!url.includes('http://')) {
@@ -32,7 +32,7 @@ export async function getJSON(originalURL, ip, lang, format, quality, audioForma
if (patternMatch) break;
}
if (patternMatch) {
return await match(host, patternMatch, url, ip, lang, format, quality, audioFormat, isAudioOnly, noWatermark);
return await match(host, patternMatch, url, lang, obj);
} return apiJSON(0, { t: errorUnsupported(lang) })
} return apiJSON(0, { t: errorUnsupported(lang) })
} else {