Compare commits
12
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
596555bea6 | ||
|
|
0cabb5014e | ||
|
|
b57d5fe442 | ||
|
|
de38f43bb2 | ||
|
|
152f119d4e | ||
|
|
126ad652f2 | ||
|
|
ef1eed50b8 | ||
|
|
e2c16d1808 | ||
|
|
8d26842e83 | ||
|
|
244e20b9ef | ||
|
|
9d302a3af6 | ||
|
|
3baef7f33b |
No files matched your search
@@ -0,0 +1,68 @@
|
||||
ARG TAG=latest
|
||||
FROM arthichaud/meelo-front:$TAG AS front
|
||||
FROM arthichaud/meelo-matcher:$TAG AS matcher
|
||||
FROM arthichaud/meelo-server:$TAG AS server
|
||||
FROM arthichaud/meelo-scanner:$TAG AS scanner
|
||||
|
||||
FROM --platform=$BUILDPLATFORM alpine:3.23 AS base
|
||||
ARG TARGETARCH
|
||||
RUN apk update && apk add git build-base
|
||||
|
||||
FROM base AS meilisearch_builder
|
||||
ENV MEILI_VERSION=v1.53.2
|
||||
ENV MEILI_REPO=https://github.com/meilisearch/meilisearch
|
||||
RUN apk add rustup
|
||||
RUN rustup-init -y
|
||||
ENV PATH=/root/.cargo/bin/:$PATH
|
||||
RUN rustup update && rustup default stable
|
||||
RUN git clone --branch "$MEILI_VERSION" --single-branch "$MEILI_REPO" /tmp/meilisearch
|
||||
WORKDIR /tmp/meilisearch
|
||||
RUN case "$TARGETARCH" in \
|
||||
amd64) echo "amd64" > /tmp/rust-target ;; \
|
||||
arm64) echo "aarch64" > /tmp/rust-target ;; \
|
||||
*) echo "Unsupported architecture: $TARGETARCH" >&2; exit 1 ;; \
|
||||
esac
|
||||
RUN TARGET="$(cat /tmp/rust-target)-unknown-linux-musl" \
|
||||
&& rustup target add "$TARGET" \
|
||||
&& cargo build --release --target="$TARGET" \
|
||||
&& mkdir /out && mv ./target/$TARGET/release/meilisearch /out/meilisearch
|
||||
|
||||
|
||||
|
||||
FROM base AS runner
|
||||
RUN apk add openssl postgresql rabbitmq-server nodejs nginx ffmpeg chromaprint bash
|
||||
RUN addgroup -S meelo && adduser -S meelo -G meelo
|
||||
RUN mkdir /app && chown -R meelo:meelo /app
|
||||
|
||||
COPY ./nginx.conf.template /etc/nginx/templates/meelo.conf.template
|
||||
|
||||
COPY --from=meilisearch_builder /out/meilisearch /usr/bin/meilisearch
|
||||
RUN meilisearch --version > /dev/null
|
||||
|
||||
|
||||
ENV PGDATA=/var/lib/postgresql/data
|
||||
RUN mkdir -p "$PGDATA" && chown -R meelo:meelo "$(dirname "$PGDATA")"
|
||||
RUN mkdir -p /run/postgresql && chown -R meelo:meelo /run/postgresql
|
||||
|
||||
USER meelo
|
||||
|
||||
COPY --from=front --chown=meelo:meelo /app /app/front
|
||||
COPY --from=server --chown=meelo:meelo /app /app/server
|
||||
|
||||
COPY --from=scanner --chown=meelo:meelo /app /app/scanner
|
||||
COPY --from=scanner --chown=meelo:meelo /usr/local/lib/libopencv*.so.* /usr/local/lib/
|
||||
|
||||
COPY --from=matcher --chown=meelo:meelo /app /app/matcher
|
||||
COPY --from=matcher /usr/local/lib/python3.14 /usr/local/lib/python3.14
|
||||
COPY --from=matcher /usr/local/lib/libpython* /usr/local/lib/
|
||||
COPY --from=matcher /usr/local/bin/fastapi /usr/local/bin
|
||||
COPY --from=matcher /usr/local/bin/pip* /usr/local/bin
|
||||
COPY --from=matcher /usr/local/bin/python* /usr/local/bin
|
||||
|
||||
RUN node --version > /dev/null && fastapi --version > /dev/null
|
||||
|
||||
RUN initdb -D "$PGDATA"
|
||||
|
||||
COPY --chown=meelo:meelo --chmod=755 ./unraid/start.sh /app/start.sh
|
||||
|
||||
ENTRYPOINT ["/app/start.sh"]
|
||||
@@ -8,7 +8,7 @@ import { getGenres, getSong, getSongExternalMetadata } from "@/api/queries";
|
||||
import type { ExternalMetadataSource } from "@/models/external-metadata";
|
||||
import type Genre from "@/models/genre";
|
||||
import type { Lyrics } from "@/models/lyrics";
|
||||
import type Song from "@/models/song";
|
||||
import type { SongWithRelations } from "@/models/song";
|
||||
import { songTypeToTranslationKey } from "@/models/utils";
|
||||
import { playTrackAtom, type TrackState } from "@/state/player";
|
||||
import { LyricsIcon, PlayIcon, SongTypeIcon } from "@/ui/icons";
|
||||
@@ -147,7 +147,11 @@ const LyricsView = ({
|
||||
);
|
||||
};
|
||||
|
||||
const InfoView = ({ song }: { song: Song | undefined }) => {
|
||||
const InfoView = ({
|
||||
song,
|
||||
}: {
|
||||
song: SongWithRelations<"master"> | undefined;
|
||||
}) => {
|
||||
const { t } = useTranslation();
|
||||
const { items: genres } = useInfiniteQuery(
|
||||
(songId) => getGenres({ song: songId }),
|
||||
@@ -179,6 +183,18 @@ const InfoView = ({ song }: { song: Song | undefined }) => {
|
||||
/>
|
||||
</View>
|
||||
</View>
|
||||
|
||||
{song?.master.ripSource ? (
|
||||
<View style={styles.row}>
|
||||
<Text
|
||||
content={`${t("fileInfo.ripSource")}:`}
|
||||
variant="itemLabel"
|
||||
/>
|
||||
<View style={styles.row}>
|
||||
<Text content={song.master.ripSource} />
|
||||
</View>
|
||||
</View>
|
||||
) : null}
|
||||
{(genres === undefined || genres.length > 0) && (
|
||||
<View style={styles.row}>
|
||||
<Text
|
||||
|
||||
@@ -65,6 +65,9 @@ export const TrackInfo = ({ trackId }: { trackId: number }) => {
|
||||
: undefined
|
||||
}
|
||||
/>
|
||||
{track?.ripSource ? (
|
||||
<Row label={t("fileInfo.ripSource")} value={track.ripSource} />
|
||||
) : null}
|
||||
<Row label={t("fileInfo.path")} value={file?.path} />
|
||||
<Row
|
||||
label={t("fileInfo.registrationDate")}
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
"jotai": "2.20.3",
|
||||
"material-ui-confirm": "^4.0.0",
|
||||
"mui-react-hook-form-plus": "^1.5.1",
|
||||
"next": "16.3.3",
|
||||
"next": "16.3.4",
|
||||
"react": "19.2.3",
|
||||
"react-beautiful-dnd": "^13.1.1",
|
||||
"react-blurhash": "^0.3.0",
|
||||
|
||||
@@ -83,6 +83,9 @@ const TrackFileInfo = ({ trackId }: { trackId: number }) => {
|
||||
"fileInfo.duration": track.data
|
||||
? formatDuration(track.data.duration)
|
||||
: undefined,
|
||||
"fileInfo.ripSource": track.data
|
||||
? (track.data.ripSource ?? t("fileInfo.unknown"))
|
||||
: undefined,
|
||||
"fileInfo.bitRate": track.data
|
||||
? track.data.bitrate
|
||||
? `${track.data.bitrate} kbps`
|
||||
|
||||
@@ -343,15 +343,18 @@ const SongPage: Page<GetPropsTypesFrom<typeof prepareSSR>> = ({ props }) => {
|
||||
{song.data ? (
|
||||
song.data.bpm ? (
|
||||
<Typography
|
||||
sx={{
|
||||
paddingTop: 1,
|
||||
paddingBottom: 4,
|
||||
}}
|
||||
sx={{ paddingBottom: 2 }}
|
||||
>{`BPM: ${song.data.bpm}`}</Typography>
|
||||
) : null
|
||||
) : (
|
||||
<Skeleton width={"50px"} />
|
||||
)}
|
||||
|
||||
{song.data?.master.ripSource ? (
|
||||
<Typography
|
||||
sx={{ paddingBottom: 2 }}
|
||||
>{`${t("fileInfo.ripSource")}: ${song.data.master.ripSource}`}</Typography>
|
||||
) : null}
|
||||
{(genres.items === undefined ||
|
||||
genres.items.length !== 0) && (
|
||||
<Stack
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
import * as yup from "yup";
|
||||
|
||||
export const RipSources = [
|
||||
"CD",
|
||||
"DVD",
|
||||
"BluRay",
|
||||
"Cassette",
|
||||
"Digital",
|
||||
"Vinyl",
|
||||
"Other",
|
||||
] as const;
|
||||
|
||||
export type RipSource = (typeof RipSources)[number];
|
||||
|
||||
export const RipSource = yup.mixed<RipSource>().oneOf(RipSources);
|
||||
@@ -20,6 +20,7 @@ import * as yup from "yup";
|
||||
import Illustration from "./illustration";
|
||||
import Release from "./release";
|
||||
import Resource from "./resource";
|
||||
import { RipSource } from "./rip-source";
|
||||
import Song from "./song";
|
||||
import Video from "./video";
|
||||
|
||||
@@ -84,6 +85,7 @@ const Track = Resource.concat(
|
||||
* If the Track is mixed with the previous/next track
|
||||
*/
|
||||
mixed: yup.boolean().required(),
|
||||
ripSource: RipSource.required().nullable().default(null),
|
||||
}),
|
||||
);
|
||||
|
||||
|
||||
@@ -210,6 +210,7 @@
|
||||
"name": "Name",
|
||||
"path": "Path",
|
||||
"registrationDate": "Registration Date",
|
||||
"ripSource": "Rip Source",
|
||||
"type": "Type",
|
||||
"unknown": "Unknown"
|
||||
},
|
||||
|
||||
@@ -208,6 +208,7 @@
|
||||
"name": "Nom",
|
||||
"path": "Chemin",
|
||||
"registrationDate": "Date d'ajout",
|
||||
"ripSource": "Source du rip",
|
||||
"type": "Type",
|
||||
"unknown": "Inconnu"
|
||||
},
|
||||
|
||||
+174
-174
@@ -1564,7 +1564,7 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@emnapi/runtime@npm:^1.11.1":
|
||||
"@emnapi/runtime@npm:^1.11.3":
|
||||
version: 1.11.3
|
||||
resolution: "@emnapi/runtime@npm:1.11.3"
|
||||
dependencies:
|
||||
@@ -2504,11 +2504,11 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@img/sharp-darwin-arm64@npm:0.35.3":
|
||||
version: 0.35.3
|
||||
resolution: "@img/sharp-darwin-arm64@npm:0.35.3"
|
||||
"@img/sharp-darwin-arm64@npm:0.35.4":
|
||||
version: 0.35.4
|
||||
resolution: "@img/sharp-darwin-arm64@npm:0.35.4"
|
||||
dependencies:
|
||||
"@img/sharp-libvips-darwin-arm64": "npm:1.3.2"
|
||||
"@img/sharp-libvips-darwin-arm64": "npm:1.3.3"
|
||||
dependenciesMeta:
|
||||
"@img/sharp-libvips-darwin-arm64":
|
||||
optional: true
|
||||
@@ -2516,11 +2516,11 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@img/sharp-darwin-x64@npm:0.35.3":
|
||||
version: 0.35.3
|
||||
resolution: "@img/sharp-darwin-x64@npm:0.35.3"
|
||||
"@img/sharp-darwin-x64@npm:0.35.4":
|
||||
version: 0.35.4
|
||||
resolution: "@img/sharp-darwin-x64@npm:0.35.4"
|
||||
dependencies:
|
||||
"@img/sharp-libvips-darwin-x64": "npm:1.3.2"
|
||||
"@img/sharp-libvips-darwin-x64": "npm:1.3.3"
|
||||
dependenciesMeta:
|
||||
"@img/sharp-libvips-darwin-x64":
|
||||
optional: true
|
||||
@@ -2528,90 +2528,90 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@img/sharp-freebsd-wasm32@npm:0.35.3":
|
||||
version: 0.35.3
|
||||
resolution: "@img/sharp-freebsd-wasm32@npm:0.35.3"
|
||||
"@img/sharp-freebsd-wasm32@npm:0.35.4":
|
||||
version: 0.35.4
|
||||
resolution: "@img/sharp-freebsd-wasm32@npm:0.35.4"
|
||||
dependencies:
|
||||
"@img/sharp-wasm32": "npm:0.35.3"
|
||||
"@img/sharp-wasm32": "npm:0.35.4"
|
||||
conditions: os=freebsd
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@img/sharp-libvips-darwin-arm64@npm:1.3.2":
|
||||
version: 1.3.2
|
||||
resolution: "@img/sharp-libvips-darwin-arm64@npm:1.3.2"
|
||||
"@img/sharp-libvips-darwin-arm64@npm:1.3.3":
|
||||
version: 1.3.3
|
||||
resolution: "@img/sharp-libvips-darwin-arm64@npm:1.3.3"
|
||||
conditions: os=darwin & cpu=arm64
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@img/sharp-libvips-darwin-x64@npm:1.3.2":
|
||||
version: 1.3.2
|
||||
resolution: "@img/sharp-libvips-darwin-x64@npm:1.3.2"
|
||||
"@img/sharp-libvips-darwin-x64@npm:1.3.3":
|
||||
version: 1.3.3
|
||||
resolution: "@img/sharp-libvips-darwin-x64@npm:1.3.3"
|
||||
conditions: os=darwin & cpu=x64
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@img/sharp-libvips-linux-arm64@npm:1.3.2":
|
||||
version: 1.3.2
|
||||
resolution: "@img/sharp-libvips-linux-arm64@npm:1.3.2"
|
||||
"@img/sharp-libvips-linux-arm64@npm:1.3.3":
|
||||
version: 1.3.3
|
||||
resolution: "@img/sharp-libvips-linux-arm64@npm:1.3.3"
|
||||
conditions: os=linux & cpu=arm64 & libc=glibc
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@img/sharp-libvips-linux-arm@npm:1.3.2":
|
||||
version: 1.3.2
|
||||
resolution: "@img/sharp-libvips-linux-arm@npm:1.3.2"
|
||||
"@img/sharp-libvips-linux-arm@npm:1.3.3":
|
||||
version: 1.3.3
|
||||
resolution: "@img/sharp-libvips-linux-arm@npm:1.3.3"
|
||||
conditions: os=linux & cpu=arm & libc=glibc
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@img/sharp-libvips-linux-ppc64@npm:1.3.2":
|
||||
version: 1.3.2
|
||||
resolution: "@img/sharp-libvips-linux-ppc64@npm:1.3.2"
|
||||
"@img/sharp-libvips-linux-ppc64@npm:1.3.3":
|
||||
version: 1.3.3
|
||||
resolution: "@img/sharp-libvips-linux-ppc64@npm:1.3.3"
|
||||
conditions: os=linux & cpu=ppc64 & libc=glibc
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@img/sharp-libvips-linux-riscv64@npm:1.3.2":
|
||||
version: 1.3.2
|
||||
resolution: "@img/sharp-libvips-linux-riscv64@npm:1.3.2"
|
||||
"@img/sharp-libvips-linux-riscv64@npm:1.3.3":
|
||||
version: 1.3.3
|
||||
resolution: "@img/sharp-libvips-linux-riscv64@npm:1.3.3"
|
||||
conditions: os=linux & cpu=riscv64 & libc=glibc
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@img/sharp-libvips-linux-s390x@npm:1.3.2":
|
||||
version: 1.3.2
|
||||
resolution: "@img/sharp-libvips-linux-s390x@npm:1.3.2"
|
||||
"@img/sharp-libvips-linux-s390x@npm:1.3.3":
|
||||
version: 1.3.3
|
||||
resolution: "@img/sharp-libvips-linux-s390x@npm:1.3.3"
|
||||
conditions: os=linux & cpu=s390x & libc=glibc
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@img/sharp-libvips-linux-x64@npm:1.3.2":
|
||||
version: 1.3.2
|
||||
resolution: "@img/sharp-libvips-linux-x64@npm:1.3.2"
|
||||
"@img/sharp-libvips-linux-x64@npm:1.3.3":
|
||||
version: 1.3.3
|
||||
resolution: "@img/sharp-libvips-linux-x64@npm:1.3.3"
|
||||
conditions: os=linux & cpu=x64 & libc=glibc
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@img/sharp-libvips-linuxmusl-arm64@npm:1.3.2":
|
||||
version: 1.3.2
|
||||
resolution: "@img/sharp-libvips-linuxmusl-arm64@npm:1.3.2"
|
||||
"@img/sharp-libvips-linuxmusl-arm64@npm:1.3.3":
|
||||
version: 1.3.3
|
||||
resolution: "@img/sharp-libvips-linuxmusl-arm64@npm:1.3.3"
|
||||
conditions: os=linux & cpu=arm64 & libc=musl
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@img/sharp-libvips-linuxmusl-x64@npm:1.3.2":
|
||||
version: 1.3.2
|
||||
resolution: "@img/sharp-libvips-linuxmusl-x64@npm:1.3.2"
|
||||
"@img/sharp-libvips-linuxmusl-x64@npm:1.3.3":
|
||||
version: 1.3.3
|
||||
resolution: "@img/sharp-libvips-linuxmusl-x64@npm:1.3.3"
|
||||
conditions: os=linux & cpu=x64 & libc=musl
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@img/sharp-linux-arm64@npm:0.35.3":
|
||||
version: 0.35.3
|
||||
resolution: "@img/sharp-linux-arm64@npm:0.35.3"
|
||||
"@img/sharp-linux-arm64@npm:0.35.4":
|
||||
version: 0.35.4
|
||||
resolution: "@img/sharp-linux-arm64@npm:0.35.4"
|
||||
dependencies:
|
||||
"@img/sharp-libvips-linux-arm64": "npm:1.3.2"
|
||||
"@img/sharp-libvips-linux-arm64": "npm:1.3.3"
|
||||
dependenciesMeta:
|
||||
"@img/sharp-libvips-linux-arm64":
|
||||
optional: true
|
||||
@@ -2619,11 +2619,11 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@img/sharp-linux-arm@npm:0.35.3":
|
||||
version: 0.35.3
|
||||
resolution: "@img/sharp-linux-arm@npm:0.35.3"
|
||||
"@img/sharp-linux-arm@npm:0.35.4":
|
||||
version: 0.35.4
|
||||
resolution: "@img/sharp-linux-arm@npm:0.35.4"
|
||||
dependencies:
|
||||
"@img/sharp-libvips-linux-arm": "npm:1.3.2"
|
||||
"@img/sharp-libvips-linux-arm": "npm:1.3.3"
|
||||
dependenciesMeta:
|
||||
"@img/sharp-libvips-linux-arm":
|
||||
optional: true
|
||||
@@ -2631,11 +2631,11 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@img/sharp-linux-ppc64@npm:0.35.3":
|
||||
version: 0.35.3
|
||||
resolution: "@img/sharp-linux-ppc64@npm:0.35.3"
|
||||
"@img/sharp-linux-ppc64@npm:0.35.4":
|
||||
version: 0.35.4
|
||||
resolution: "@img/sharp-linux-ppc64@npm:0.35.4"
|
||||
dependencies:
|
||||
"@img/sharp-libvips-linux-ppc64": "npm:1.3.2"
|
||||
"@img/sharp-libvips-linux-ppc64": "npm:1.3.3"
|
||||
dependenciesMeta:
|
||||
"@img/sharp-libvips-linux-ppc64":
|
||||
optional: true
|
||||
@@ -2643,11 +2643,11 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@img/sharp-linux-riscv64@npm:0.35.3":
|
||||
version: 0.35.3
|
||||
resolution: "@img/sharp-linux-riscv64@npm:0.35.3"
|
||||
"@img/sharp-linux-riscv64@npm:0.35.4":
|
||||
version: 0.35.4
|
||||
resolution: "@img/sharp-linux-riscv64@npm:0.35.4"
|
||||
dependencies:
|
||||
"@img/sharp-libvips-linux-riscv64": "npm:1.3.2"
|
||||
"@img/sharp-libvips-linux-riscv64": "npm:1.3.3"
|
||||
dependenciesMeta:
|
||||
"@img/sharp-libvips-linux-riscv64":
|
||||
optional: true
|
||||
@@ -2655,11 +2655,11 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@img/sharp-linux-s390x@npm:0.35.3":
|
||||
version: 0.35.3
|
||||
resolution: "@img/sharp-linux-s390x@npm:0.35.3"
|
||||
"@img/sharp-linux-s390x@npm:0.35.4":
|
||||
version: 0.35.4
|
||||
resolution: "@img/sharp-linux-s390x@npm:0.35.4"
|
||||
dependencies:
|
||||
"@img/sharp-libvips-linux-s390x": "npm:1.3.2"
|
||||
"@img/sharp-libvips-linux-s390x": "npm:1.3.3"
|
||||
dependenciesMeta:
|
||||
"@img/sharp-libvips-linux-s390x":
|
||||
optional: true
|
||||
@@ -2667,11 +2667,11 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@img/sharp-linux-x64@npm:0.35.3":
|
||||
version: 0.35.3
|
||||
resolution: "@img/sharp-linux-x64@npm:0.35.3"
|
||||
"@img/sharp-linux-x64@npm:0.35.4":
|
||||
version: 0.35.4
|
||||
resolution: "@img/sharp-linux-x64@npm:0.35.4"
|
||||
dependencies:
|
||||
"@img/sharp-libvips-linux-x64": "npm:1.3.2"
|
||||
"@img/sharp-libvips-linux-x64": "npm:1.3.3"
|
||||
dependenciesMeta:
|
||||
"@img/sharp-libvips-linux-x64":
|
||||
optional: true
|
||||
@@ -2679,11 +2679,11 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@img/sharp-linuxmusl-arm64@npm:0.35.3":
|
||||
version: 0.35.3
|
||||
resolution: "@img/sharp-linuxmusl-arm64@npm:0.35.3"
|
||||
"@img/sharp-linuxmusl-arm64@npm:0.35.4":
|
||||
version: 0.35.4
|
||||
resolution: "@img/sharp-linuxmusl-arm64@npm:0.35.4"
|
||||
dependencies:
|
||||
"@img/sharp-libvips-linuxmusl-arm64": "npm:1.3.2"
|
||||
"@img/sharp-libvips-linuxmusl-arm64": "npm:1.3.3"
|
||||
dependenciesMeta:
|
||||
"@img/sharp-libvips-linuxmusl-arm64":
|
||||
optional: true
|
||||
@@ -2691,11 +2691,11 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@img/sharp-linuxmusl-x64@npm:0.35.3":
|
||||
version: 0.35.3
|
||||
resolution: "@img/sharp-linuxmusl-x64@npm:0.35.3"
|
||||
"@img/sharp-linuxmusl-x64@npm:0.35.4":
|
||||
version: 0.35.4
|
||||
resolution: "@img/sharp-linuxmusl-x64@npm:0.35.4"
|
||||
dependencies:
|
||||
"@img/sharp-libvips-linuxmusl-x64": "npm:1.3.2"
|
||||
"@img/sharp-libvips-linuxmusl-x64": "npm:1.3.3"
|
||||
dependenciesMeta:
|
||||
"@img/sharp-libvips-linuxmusl-x64":
|
||||
optional: true
|
||||
@@ -2703,41 +2703,41 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@img/sharp-wasm32@npm:0.35.3":
|
||||
version: 0.35.3
|
||||
resolution: "@img/sharp-wasm32@npm:0.35.3"
|
||||
"@img/sharp-wasm32@npm:0.35.4":
|
||||
version: 0.35.4
|
||||
resolution: "@img/sharp-wasm32@npm:0.35.4"
|
||||
dependencies:
|
||||
"@emnapi/runtime": "npm:^1.11.1"
|
||||
checksum: 10c0/627125c330ab96e324c888d3c43fa72eb7c975e653277755121df14447373b7b47b011a1eae9c8c360a9535a7072bd6205b6498974006124b513c033a07e0e32
|
||||
"@emnapi/runtime": "npm:^1.11.3"
|
||||
checksum: 10c0/7f5e394f168eb2f038b8ae4949fb5434085d1db931ede2ae1389479d7a1dbe11e2fc9d58e8e9830bff744ba996256c9e411be1d466dfcbf6e1f4d153b84f25ff
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@img/sharp-webcontainers-wasm32@npm:0.35.3":
|
||||
version: 0.35.3
|
||||
resolution: "@img/sharp-webcontainers-wasm32@npm:0.35.3"
|
||||
"@img/sharp-webcontainers-wasm32@npm:0.35.4":
|
||||
version: 0.35.4
|
||||
resolution: "@img/sharp-webcontainers-wasm32@npm:0.35.4"
|
||||
dependencies:
|
||||
"@img/sharp-wasm32": "npm:0.35.3"
|
||||
"@img/sharp-wasm32": "npm:0.35.4"
|
||||
conditions: cpu=wasm32
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@img/sharp-win32-arm64@npm:0.35.3":
|
||||
version: 0.35.3
|
||||
resolution: "@img/sharp-win32-arm64@npm:0.35.3"
|
||||
"@img/sharp-win32-arm64@npm:0.35.4":
|
||||
version: 0.35.4
|
||||
resolution: "@img/sharp-win32-arm64@npm:0.35.4"
|
||||
conditions: os=win32 & cpu=arm64
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@img/sharp-win32-ia32@npm:0.35.3":
|
||||
version: 0.35.3
|
||||
resolution: "@img/sharp-win32-ia32@npm:0.35.3"
|
||||
"@img/sharp-win32-ia32@npm:0.35.4":
|
||||
version: 0.35.4
|
||||
resolution: "@img/sharp-win32-ia32@npm:0.35.4"
|
||||
conditions: os=win32 & cpu=ia32
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@img/sharp-win32-x64@npm:0.35.3":
|
||||
version: 0.35.3
|
||||
resolution: "@img/sharp-win32-x64@npm:0.35.3"
|
||||
"@img/sharp-win32-x64@npm:0.35.4":
|
||||
version: 0.35.4
|
||||
resolution: "@img/sharp-win32-x64@npm:0.35.4"
|
||||
conditions: os=win32 & cpu=x64
|
||||
languageName: node
|
||||
linkType: hard
|
||||
@@ -3194,65 +3194,65 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@next/env@npm:16.3.3":
|
||||
version: 16.3.3
|
||||
resolution: "@next/env@npm:16.3.3"
|
||||
checksum: 10c0/6f300379d8ddc476d09897e97c26d593b60973bf425b093b96fdb4459f9547e8d05f3aca82a59bf0c1711b96b6a615b3483a396aec1c36a91526b9617260ba92
|
||||
"@next/env@npm:16.3.4":
|
||||
version: 16.3.4
|
||||
resolution: "@next/env@npm:16.3.4"
|
||||
checksum: 10c0/6a9adf69b7aaa1d13e255aa158ee7accce81c6c23dfc2c786b3fc6f0f4c5354b3c67e7d60be5521d322d2164ba86fc01b9dc2f3f18282f6162760de99e19fd13
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@next/swc-darwin-arm64@npm:16.3.3":
|
||||
version: 16.3.3
|
||||
resolution: "@next/swc-darwin-arm64@npm:16.3.3"
|
||||
"@next/swc-darwin-arm64@npm:16.3.4":
|
||||
version: 16.3.4
|
||||
resolution: "@next/swc-darwin-arm64@npm:16.3.4"
|
||||
conditions: os=darwin & cpu=arm64
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@next/swc-darwin-x64@npm:16.3.3":
|
||||
version: 16.3.3
|
||||
resolution: "@next/swc-darwin-x64@npm:16.3.3"
|
||||
"@next/swc-darwin-x64@npm:16.3.4":
|
||||
version: 16.3.4
|
||||
resolution: "@next/swc-darwin-x64@npm:16.3.4"
|
||||
conditions: os=darwin & cpu=x64
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@next/swc-linux-arm64-gnu@npm:16.3.3":
|
||||
version: 16.3.3
|
||||
resolution: "@next/swc-linux-arm64-gnu@npm:16.3.3"
|
||||
"@next/swc-linux-arm64-gnu@npm:16.3.4":
|
||||
version: 16.3.4
|
||||
resolution: "@next/swc-linux-arm64-gnu@npm:16.3.4"
|
||||
conditions: os=linux & cpu=arm64 & libc=glibc
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@next/swc-linux-arm64-musl@npm:16.3.3":
|
||||
version: 16.3.3
|
||||
resolution: "@next/swc-linux-arm64-musl@npm:16.3.3"
|
||||
"@next/swc-linux-arm64-musl@npm:16.3.4":
|
||||
version: 16.3.4
|
||||
resolution: "@next/swc-linux-arm64-musl@npm:16.3.4"
|
||||
conditions: os=linux & cpu=arm64 & libc=musl
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@next/swc-linux-x64-gnu@npm:16.3.3":
|
||||
version: 16.3.3
|
||||
resolution: "@next/swc-linux-x64-gnu@npm:16.3.3"
|
||||
"@next/swc-linux-x64-gnu@npm:16.3.4":
|
||||
version: 16.3.4
|
||||
resolution: "@next/swc-linux-x64-gnu@npm:16.3.4"
|
||||
conditions: os=linux & cpu=x64 & libc=glibc
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@next/swc-linux-x64-musl@npm:16.3.3":
|
||||
version: 16.3.3
|
||||
resolution: "@next/swc-linux-x64-musl@npm:16.3.3"
|
||||
"@next/swc-linux-x64-musl@npm:16.3.4":
|
||||
version: 16.3.4
|
||||
resolution: "@next/swc-linux-x64-musl@npm:16.3.4"
|
||||
conditions: os=linux & cpu=x64 & libc=musl
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@next/swc-win32-arm64-msvc@npm:16.3.3":
|
||||
version: 16.3.3
|
||||
resolution: "@next/swc-win32-arm64-msvc@npm:16.3.3"
|
||||
"@next/swc-win32-arm64-msvc@npm:16.3.4":
|
||||
version: 16.3.4
|
||||
resolution: "@next/swc-win32-arm64-msvc@npm:16.3.4"
|
||||
conditions: os=win32 & cpu=arm64
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@next/swc-win32-x64-msvc@npm:16.3.3":
|
||||
version: 16.3.3
|
||||
resolution: "@next/swc-win32-x64-msvc@npm:16.3.3"
|
||||
"@next/swc-win32-x64-msvc@npm:16.3.4":
|
||||
version: 16.3.4
|
||||
resolution: "@next/swc-win32-x64-msvc@npm:16.3.4"
|
||||
conditions: os=win32 & cpu=x64
|
||||
languageName: node
|
||||
linkType: hard
|
||||
@@ -6940,9 +6940,9 @@ __metadata:
|
||||
linkType: hard
|
||||
|
||||
"hls.js@npm:^1.6.16, hls.js@npm:^1.6.7":
|
||||
version: 1.7.1
|
||||
resolution: "hls.js@npm:1.7.1"
|
||||
checksum: 10c0/316762dd811aaacf9e551a8a635f6b24b07333e9b45cf854f0c1031f3340d91de76b6205de9f92e7b753ce0bcb0dd69489671131071de2419e5bdecbf0d182b6
|
||||
version: 1.7.3
|
||||
resolution: "hls.js@npm:1.7.3"
|
||||
checksum: 10c0/c44c0098b9f4b53cb0c2cc2301d4cad907a77c60f470fa344b8cfc5077da4ccab9590d47e5cf81100a958d4aa43d7dc7bcb6566197fd9ae170ec10cea8af3e8c
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -8824,24 +8824,24 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"next@npm:16.3.3":
|
||||
version: 16.3.3
|
||||
resolution: "next@npm:16.3.3"
|
||||
"next@npm:16.3.4":
|
||||
version: 16.3.4
|
||||
resolution: "next@npm:16.3.4"
|
||||
dependencies:
|
||||
"@next/env": "npm:16.3.3"
|
||||
"@next/swc-darwin-arm64": "npm:16.3.3"
|
||||
"@next/swc-darwin-x64": "npm:16.3.3"
|
||||
"@next/swc-linux-arm64-gnu": "npm:16.3.3"
|
||||
"@next/swc-linux-arm64-musl": "npm:16.3.3"
|
||||
"@next/swc-linux-x64-gnu": "npm:16.3.3"
|
||||
"@next/swc-linux-x64-musl": "npm:16.3.3"
|
||||
"@next/swc-win32-arm64-msvc": "npm:16.3.3"
|
||||
"@next/swc-win32-x64-msvc": "npm:16.3.3"
|
||||
"@next/env": "npm:16.3.4"
|
||||
"@next/swc-darwin-arm64": "npm:16.3.4"
|
||||
"@next/swc-darwin-x64": "npm:16.3.4"
|
||||
"@next/swc-linux-arm64-gnu": "npm:16.3.4"
|
||||
"@next/swc-linux-arm64-musl": "npm:16.3.4"
|
||||
"@next/swc-linux-x64-gnu": "npm:16.3.4"
|
||||
"@next/swc-linux-x64-musl": "npm:16.3.4"
|
||||
"@next/swc-win32-arm64-msvc": "npm:16.3.4"
|
||||
"@next/swc-win32-x64-msvc": "npm:16.3.4"
|
||||
"@swc/helpers": "npm:0.5.23"
|
||||
baseline-browser-mapping: "npm:^2.9.19"
|
||||
caniuse-lite: "npm:^1.0.30001579"
|
||||
postcss: "npm:8.5.23"
|
||||
sharp: "npm:^0.35.3"
|
||||
sharp: "npm:^0.35.4"
|
||||
styled-jsx: "npm:5.1.6"
|
||||
peerDependencies:
|
||||
"@opentelemetry/api": ^1.1.0
|
||||
@@ -8880,7 +8880,7 @@ __metadata:
|
||||
optional: true
|
||||
bin:
|
||||
next: dist/bin/next
|
||||
checksum: 10c0/2c8c27085771fa522468a69ecaae9a7bc603fb1e6e6badfd9fb22b85a8085d3285e9af3d6a457012780ff2c778b983705fa71a2da5d1ba2282aa6134c4d0e2ec
|
||||
checksum: 10c0/e4f2f079159201c205ba373e34f9517d581947ed0cf67860d24a81073d8e388cb041b5fbc0d4a527e1523f234d14f1d3d17dee13f930ec29f2c23abb406d7508
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -9459,15 +9459,15 @@ __metadata:
|
||||
linkType: hard
|
||||
|
||||
"react-error-boundary@npm:^6.0.2":
|
||||
version: 6.1.3
|
||||
resolution: "react-error-boundary@npm:6.1.3"
|
||||
version: 6.1.5
|
||||
resolution: "react-error-boundary@npm:6.1.5"
|
||||
peerDependencies:
|
||||
"@types/react": ^18.0.0 || ^19.0.0
|
||||
react: ^18.0.0 || ^19.0.0
|
||||
peerDependenciesMeta:
|
||||
"@types/react":
|
||||
optional: true
|
||||
checksum: 10c0/67e75beaf264dd0193a8fcdc2a93d1c9b25a2e1a6ca1aadc09d8526e0b7380aa490a48b6aebd398fe92772fba9521bf25d1734ff4655b716fb7548a573911ccb
|
||||
checksum: 10c0/2ea1da86dd4bb71d346a0cfa2e2cc0095c9ec91882b2a9acca6f2a79a063ef1427c29d819af628ae27d41272d5b82943f737dd81cdae2d90ffd74704b377ec83
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -9780,12 +9780,12 @@ __metadata:
|
||||
linkType: hard
|
||||
|
||||
"react-native-toast-message@npm:^2.3.3":
|
||||
version: 2.4.0
|
||||
resolution: "react-native-toast-message@npm:2.4.0"
|
||||
version: 2.5.2
|
||||
resolution: "react-native-toast-message@npm:2.5.2"
|
||||
peerDependencies:
|
||||
react: "*"
|
||||
react-native: "*"
|
||||
checksum: 10c0/615167ed4de0d5456b6d4d516a564671a3801991e8d897c98e45a3ce9460541ff5aff7e3104588074be7fcaaee9de6b81e337b8e53a6a29b8098053a06238af7
|
||||
checksum: 10c0/e0f054efe16fb8f41abc937a6e6c66351fec55a11bf93c123c77534ca398c718653b6e46f9d62421c778e7611d68f91ef8fb8fb52afd72023e544b2d2294004e
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -10580,36 +10580,36 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"sharp@npm:^0.35.3":
|
||||
version: 0.35.3
|
||||
resolution: "sharp@npm:0.35.3"
|
||||
"sharp@npm:^0.35.4":
|
||||
version: 0.35.4
|
||||
resolution: "sharp@npm:0.35.4"
|
||||
dependencies:
|
||||
"@img/colour": "npm:^1.1.0"
|
||||
"@img/sharp-darwin-arm64": "npm:0.35.3"
|
||||
"@img/sharp-darwin-x64": "npm:0.35.3"
|
||||
"@img/sharp-freebsd-wasm32": "npm:0.35.3"
|
||||
"@img/sharp-libvips-darwin-arm64": "npm:1.3.2"
|
||||
"@img/sharp-libvips-darwin-x64": "npm:1.3.2"
|
||||
"@img/sharp-libvips-linux-arm": "npm:1.3.2"
|
||||
"@img/sharp-libvips-linux-arm64": "npm:1.3.2"
|
||||
"@img/sharp-libvips-linux-ppc64": "npm:1.3.2"
|
||||
"@img/sharp-libvips-linux-riscv64": "npm:1.3.2"
|
||||
"@img/sharp-libvips-linux-s390x": "npm:1.3.2"
|
||||
"@img/sharp-libvips-linux-x64": "npm:1.3.2"
|
||||
"@img/sharp-libvips-linuxmusl-arm64": "npm:1.3.2"
|
||||
"@img/sharp-libvips-linuxmusl-x64": "npm:1.3.2"
|
||||
"@img/sharp-linux-arm": "npm:0.35.3"
|
||||
"@img/sharp-linux-arm64": "npm:0.35.3"
|
||||
"@img/sharp-linux-ppc64": "npm:0.35.3"
|
||||
"@img/sharp-linux-riscv64": "npm:0.35.3"
|
||||
"@img/sharp-linux-s390x": "npm:0.35.3"
|
||||
"@img/sharp-linux-x64": "npm:0.35.3"
|
||||
"@img/sharp-linuxmusl-arm64": "npm:0.35.3"
|
||||
"@img/sharp-linuxmusl-x64": "npm:0.35.3"
|
||||
"@img/sharp-webcontainers-wasm32": "npm:0.35.3"
|
||||
"@img/sharp-win32-arm64": "npm:0.35.3"
|
||||
"@img/sharp-win32-ia32": "npm:0.35.3"
|
||||
"@img/sharp-win32-x64": "npm:0.35.3"
|
||||
"@img/sharp-darwin-arm64": "npm:0.35.4"
|
||||
"@img/sharp-darwin-x64": "npm:0.35.4"
|
||||
"@img/sharp-freebsd-wasm32": "npm:0.35.4"
|
||||
"@img/sharp-libvips-darwin-arm64": "npm:1.3.3"
|
||||
"@img/sharp-libvips-darwin-x64": "npm:1.3.3"
|
||||
"@img/sharp-libvips-linux-arm": "npm:1.3.3"
|
||||
"@img/sharp-libvips-linux-arm64": "npm:1.3.3"
|
||||
"@img/sharp-libvips-linux-ppc64": "npm:1.3.3"
|
||||
"@img/sharp-libvips-linux-riscv64": "npm:1.3.3"
|
||||
"@img/sharp-libvips-linux-s390x": "npm:1.3.3"
|
||||
"@img/sharp-libvips-linux-x64": "npm:1.3.3"
|
||||
"@img/sharp-libvips-linuxmusl-arm64": "npm:1.3.3"
|
||||
"@img/sharp-libvips-linuxmusl-x64": "npm:1.3.3"
|
||||
"@img/sharp-linux-arm": "npm:0.35.4"
|
||||
"@img/sharp-linux-arm64": "npm:0.35.4"
|
||||
"@img/sharp-linux-ppc64": "npm:0.35.4"
|
||||
"@img/sharp-linux-riscv64": "npm:0.35.4"
|
||||
"@img/sharp-linux-s390x": "npm:0.35.4"
|
||||
"@img/sharp-linux-x64": "npm:0.35.4"
|
||||
"@img/sharp-linuxmusl-arm64": "npm:0.35.4"
|
||||
"@img/sharp-linuxmusl-x64": "npm:0.35.4"
|
||||
"@img/sharp-webcontainers-wasm32": "npm:0.35.4"
|
||||
"@img/sharp-win32-arm64": "npm:0.35.4"
|
||||
"@img/sharp-win32-ia32": "npm:0.35.4"
|
||||
"@img/sharp-win32-x64": "npm:0.35.4"
|
||||
detect-libc: "npm:^2.1.2"
|
||||
semver: "npm:^7.8.5"
|
||||
dependenciesMeta:
|
||||
@@ -10666,7 +10666,7 @@ __metadata:
|
||||
peerDependenciesMeta:
|
||||
"@types/node":
|
||||
optional: true
|
||||
checksum: 10c0/d99d60fc716aacbf42fcb0eb6d129142e0912eb23310adf48bc94e6989e27c838c5b5f507b928c723c72d265f9ceea3d4b1207e8fd5929797b23005663ce1d07
|
||||
checksum: 10c0/dbcc0909200cbff98e82805c86085b94afbd45f373897a04b21e52e9bbc1671dc64970350dd3cb6b2d0970f3444be7100d728005dc6620e39b599269ed7e15eb
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -11784,7 +11784,7 @@ __metadata:
|
||||
jotai: "npm:2.20.3"
|
||||
material-ui-confirm: "npm:^4.0.0"
|
||||
mui-react-hook-form-plus: "npm:^1.5.1"
|
||||
next: "npm:16.3.3"
|
||||
next: "npm:16.3.4"
|
||||
react: "npm:19.2.3"
|
||||
react-beautiful-dnd: "npm:^13.1.1"
|
||||
react-blurhash: "npm:^0.3.0"
|
||||
|
||||
@@ -170,6 +170,9 @@ func SaveMetadata(config config.Config, m internal.Metadata, saveMethod SaveMeta
|
||||
mp.WriteField("label", m.Label)
|
||||
}
|
||||
mp.WriteField("type", string(m.Type))
|
||||
if len(m.RipSource) > 0 {
|
||||
mp.WriteField("ripSource", string(m.RipSource))
|
||||
}
|
||||
for i, genre := range m.Genres {
|
||||
mp.WriteField(fmt.Sprintf("genres[%d]", i), genre)
|
||||
}
|
||||
|
||||
@@ -69,6 +69,8 @@ type Metadata struct {
|
||||
SeriesIndex float64
|
||||
SeriesMbid string
|
||||
|
||||
RipSource RipSource
|
||||
|
||||
IllustrationLocation IllustrationLocation
|
||||
IllustrationStreamIndex int
|
||||
IllustrationPath string
|
||||
@@ -87,6 +89,18 @@ const (
|
||||
|
||||
type AlbumType string
|
||||
|
||||
type RipSource string
|
||||
|
||||
const (
|
||||
CD RipSource = "CD"
|
||||
DVD RipSource = "DVD"
|
||||
BluRay RipSource = "BluRay"
|
||||
Cassette RipSource = "Cassette"
|
||||
Vinyl RipSource = "Vinyl"
|
||||
Digital RipSource = "Digital"
|
||||
OtherRipSource RipSource = "Other"
|
||||
)
|
||||
|
||||
const (
|
||||
Studio AlbumType = "StudioRecording"
|
||||
Live AlbumType = "LiveRecording"
|
||||
|
||||
@@ -240,6 +240,9 @@ func parseMetadataFromEmbeddedTags(filePath string, c config.UserSettings) (inte
|
||||
metadata.SeriesMbid = value
|
||||
})
|
||||
|
||||
ParseTag(tags, []string{"media", "rip source"}, func(value string) {
|
||||
metadata.RipSource = parseRipSource(value)
|
||||
})
|
||||
if !c.UseEmbeddedThumbnails || metadata.Type != internal.Video {
|
||||
if streamIndex := illustration.GetEmbeddedIllustrationStreamIndex(*probeData); streamIndex >= 0 {
|
||||
metadata.IllustrationLocation = internal.Embedded
|
||||
@@ -249,6 +252,29 @@ func parseMetadataFromEmbeddedTags(filePath string, c config.UserSettings) (inte
|
||||
return metadata, errors
|
||||
}
|
||||
|
||||
func parseRipSource(s string) internal.RipSource {
|
||||
s = strings.ReplaceAll(strings.ToLower(s), "-", " ")
|
||||
if strings.Contains(s, "vinyl") {
|
||||
return internal.Vinyl
|
||||
}
|
||||
switch s {
|
||||
case "cd", "sacd", "hdcd", "cd r", "cdr", "minidisc":
|
||||
return internal.CD
|
||||
case "dvd", "vcd", "cdv", "dvd audio", "dualdisc":
|
||||
return internal.DVD
|
||||
case "bluray", "hd dvd":
|
||||
return internal.BluRay
|
||||
case "cassette", "microcassette", "k7":
|
||||
return internal.Cassette
|
||||
case "vinyl", "record":
|
||||
return internal.Vinyl
|
||||
case "digital media":
|
||||
return internal.Digital
|
||||
default:
|
||||
return internal.OtherRipSource
|
||||
}
|
||||
}
|
||||
|
||||
func parseLyrics(value string, metadata *internal.Metadata) {
|
||||
parsedLyrics := internal.ParseLyrics(value)
|
||||
switch l := parsedLyrics.(type) {
|
||||
|
||||
@@ -318,6 +318,7 @@ export default class MetadataService {
|
||||
mixed: parsedTrackName.mixed || releaseIsMixed,
|
||||
isBonus: parsedTrackName.bonus,
|
||||
isRemastered: parsedTrackName.remastered,
|
||||
ripSource: metadata.ripSource ?? null,
|
||||
discName: metadata.discName ?? null,
|
||||
discIndex: metadata.discIndex ?? null,
|
||||
trackIndex: metadata.index ?? null,
|
||||
@@ -326,7 +327,6 @@ export default class MetadataService {
|
||||
metadata.bitrate !== undefined
|
||||
? Math.floor(metadata.bitrate)
|
||||
: null,
|
||||
ripSource: null,
|
||||
duration:
|
||||
metadata.duration !== undefined
|
||||
? Math.floor(metadata.duration)
|
||||
|
||||
@@ -34,7 +34,7 @@ import {
|
||||
Min,
|
||||
MinLength,
|
||||
} from "class-validator";
|
||||
import { AlbumType, TrackType } from "src/prisma/generated/client";
|
||||
import { AlbumType, RipSource, TrackType } from "src/prisma/generated/client";
|
||||
|
||||
/**
|
||||
* Extracted metadata from a track file
|
||||
@@ -301,4 +301,9 @@ export default class Metadata {
|
||||
@IsOptional()
|
||||
@ApiPropertyOptional()
|
||||
seriesMbid?: string;
|
||||
|
||||
@ApiProperty()
|
||||
@IsEnum(RipSource)
|
||||
@IsOptional()
|
||||
ripSource?: RipSource;
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# NOTE: Partially generated using AI
|
||||
|
||||
set -uo pipefail
|
||||
|
||||
declare -A pids
|
||||
declare -A commands
|
||||
shutdown_requested=false
|
||||
|
||||
start() {
|
||||
local name="$1"
|
||||
shift
|
||||
|
||||
commands["$name"]="$*"
|
||||
|
||||
echo "Starting $name: $*"
|
||||
|
||||
"$@" &
|
||||
pids["$name"]=$!
|
||||
|
||||
echo "$name started (PID ${pids[$name]})"
|
||||
}
|
||||
|
||||
stop_all() {
|
||||
shutdown_requested=true
|
||||
|
||||
echo "Stopping processes..."
|
||||
|
||||
for name in "${!pids[@]}"; do
|
||||
pid="${pids[$name]}"
|
||||
|
||||
if kill -0 "$pid" 2>/dev/null; then
|
||||
echo "Sending SIGTERM to $name (PID $pid)"
|
||||
kill -TERM "$pid" 2>/dev/null || true
|
||||
fi
|
||||
done
|
||||
|
||||
# Give processes a chance to shut down gracefully.
|
||||
for name in "${!pids[@]}"; do
|
||||
pid="${pids[$name]}"
|
||||
wait "$pid" 2>/dev/null || true
|
||||
done
|
||||
|
||||
echo "Shutdown complete."
|
||||
exit 0
|
||||
}
|
||||
|
||||
trap stop_all SIGTERM SIGINT
|
||||
|
||||
declare -A commands
|
||||
|
||||
start psql "postgres -D $PGDATA"
|
||||
start meilisearch "meilisearch --db-path /app/meilisearch/db --dump-dir /app/meilisearch/dump --no-analytics"
|
||||
# TODO:
|
||||
# start process_b /usr/local/bin/process-b
|
||||
# start process_c /usr/local/bin/process-c
|
||||
|
||||
|
||||
while ! $shutdown_requested; do
|
||||
|
||||
wait -n "${pids[@]}" 2>/dev/null || true
|
||||
|
||||
$shutdown_requested && break
|
||||
|
||||
for name in "${!pids[@]}"; do
|
||||
pid="${pids[$name]}"
|
||||
|
||||
if ! kill -0 "$pid" 2>/dev/null; then
|
||||
echo "$name (PID $pid) exited; restarting..."
|
||||
|
||||
wait "$pid" 2>/dev/null || true
|
||||
|
||||
unset 'pids[$name]'
|
||||
|
||||
# shellcheck disable=SC2086
|
||||
start "$name" ${commands[$name]}
|
||||
|
||||
break
|
||||
fi
|
||||
done
|
||||
done
|
||||
Reference in new issue
Block a user