added an option for tiktok h265 videos, majorly cleaned up frontend

- cleaned up cobalt.js (by a lot)
- removed notification dot
- removed settings migration
- removed vimeoDash
- turned youtube track language switcher into a toggle
- added clarification as to what youtube dub does
- updated defaults to match with backend
- now matching a url from any string at any place
This commit is contained in:
wukko
2024-04-30 00:04:19 +06:00
parent dc243a1e61
commit 8f5eec0b5d
9 changed files with 360 additions and 345 deletions

View File

@ -88,7 +88,8 @@ export default async function(host, patternMatch, url, lang, obj) {
postId: patternMatch.postId,
id: patternMatch.id,
fullAudio: obj.isTTFullAudio,
isAudioOnly: isAudioOnly
isAudioOnly: isAudioOnly,
h265: obj.tiktokH265
});
break;
case "tumblr":
@ -103,8 +104,7 @@ export default async function(host, patternMatch, url, lang, obj) {
id: patternMatch.id.slice(0, 11),
password: patternMatch.password,
quality: obj.vQuality,
isAudioOnly: isAudioOnly,
forceDash: isAudioOnly ? true : obj.vimeoDash
isAudioOnly: isAudioOnly
});
break;
case "soundcloud":

View File

@ -47,8 +47,8 @@ export default async function(obj) {
images = detail.image_post_info?.images;
let playAddr = detail.video.play_addr_h264;
if (!playAddr) playAddr = detail.video.play_addr;
if ((obj.h265 || !playAddr) && detail.video.play_addr)
playAddr = detail.video.play_addr;
if (!obj.isAudioOnly && !images) {
video = playAddr.url_list[0];

View File

@ -39,7 +39,7 @@ export default async function(obj) {
if (!api) return { error: 'ErrorCouldntFetch' };
let downloadType = "dash";
if (!obj.forceDash && JSON.stringify(api).includes('"progressive":[{')) downloadType = "progressive";
if (!obj.isAudioOnly && JSON.stringify(api).includes('"progressive":[{')) downloadType = "progressive";
let fileMetadata = {
title: cleanString(api.video.title.trim()),