From e6b1acfb449012fea2af57576332910154778a14 Mon Sep 17 00:00:00 2001 From: advplyr Date: Sat, 6 Jul 2024 16:00:48 -0500 Subject: [PATCH] Remove tone scripts & references, rename tone-object endpoint, remove node-tone dependency, remove TONE_PATH env --- .devcontainer/Dockerfile | 3 - Dockerfile | 2 - build/debian/DEBIAN/preinst | 16 +- client/pages/audiobook/_id/manage.vue | 24 ++- package-lock.json | 6 - package.json | 1 - readme.md | 2 +- server/controllers/LibraryItemController.js | 6 +- server/managers/AudioMetadataManager.js | 2 +- server/objects/metadata/AudioMetaTags.js | 26 +-- server/routers/ApiRouter.js | 2 +- server/scanner/MediaProbeData.js | 12 +- server/utils/toneHelpers.js | 113 ------------- server/utils/toneProber.js | 173 -------------------- 14 files changed, 34 insertions(+), 354 deletions(-) delete mode 100644 server/utils/toneHelpers.js delete mode 100644 server/utils/toneProber.js diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index ddd7c5f3..16ae302c 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -10,6 +10,3 @@ RUN apt-get update && \ DEBIAN_FRONTEND=noninteractive apt-get -y install --no-install-recommends \ curl tzdata ffmpeg && \ rm -rf /var/lib/apt/lists/* - -# Move tone executable to appropriate directory -COPY --from=sandreas/tone:v0.1.5 /usr/local/bin/tone /usr/local/bin/ diff --git a/Dockerfile b/Dockerfile index 97bb4732..fe68b304 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,6 @@ RUN npm ci && npm cache clean --force RUN npm run generate ### STAGE 1: Build server ### -FROM sandreas/tone:v0.1.5 AS tone FROM node:20-alpine ENV NODE_ENV=production @@ -21,7 +20,6 @@ RUN apk update && \ g++ \ tini -COPY --from=tone /usr/local/bin/tone /usr/local/bin/ COPY --from=build /client/dist /client/dist COPY index.js package* / COPY server server diff --git a/build/debian/DEBIAN/preinst b/build/debian/DEBIAN/preinst index f43f2683..c4692ed3 100644 --- a/build/debian/DEBIAN/preinst +++ b/build/debian/DEBIAN/preinst @@ -50,7 +50,6 @@ install_ffmpeg() { echo "Starting FFMPEG Install" WGET="wget https://johnvansickle.com/ffmpeg/builds/ffmpeg-git-amd64-static.tar.xz --output-document=ffmpeg-git-amd64-static.tar.xz" - WGET_TONE="wget https://github.com/sandreas/tone/releases/download/v0.1.5/tone-0.1.5-linux-x64.tar.gz --output-document=tone-0.1.5-linux-x64.tar.gz" if ! cd "$FFMPEG_INSTALL_DIR"; then echo "Creating ffmpeg install dir at $FFMPEG_INSTALL_DIR" @@ -63,13 +62,7 @@ install_ffmpeg() { tar xvf ffmpeg-git-amd64-static.tar.xz --strip-components=1 --no-same-owner rm ffmpeg-git-amd64-static.tar.xz - # Temp downloading tone library to the ffmpeg dir - echo "Getting tone.." - $WGET_TONE - tar xvf tone-0.1.5-linux-x64.tar.gz --strip-components=1 --no-same-owner - rm tone-0.1.5-linux-x64.tar.gz - - echo "Good to go on Ffmpeg (& tone)... hopefully" + echo "Good to go on Ffmpeg... hopefully" } setup_config() { @@ -77,12 +70,6 @@ setup_config() { echo "Existing config found." cat $CONFIG_PATH - # TONE_PATH variable added in 2.1.6, if it doesnt exist then add it - if ! grep -q "TONE_PATH" "$CONFIG_PATH"; then - echo "Adding TONE_PATH to existing config" - echo "TONE_PATH=$FFMPEG_INSTALL_DIR/tone" >> "$CONFIG_PATH" - fi - else if [ ! -d "$DEFAULT_DATA_DIR" ]; then @@ -98,7 +85,6 @@ setup_config() { CONFIG_PATH=$DEFAULT_DATA_DIR/config FFMPEG_PATH=$FFMPEG_INSTALL_DIR/ffmpeg FFPROBE_PATH=$FFMPEG_INSTALL_DIR/ffprobe -TONE_PATH=$FFMPEG_INSTALL_DIR/tone PORT=$DEFAULT_PORT HOST=$DEFAULT_HOST" diff --git a/client/pages/audiobook/_id/manage.vue b/client/pages/audiobook/_id/manage.vue index 03c214b4..8863fd5b 100644 --- a/client/pages/audiobook/_id/manage.vue +++ b/client/pages/audiobook/_id/manage.vue @@ -11,10 +11,9 @@ -
+
-

{{ $strings.HeaderMetadataToEmbed }}

-

audiobookshelf uses tone to write metadata.

+

{{ $strings.HeaderMetadataToEmbed }}

@@ -26,7 +25,7 @@
{{ $strings.LabelValue }}
-