jellyfin/rpm-package/update-db.sh

13 lines
397 B
Bash
Raw Normal View History

#!/bin/sh
embypath=${2:-/var/lib/emby-server}
jellyfinpath=${3:-/var/lib/jellyfin}
2019-01-05 16:47:57 +00:00
db=${1:-${jellyfinpath}/data/library.db}
sqlite3 ${db} << SQL
UPDATE Chapters2
SET ImagePath=REPLACE(ImagePath, '${embypath}', '${jellyfinpath}');
UPDATE TypedBaseItems
SET Path=REPLACE(Path, '${embypath}', '${jellyfinpath}');
UPDATE TypedBaseItems
SET data=REPLACE(data, '${embypath}', '${jellyfinpath}');
SQL