This is the primary commit for PlexDBRepair that adds Mac support
to `DBRepair.sh`
Add all the PMS paths unique to Mac in `HostConfig()`.
Include code to create a `plexmediaserver.pid` file.
That concept needs more attention to guard against PMS running.
Deal with MacOS quirks in shell utils and builtins like
- sed -i
- echo -n
- pidof
- awk
- colons & forward slashes in filenames
Initial commit for PlexDBRepair to add support for Mac.
Modify `README.sh` to inlcude Mac as a supported host.
Show how to run `DBRepair.sh` from the command line as Administrator.
Import viewstate (watch history) from another database.
Viewstate import - Development complete
Developer initial testing complete.
1. Copy DB from Syno to Linux workstation
2. Setup empty PMS on Linux workstation
3. Add library section
4. Observe media all unwatched
5. import the DS418's database
6. Verify on Linux workstation -- all titles now marked played
Replaced 'echo -n' with posix printf.
Timestamp changed, Add Undo to new code
1. To increase portability, changed the ':' in timestamo to '.' (MacOS problems)
2. Completed adding WriteLog and logic to support UNDO for importing Viewstate
Change 'cut' back to awk
use printf in new code. Reapply timestamp change
Viewstate import - Improve error checking and recovery
Fix misplaced quote
1. To increase portability, changed the ':' in timestamo to '.' (MacOS problems)
2. Completed adding WriteLog and logic to support UNDO for importing Viewstate
Viewstate import - Development complete
Developer initial testing complete.
1. Copy DB from Syno to Linux workstation
2. Setup empty PMS on Linux workstation
3. Add library section
4. Observe media all unwatched
5. import the DS418's database
6. Verify on Linux workstation -- all titles now marked played
This commit fixes a `NewSuppDir` bug reported in the forum SQLite3 thread, https://forums.plex.tv/t/suggested-sqlite3-db-optimizations/794749/122
where a `sed` was missing its `echo` variable and pipe.
The code between lines 328 and 350 was cut and tested in a Bourne script on a Mac, but not the whole `DBRepair.sh` on the user's OS.
There's no real need to pull this, as it's not for extra credit :) But it get's the word out in a central location.