diff --git a/Jellyfin_Fix_and_Scan.sh b/Jellyfin_Fix_and_Scan.sh index 7146347..127b010 100644 --- a/Jellyfin_Fix_and_Scan.sh +++ b/Jellyfin_Fix_and_Scan.sh @@ -16,7 +16,9 @@ if [ -n "$error_found_1" ] || [ -n "$error_found_2" ]; then echo "Error found in journal, deleting database file..." rm -f /var/lib/jellyfin/data/library.db # Optionally, replace with a backup and set correct permissions here. - echo "Database file deleted." + cp "/path/to/backups/Jellyfin/library.db" "/var/lib/jellyfin/data/library.db" + /usr/bin/chown jellyfin:jellyfin "/var/lib/jellyfin/data/library.db" + echo "Database file replaced with backup." # Trigger library scan echo "Triggering library scan..." @@ -32,4 +34,4 @@ if [ -n "$error_found_1" ] || [ -n "$error_found_2" ]; then else echo "No error found in journal." fi -exit 0 \ No newline at end of file +exit 0