recently added shows… not showing

hey, guys—

so, i’ve got some episodes added
to plex (different shows, different libraries).
not only are these not showing in the
dashboard, but they’re not showing
in the season folders, either. been
happening with everything i’ve added
the last two days. can’t think of anything
i’ve done to change my set-up.

thanks, oh, ninja’s—
kv★

The only thing i would suggest is
to add a TV Show and then update the library and get the logs


add a show,
or an episode?

@killthevideostar said:
add a show,
or an episode?

If the show is already in place and correctly showing and the issue arises when you add an episode then do that - just test with adding an episode

thanks, @sa2000.

attach to thread or private message you?

[i know it’s good not to mix issues, but search seems to be broken all of a sudden, too.]

@killthevideostar said:
thanks, @sa2000.

attach to thread or private message you?

Support is through the forums - so please post here the logs and screenshots

thanks, @sa2000.

i know forums are support based,
but i assume logs contain private info.

either way, logs, attached:

@killthevideostar said:
thanks, @sa2000.

i know forums are support based,
but i assume logs contain private info.

either way, logs, attached:

The database is corrupt

Feb 08, 2017 12:01:51.623 [0x7fff76269310] ERROR - SQLITE3:0x7fff5e2df260, 11, database corruption at line 59437 of [fc49f556e4]
Feb 08, 2017 12:01:51.623 [0x7fff76269310] ERROR - SQLITE3:0x7fff5e2df260, 11, database corruption at line 59479 of [fc49f556e4]
Feb 08, 2017 12:01:51.623 [0x7fff76269310] ERROR - SQLITE3:0x7fff5e2df260, 11, statement aborts at 14: [DELETE FROM 'main'.'fts4_metadata_titles_segdir' WHERE level = ?] database disk image is malformed
Feb 08, 2017 12:01:51.623 [0x7fff76269310] ERROR - SQLITE3:0x7fff5e2df260, 11, statement aborts at 9: [insert into metadata_items (library_section_id,parent_id,metadata_type,guid,hash,media_item_count,title,title_sort,original_title,studio,rating,audience_rating,rating_count,tagline,summ
Feb 08, 2017 12:01:51.623 [0x7fff76269310] ERROR - Exception inside transaction (inside=1) (../Library/MetadataItem.cpp:869): sqlite3_statement_backend::loadOne: database disk image is malformed
Feb 08, 2017 12:01:51.623 [0x7fff76269310] ERROR - Exception inside transaction (inside=1) (../Library/Episode.cpp:187): sqlite3_statement_backend::loadOne: database disk image is malformed
Feb 08, 2017 12:01:51.623 [0x7fff76269310] ERROR - Exception inside transaction (inside=1) (../Library/MetadataItem.cpp:2682): sqlite3_statement_backend::loadOne: database disk image is malformed
Feb 08, 2017 12:01:51.623 [0x7fff76269310] ERROR - Exception assimilating media item in Colgate Comedy Hour/Season 01: sqlite3_statement_backend::loadOne: database disk image is malformed

The database file is "/Users/plex/Library/Application Support/Plex Media Server/Plug-in Support/Databases/com.plexapp.plugins.library.db"

See if it can be repaired
https://support.plex.tv/hc/en-us/articles/201100678-Repair-a-Corrupt-Database

Other option is to look for a backup to restore from, see
https://support.plex.tv/hc/en-us/articles/202485658

You should also check the disk drive for any issues

sure enough, @sa2000:

sqlite3 ~/Library/Application\ Support/Plex\ Media\ Server/Plug-in\ Support/Databases/com.plexapp.plugins.library.db "PRAGMA integrity_check"

=

*** in database main ***
Page 216027: btreeInitPage() returns error code 11
Error: database disk image is malformed

but, when i try to do

sqlite3 ~/Library/Application\ Support/Plex\ Media\ Server/Plug-in\ Support/Databases/com.plexapp.plugins.library.db .dump > dump.sql
mv ~/Library/Application\ Support/Plex\ Media\ Server/Plug-in\ Support/Databases/com.plexapp.plugins.library.db ~/Library/Application\ Support/Plex\ Media\ Server/Plug-in\ Support/Databases/com.plexapp.plugins.library.db.original
sqlite3 ~/Library/Application\ Support/Plex\ Media\ Server/Plug-in\ Support/Databases/com.plexapp.plugins.library.db < dump.sql

i get a new .db that’s 0b.

is there anything else i can do?

@killthevideostar

The important command to salvage data from the corrupt database is this one

sqlite3 ~/Library/Application\ Support/Plex\ Media\ Server/Plug-in\ Support/Databases/com.plexapp.plugins.library.db .dump > dump.sql

Could you see if there is any data in dump.sql

thanks @sa2000,

original = 221mb
dump = 192mb

does that answer
your question?

@killthevideostar said:
thanks @sa2000,

original = 221mb
dump = 192mb

does that answer
your question?

I presume you have made sure Plex Media Server is shutdown and not running when doing this?

You should be able to view the dump.sql file - it is would be a series of sql commands to recreate the database contents

Just wondering if the db file was locked when you are doing the last command to restore the dmp file into it. 192Mb ending up as 0 bytes does not sound right

Try the last command to restore to a test database file

sqlite3 ~/Library/Application\ Support/Plex\ Media\ Server/Plug-in\ Support/Databases/com.plexapp.plugins.library.test.db < dump.sql

thanks, @sa2000.

server has been shut down
since i attempted
any of this.

how would i view it?

opening 192mb in a text editor
doesn’t sound good.

will try the last command again.

hey, @sa2000,

sure enough:

221 > 192 > 0, .db or test.db.

i did open dump.sql
in a text editor. lightly
browsing, i see a lot
of recognizable stuff.

@killthevideostar said:
hey, @sa2000,

sure enough:

221 > 192 > 0, .db or test.db.

You could zip the dump file and upload on dropbox or similar service and send me link by PM and I will have a look.

If the file is not usable, then only two remaining options, are to look for a backup to restore the db from or start afresh with a new database as a new install

This is the support article for restoring from scheduled tasks backup
https://support.plex.tv/hc/en-us/articles/202485658

so i googled
“repair sqlite database” + found
found the following stackexchange:

which gave pretty much the same
plex advice on databases.

but scrolling down to user “johnrechd”

gave me two lines to delete out
of the dump. i did this manually,
but there’s a grep command in the
replies to him.

about 30 minutes later, 192 > 206.

deleted -shm + -wal.

restarted server.

i mini-plex-danced a single
episode, +sure enough, it showed up.
(although its metadata
has not showed yet).

but… is there any way to have
plex detect “new files plex media
server has not added to plex”
on all the other ones?

(also, as i’m plexpass,
i have backups from
feb 5 • 220mb (when i noticed the last successful plex added episode)
feb 2 • 218mb
jan 30 • 220mb
jan 27 • 217mb
which is awesome,
as my normal dual
backup is misconfigured+
overwrote itself).

@killthevideostar said:
so i googled
“repair sqlite database” + found
found the following stackexchange:

sqlite - How to recover a corrupt SQLite3 database? - Stack Overflow

which gave pretty much the same
plex advice on databases.

but scrolling down to user “johnrechd”

gave me two lines to delete out
of the dump. i did this manually,
but there’s a grep command in the
replies to him.

about 30 minutes later, 192 > 206.

deleted -shm + -wal.

restarted server.

i mini-plex-danced a single
episode, +sure enough, it showed up.
(although its metadata
has not showed yet).

Good news

Could you tell me which lines you edited out
Would be an idea to let me have zip of the original dump.sql file

@killthevideostar said:
but… is there any way to have
plex detect “new files plex media
server has not added to plex”
on all the other ones?

All I can suggest is trying out Library Update and Refresh Library