mirror of
https://github.com/wukko/cobalt.git
synced 2025-06-12 21:27:39 +02:00
7.6.1: fixed numbers in metadata and file names
also replaced the 7.6 banner with webp version
This commit is contained in:
@ -70,8 +70,8 @@ export default async function(obj) {
|
||||
if (!file) return { error: 'ErrorCouldntFetch' };
|
||||
|
||||
let fileMetadata = {
|
||||
title: cleanString(json.title.replace(/\p{Emoji}/gu, '').trim()),
|
||||
artist: cleanString(json.user.username.replace(/\p{Emoji}/gu, '').trim()),
|
||||
title: cleanString(json.title.trim()),
|
||||
artist: cleanString(json.user.username.trim()),
|
||||
}
|
||||
|
||||
return {
|
||||
|
@ -34,8 +34,8 @@ export default async function(obj) {
|
||||
if (!obj.forceDash && JSON.stringify(api).includes('"progressive":[{')) downloadType = "progressive";
|
||||
|
||||
let fileMetadata = {
|
||||
title: cleanString(api.video.title.replace(/\p{Emoji}/gu, '').trim()),
|
||||
artist: cleanString(api.video.owner.name.replace(/\p{Emoji}/gu, '').trim()),
|
||||
title: cleanString(api.video.title.trim()),
|
||||
artist: cleanString(api.video.owner.name.trim()),
|
||||
}
|
||||
|
||||
if (downloadType !== "dash") {
|
||||
|
@ -34,8 +34,8 @@ export default async function(o) {
|
||||
url = js.player.params[0][`url${quality}`];
|
||||
|
||||
let fileMetadata = {
|
||||
title: cleanString(js.player.params[0].md_title.replace(/\p{Emoji}/gu, '').trim()),
|
||||
artist: cleanString(js.player.params[0].md_author.replace(/\p{Emoji}/gu, '').trim()),
|
||||
title: cleanString(js.player.params[0].md_title.trim()),
|
||||
artist: cleanString(js.player.params[0].md_author.trim()),
|
||||
}
|
||||
|
||||
if (url) return {
|
||||
|
@ -61,8 +61,8 @@ export default async function(o) {
|
||||
}
|
||||
}
|
||||
let fileMetadata = {
|
||||
title: cleanString(info.basic_info.title.replace(/\p{Emoji}/gu, '').trim()),
|
||||
artist: cleanString(info.basic_info.author.replace("- Topic", "").replace(/\p{Emoji}/gu, '').trim()),
|
||||
title: cleanString(info.basic_info.title.trim()),
|
||||
artist: cleanString(info.basic_info.author.replace("- Topic", "").trim()),
|
||||
}
|
||||
if (info.basic_info.short_description && info.basic_info.short_description.startsWith("Provided to YouTube by")) {
|
||||
let descItems = info.basic_info.short_description.split("\n\n");
|
||||
|
Reference in New Issue
Block a user