i fucking hate youtube

youtube-related changes:
- fixed silly mistake that made all shorts download in default format instead of preferred one
- made youtube module return full video (audio + video) if it's available and matches selected quality (usually 720p)
- changed the order of streams in video render (now video is first)

other changes:
- hopefully fixed zoom in on input in safari
- moved match module from sub to main modules directory
This commit is contained in:
wukko
2022-07-10 19:30:42 +06:00
parent ec105fb333
commit 9081f790ff
7 changed files with 46 additions and 46 deletions

View File

@@ -147,7 +147,7 @@ async function download(url) {
changeDownloadButton(2, '...');
eid("url-input-area").disabled = true;
let format = '';
if (url.includes(".youtube.com/") || url.includes("/youtu.be/")) {
if (url.includes("youtube.com/") || url.includes("/youtu.be/")) {
format = `&format=${localStorage.getItem("youtubeFormat")}`
}
fetch(`/api/json?quality=${localStorage.getItem("quality")}${format}&url=${encodeURIComponent(url)}`).then(async (response) => {