mirror of
https://github.com/imputnet/cobalt.git
synced 2025-01-15 11:25:17 +00:00
api/youtube: fix youtube music metadata parsing
Some checks failed
Run tests / check lockfile correctness (push) Waiting to run
Run tests / web sanity check (push) Waiting to run
Run tests / api sanity check (push) Waiting to run
Run service tests / test service functionality (push) Has been cancelled
Run service tests / test service: ${{ matrix.service }} (push) Has been cancelled
Some checks failed
Run tests / check lockfile correctness (push) Waiting to run
Run tests / web sanity check (push) Waiting to run
Run tests / api sanity check (push) Waiting to run
Run service tests / test service functionality (push) Has been cancelled
Run service tests / test service: ${{ matrix.service }} (push) Has been cancelled
still pretty crappy tho
This commit is contained in:
parent
7d6fe34fa4
commit
bf7a48a36c
|
@ -243,11 +243,13 @@ export default async function(o) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (basicInfo?.short_description?.startsWith("Provided to YouTube by")) {
|
if (basicInfo?.short_description?.startsWith("Provided to YouTube by")) {
|
||||||
let descItems = basicInfo.short_description.split("\n\n");
|
let descItems = basicInfo.short_description.split("\n\n", 5);
|
||||||
fileMetadata.album = descItems[2];
|
if (descItems.length === 5) {
|
||||||
fileMetadata.copyright = descItems[3];
|
fileMetadata.album = descItems[2];
|
||||||
if (descItems[4].startsWith("Released on:")) {
|
fileMetadata.copyright = descItems[3];
|
||||||
fileMetadata.date = descItems[4].replace("Released on: ", '').trim()
|
if (descItems[4].startsWith("Released on:")) {
|
||||||
|
fileMetadata.date = descItems[4].replace("Released on: ", '').trim();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue