api/soundcloud: add more metadata fields (#1313)
This commit is contained in:
@@ -113,9 +113,16 @@ export default async function(obj) {
|
||||
|
||||
if (!file) return { error: "fetch.empty" };
|
||||
|
||||
const artist = json.user?.username?.trim();
|
||||
const fileMetadata = {
|
||||
title: json.title.trim(),
|
||||
artist: json.user.username.trim(),
|
||||
title: json.title?.trim(),
|
||||
album: json.publisher_metadata?.album_title?.trim(),
|
||||
artist,
|
||||
album_artist: artist,
|
||||
composer: json.publisher_metadata?.writer_composer?.trim(),
|
||||
genre: json.genre?.trim(),
|
||||
date: json.display_date?.trim().slice(0, 10),
|
||||
copyright: json.license?.trim(),
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
@@ -17,9 +17,12 @@ const ffmpegArgs = {
|
||||
|
||||
const metadataTags = [
|
||||
"album",
|
||||
"composer",
|
||||
"genre",
|
||||
"copyright",
|
||||
"title",
|
||||
"artist",
|
||||
"album_artist",
|
||||
"track",
|
||||
"date",
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user