Update and rename 80-database_clean.sh to 99-database_clean.sh

This commit is contained in:
Alexandre
2022-12-17 21:22:28 +01:00
committed by GitHub
parent f04946ab57
commit 818bfd29c7
2 changed files with 13 additions and 13 deletions

View File

@@ -1,13 +0,0 @@
#!/usr/bin/with-contenv bashio
# shellcheck shell=bash
LOCATION=$(bashio::config 'data_location')
if [[ "$LOCATION" = "null" || -z "$LOCATION" ]]; then LOCATION=/config/addons_config/${HOSTNAME#*-}; fi
#Set variable
db="$LOCATION"/data/data/library.db
#Modify base
if [ -f $db ]; then
sqlite3 -quote ${db} "UPDATE 'TypedBaseItems' SET data = replace( data, '/config/jellyfin/', "$LOCATION" ), path = replace( path, '/config/jellyfin/', "$LOCATION" ) WHERE type='MediaBrowser.Controller.Entities.CollectionFolder';"
fi

View File

@@ -0,0 +1,13 @@
#!/usr/bin/with-contenv bashio
# shellcheck shell=bash
#LOCATION=$(bashio::config 'data_location')
#if [[ "$LOCATION" = "null" || -z "$LOCATION" ]]; then LOCATION=/config/addons_config/${HOSTNAME#*-}; fi
#Set variable
db=/config/jellyfin/data/data/library.db
#Modify base
if [ -f $db ]; then
sqlite3 -quote ${db} "UPDATE 'TypedBaseItems' SET data = replace( data, '/config/jellyfin/', '%%LOCATION%%' ), path = replace( path, '/config/jellyfin/', '%%LOCATION%%' ) WHERE type='MediaBrowser.Controller.Entities.CollectionFolder';"
fi