mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-01 05:14:04 +02:00
Dynamic data folder
This commit is contained in:
@@ -1,9 +1,12 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
LOCATION=$(bashio::config 'data_location')
|
||||||
|
if [[ "$LOCATION" = "null" || -z "$LOCATION" ]]; then LOCATION=/config/addons_config/${HOSTNAME#*-}; fi
|
||||||
|
|
||||||
#Set variable
|
#Set variable
|
||||||
db=/config/addons_config/jellyfin/data/data/library.db
|
db="$LOCATION"/data/data/library.db
|
||||||
|
|
||||||
#Modify base
|
#Modify base
|
||||||
if [ -f $db ]; then
|
if [ -f $db ]; then
|
||||||
sqlite3 -quote ${db} "UPDATE 'TypedBaseItems' SET data = replace( data, '/config/jellyfin/', '/config/addons_config/jellyfin/' ), path = replace( path, '/config/jellyfin/', '/config/addons_config/jellyfin/' ) WHERE type='MediaBrowser.Controller.Entities.CollectionFolder';"
|
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
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user