2 Commits
Author SHA1 Message Date
Chuck 8fc8df3a2f Delete test 2026-03-08 01:35:58 -05:00
Chuck 4c6a4869f7 Test commit after host change
1234
2026-03-08 01:33:41 -05:00
4 changed files with 42 additions and 60 deletions
-2
View File
@@ -1,2 +0,0 @@
# If DBRepair has helped you, you're welcome to make a one-time donation.
github: ChuckPa
+29 -40
View File
@@ -2,12 +2,12 @@
######################################################################### #########################################################################
# Database Repair Utility for Plex Media Server. # # Database Repair Utility for Plex Media Server. #
# Maintainer: ChuckPa # # Maintainer: ChuckPa #
# Version: v1.16.00 # # Version: v1.15.00 #
# Date: 23-Jun-2026 # # Date: 02-Mar-2026 #
######################################################################### #########################################################################
# Version for display purposes # Version for display purposes
Version="v1.16.00" Version="v1.15.00"
# Have the databases passed integrity checks # Have the databases passed integrity checks
CheckedDB=0 CheckedDB=0
@@ -701,49 +701,38 @@ HostConfig() {
HostType="ASUSTOR" HostType="ASUSTOR"
return 0 return 0
# Apple Mac # Apple Mac
elif [ "$(uname)" = "Darwin" ] && [ -d "$HOME/Library/Application Support/Plex Media Server" ]; then elif [ -d "/Applications/Plex Media Server.app" ] && \
[ -d "$HOME/Library/Application Support/Plex Media Server" ]; then
# Determine where the application bundle is installed # Where is the software
if [ -d "/Applications/Plex Media Server.app" ]; then PLEX_SQLITE="/Applications/Plex Media Server.app/Contents/MacOS/Plex SQLite"
PkgDir="/Applications/Plex Media Server.app" AppSuppDir="$HOME/Library/Application Support"
elif [ -d "$HOME/Applications/Plex Media Server.app" ]; then DBDIR="$AppSuppDir/Plex Media Server/Plug-in Support/Databases"
PkgDir="$HOME/Applications/Plex Media Server.app" CACHEDIR="$HOME/Library/Caches/PlexMediaServer/PhotoTranscoder"
else LOGFILE="$DBDIR/DBRepair.log"
# It is a Mac, but the .app bundle cannot be found LOG_TOOL="logger"
PkgDir="" TMPDIR="/tmp"
fi SYSTMP="$TMPDIR"
# Only proceed if we successfully located PkgDir # MacOS uses pgrep and uses different stat options
if [ -n "$PkgDir" ]; then PIDOF="pgrep"
# Where is the software STATFMT="-f"
PLEX_SQLITE="${PkgDir}/Contents/MacOS/Plex SQLite" STATBYTES="%z"
AppSuppDir="$HOME/Library/Application Support" STATPERMS="%A"
DBDIR="$AppSuppDir/Plex Media Server/Plug-in Support/Databases"
CACHEDIR="$HOME/Library/Caches/PlexMediaServer/PhotoTranscoder"
LOGFILE="$DBDIR/DBRepair.log"
LOG_TOOL="logger"
TMPDIR="/tmp"
SYSTMP="$TMPDIR"
# MacOS uses pgrep and uses different stat options # Root not required on MacOS. PMS runs as username.
PIDOF="pgrep" RootRequired=0
STATFMT="-f"
STATBYTES="%z"
STATPERMS="%A"
# Root not required on MacOS. PMS runs as username. # You can set haptic to 0 for silence.
RootRequired=0 HaveStartStop=1
StartCommand=startMacPMS
StopCommand=stopMacPMS
HapticOkay=1
# You can set haptic to 0 for silence. HostType="Mac"
HaveStartStop=1 return 0
StartCommand=startMacPMS
StopCommand=stopMacPMS
HapticOkay=1
HostType="Mac"
return 0
fi
# FreeBSD 14+ # FreeBSD 14+
elif [ -e /etc/os-release ] && [ "$(cat /etc/os-release | grep FreeBSD)" != "" ]; then elif [ -e /etc/os-release ] && [ "$(cat /etc/os-release | grep FreeBSD)" != "" ]; then
+13 -11
View File
@@ -6,7 +6,6 @@
[![Download total](https://img.shields.io/github/downloads/ChuckPa/DBRepair/total.svg)](https://github.com/ChuckPa/DBRepair/releases) [![Download total](https://img.shields.io/github/downloads/ChuckPa/DBRepair/total.svg)](https://github.com/ChuckPa/DBRepair/releases)
[![master](https://img.shields.io/badge/master-stable-green.svg?maxAge=2592000)]('') [![master](https://img.shields.io/badge/master-stable-green.svg?maxAge=2592000)]('')
![Maintenance](https://img.shields.io/badge/Maintained-Yes-green.svg) ![Maintenance](https://img.shields.io/badge/Maintained-Yes-green.svg)
[![Sponsor ChuckPa](https://img.shields.io/badge/Sponsor-%E2%9D%A4-ea4aaa.svg?style=flat&logo=github)](https://github.com/sponsors/ChuckPa)
DBRepair is run from a command line (terminal or ssh/putty session) which has sufficient privilege to read/write the databases (minimum). DBRepair is run from a command line (terminal or ssh/putty session) which has sufficient privilege to read/write the databases (minimum).
@@ -15,12 +14,12 @@ If sufficient privleges exist (root), and supported by the environment, the opti
## Situations and errors commonly seen include: ## Situations and errors commonly seen include:
1. Searching is sluggish or completely broken 1. Searching is sluggish
2. Database is malformed / damaged / corrupted 2. Database is malformed / damaged / corrupted
3. Database has bloated from media addition or changes 3. Database has bloated from media addition or changes
4. Damaged indexes 4. Damaged indexes damaged
5. Importing data from other databases (watch history) 5. Importing data from other databases (watch history)
6. Cleaning up operational temp files which PMS has forgotten 6. Cleaning up operational temp files which PMS has forgotten to clean up
## Functions provided ## Functions provided
@@ -292,16 +291,19 @@ Special considerations:
4. The Logfile ('show' command) shows all actions performed WITH timestamp so you can locate 4. The Logfile ('show' command) shows all actions performed WITH timestamp so you can locate
intermediate databases if desired for special / manual recovery cases. intermediate databases if desired for special / manual recovery cases.
Attention:
The behavior of command "99" is different than command "Exit"
This is intentional.
"99" is the "Get out now, Keep all intermediate/temp files.
-- This is for when DB operations keep getting worse and you don't know what to do.
"99" is an old 'Get Smart' TV series reference where agent 99 would try to save agent 86 from harm.
Community feedback has resulted in: Community feedback has resulted in:
"98" or "Quit" - Get out now without deleting the temp databases (Usually
used only during unexpected failures)
"99" or "Exit" - Preferred way to exit and cleanup temp databases "99" or "Exit" - Preferred way to exit and cleanup temp databases
"98" or "Quit" - Get out now without deleting the temp databases (Usually used only during unexpected failures)
Notice:
If command line EOF is encountered before Exit/Quit command received,
DBRepair will quit and KEEP all temporary files.
Also please be aware the script understands interactive versus scripted mode. Also please be aware the script understands interactive versus scripted mode.
-7
View File
@@ -7,14 +7,7 @@
[![master](https://img.shields.io/badge/master-stable-green.svg?maxAge=2592000)]('') [![master](https://img.shields.io/badge/master-stable-green.svg?maxAge=2592000)]('')
![Maintenance](https://img.shields.io/badge/Maintained-Yes-green.svg) ![Maintenance](https://img.shields.io/badge/Maintained-Yes-green.svg)
# Release Info: # Release Info:
v1.16.00
1. MacOS App Dir - Older MacOS systems use /Applications. Newer MacOS systems use $HOME/Applications.
DBRepair now detects this and supports both locations.
v1.15.00 v1.15.00
1. DSM 6 Start/Stop - Change how DSM 6 start/stop feature implemented 1. DSM 6 Start/Stop - Change how DSM 6 start/stop feature implemented