diff --git a/src/common/constants.js b/src/components/input/constants.js similarity index 100% rename from src/common/constants.js rename to src/components/input/constants.js diff --git a/src/components/input/s3/worker.js b/src/components/input/s3/worker.js index 782199cd..650a2e98 100644 --- a/src/components/input/s3/worker.js +++ b/src/components/input/s3/worker.js @@ -169,7 +169,7 @@ export async function resolve( const client = createClient(parsed.bucket); const url = await client.getPresignedUrl( - /** @type {any} */ (method.toUpperCase()), + /** @type {any} */ (method?.toUpperCase() ?? "GET"), parsed.path, ); diff --git a/src/components/orchestrator/process-tracks/worker.js b/src/components/orchestrator/process-tracks/worker.js index d52f3419..c593ae6e 100644 --- a/src/components/orchestrator/process-tracks/worker.js +++ b/src/components/orchestrator/process-tracks/worker.js @@ -1,6 +1,7 @@ import deepDiff from "@fry69/deep-diff"; + import { define, ostiary, proxyProvider } from "@common/worker.js"; -import { INPUT_ACTIONS } from "@common/constants.js"; +import { INPUT_ACTIONS } from "@components/input/constants.js"; /** * @import {Track} from "@definitions/types.d.ts" diff --git a/src/components/processor/metadata/common.js b/src/components/processor/metadata/common.js index a41e3566..31f25ed6 100644 --- a/src/components/processor/metadata/common.js +++ b/src/components/processor/metadata/common.js @@ -71,8 +71,9 @@ export async function musicMetadataTags({ const tags = { album: meta.common.album, albumartist: meta.common.albumartist, - albumartists: meta.common.albumartists ?? - (meta.common.albumartist ? [meta.common.albumartist] : []), + albumartists: Array.isArray(meta.common.albumartist) + ? meta.common.albumartist + : (meta.common.albumartist ? [meta.common.albumartist] : undefined), albumartistsort: meta.common.albumartistsort, albumsort: meta.common.albumsort, arranger: meta.common.arranger, @@ -99,13 +100,19 @@ export async function musicMetadataTags({ gapless: meta.common.gapless, genres: Array.isArray(meta.common.genre) ? meta.common.genre - : [meta.common.genre], + : meta.common.genre + ? [meta.common.genre] + : undefined, isrc: meta.common.isrc, labels: meta.common.label, lyricists: meta.common.lyricist, media: meta.common.media, mixers: meta.common.mixer, - moods: meta.common.mood, + moods: Array.isArray(meta.common.mood) + ? meta.common.mood + : meta.common.mood + ? [meta.common.mood] + : undefined, originaldate: meta.common.originaldate, originalyear: meta.common.originalyear, peakLevel: meta.common.peakLevel,