Closed andreaalloway closed 2 years ago
Interesting, that's a line checking if a library root directory is available. In both my actual and my test DB, the column is always 0 or 1 (true or false). If you're getting a cast error, then your column is something else.
Could you run this sql command on your plex DB and tell me the output?
SELECT available FROM section_locations where available is null or (available != true and available != false);
Looks like I had a Photo library pointed to a dead location
sqlite> SELECT available FROM section_locations where available is null or (available != true and available != false);
<Returned blank line>
Querying the whole table revealed a Photo library that was pointing to a dead location
sqlite> SELECT * from section_locations;
8|5|/disk2/home/pictures||2022-04-16 13:38:37|2017-05-22 22:48:33|2022-08-07 04:24:44
18|1|/data/movies_1|1|2022-08-07 04:24:15|2022-04-16 20:58:03|2022-08-07 04:24:15
19|1|/data/movies_2|1|2022-08-07 04:24:16|2022-04-16 20:58:03|2022-08-07 04:24:16
20|6|/data/movies_3d|1|2022-08-07 04:24:26|2022-04-16 20:59:20|2022-08-07 04:24:26
21|7|/data/movies_4K|1|2022-08-07 04:24:35|2022-04-16 20:59:45|2022-08-07 04:24:35
22|2|/data/tv_1|1|2022-08-07 04:24:53|2022-04-16 21:01:22|2022-08-07 04:24:53
23|2|/data/tv_2|1|2022-08-07 04:24:58|2022-04-16 21:01:22|2022-08-07 04:24:58
24|8|/data/tv_3d|1|2022-08-07 04:25:08|2022-04-16 21:01:37|2022-08-07 04:25:08
25|9|/data/tv_4k|1|2022-08-07 04:25:17|2022-04-16 21:01:52|2022-08-07 04:25:17
Removing the dead library has fixed the issue
Looks like the value the available column was set to was a blank string. I'll put some thought into how to deal with that now that I know it's a possibility
I ran the script for the first time against my plex server and I'm encountering this error:
I'm running the docker image for plex-credits-detect and the plex docker image plexinc/pms-docker Disks are mounted to the Docker images for Plex and plex-credits-detect as: (Using docker-compose)
The Plex media libraries are named: Movies Movies 3D Movies 4K TV Shows TV Shows 3D TV Shows 4K
My [directories] section is set to the following. Note that the Docker Image for Plex and plex-credits-detect are using the same directory structure
I've attempted to repair the Plex DB using the instructions at https://support.plex.tv/articles/repair-a-corrupted-database/ No database corruption was detected in the process, I've performed all the steps outlined except the "Low-level database recovery" since I was not seeing an issue.
Plex is also setup with the plex-meta-manager docker image from linuxserver/plex-meta-manager, which may affect the DB structure.