attempt 2 to fix music cover image
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
parent
369a89d7e6
commit
25e9d44a76
@ -5,7 +5,7 @@ export async function GET(req: NextRequest, { params }: { params: Promise<{ trac
|
|||||||
const { track } = await params;
|
const { track } = await params;
|
||||||
try {
|
try {
|
||||||
const trackName = decodeURIComponent(track);
|
const trackName = decodeURIComponent(track);
|
||||||
const filePath = resolve(process.cwd(), 'app/music', trackName);
|
const filePath = resolve(process.cwd(), 'music', trackName);
|
||||||
const metadata = await mm.parseFile(filePath);
|
const metadata = await mm.parseFile(filePath);
|
||||||
const picture = metadata.common.picture?.[0];
|
const picture = metadata.common.picture?.[0];
|
||||||
if (!picture) {
|
if (!picture) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user