mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-27 15:11:20 +01:00
14 lines
525 B
Bash
14 lines
525 B
Bash
#!/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
|