Jump to content

Database issue? Some shows stopped appearing in library


Darius

Recommended Posts

Darius

Hi folks so this just happened to me recently, I used to have one of my anime libraries with its shows all fine and dandy, but suddenly when I added a new folder after the auto-scan, most of these shows stopped appearing... I tried a restart and a re-scan but to no avail. Mind you the files still appear and play fine from the file manager.

Basically in that library I should have 60 shows but only see 21.

This issue seems to affect only the library where I added the new folder and only one of that library's folders. The other folders on that drive that are in other unrelated libraries work well. Log seems to indicate some paths removed from the library as well as database errors but since I am not an expert I will refrain from making any assumptions.

Regardless I just hope at this point I can find a solution that won't require too much grind as in starting over with some customized entries etc. Should not happen since I was using the option to save the nfos. I also hope that if there is a software related issue that it will be looked into. Thanks again.

 

embyserver-63846678626.txt hardware_detection-63846678654.txt embyserver.txt

Link to comment
Share on other sites

Darius

I ended up re-adding the folder and  ouff despite all the nfos being there most of them with lockdata set to true now I have to sit through a looooong re-scan when all I wanted was to binge watch some anime 😥

Link to comment
Share on other sites

Darius

to add insult to injury some of the series where I had locked the data in the nfo because I had a custom version was not retained and now I have to do this work all over again...

Link to comment
Share on other sites

HI there, can you please provide a specific example? Thanks.

Link to comment
Share on other sites

Darius
Posted (edited)
19 minutes ago, Luke said:

HI there, can you please provide a specific example? Thanks.

 

Hi, I feel like I provided an example in my post, I also provided logs. Assuming there is still some confusion I am going to reformulate in a more summarized fashion:

I added a tv show to one of my library folders -> auto-scan starts -> something happens with emby (that's the part where I need you) -> whole folder where I added the show disappears from database

Only way to fix that was to move said folder elsewhere scan -> re-add it -> scan again. In the process I lost some customized metadata that I had locked as well. Rest is in the logs.

What bothered me the most is the fact that I did not try anything funky besides adding a tv show folder to my library.

In order to help sort through the log if you want to take a look, that problem happened to me at 4 in the morning.

Edited by Darius
Link to comment
Share on other sites

Happy2Play

Have no idea what happened but looks like the db may be foobar.

Lot of  Constraint: FOREIGN KEY constraint failed

2024-03-22 04:24:39.311 Error SqliteItemRepository: Error saving items
	*** Error Report ***
	Version: 4.8.3.0
	Command line: C:\Users\S\AppData\Roaming\Emby-Server\system\EmbyServer.dll -noautorunwebapp
	Operating system: Microsoft Windows 10.0.19045
	Framework: .NET 6.0.27
	OS/Process: x64/x64
	Runtime: C:/Users/S/AppData/Roaming/Emby-Server/system/System.Private.CoreLib.dll
	Processor count: 4
	Data path: C:\Users\S\AppData\Roaming\Emby-Server\programdata
	Application path: C:\Users\S\AppData\Roaming\Emby-Server\system
	SQLitePCL.pretty.SQLiteException: Constraint: FOREIGN KEY constraint failed
	SQLitePCL.pretty.SQLiteException: Exception of type 'SQLitePCL.pretty.SQLiteException' was thrown.
	   at SQLitePCL.pretty.SQLiteException.CheckOk(sqlite3 db, Int32 rc)
	   at SQLitePCL.pretty.StatementImpl.MoveNext()
	   at SQLitePCL.pretty.DatabaseConnection.Execute(IDatabaseConnection This, String sql)
	   at Emby.Server.Implementations.Data.SqliteItemRepository.SaveItemsInTranscation(IDatabaseConnection db, List`1 tuples, MetadataRefreshOptions metadataRefreshOptions)
	   at Emby.Server.Implementations.Data.SqliteItemRepository.SaveItems(List`1 items, MetadataRefreshOptions metadataRefreshOptions, Action`1 afterSave, Boolean disableForeignKeys, CancellationToken cancellationToken)
	Source: SQLitePCL.pretty
	TargetSite: Void CheckOk(SQLitePCLEx.sqlite3, Int32)

 

Link to comment
Share on other sites

Darius
Posted (edited)
7 minutes ago, Happy2Play said:

Have no idea what happened but looks like the db may be foobar.

Lot of  Constraint: FOREIGN KEY constraint failed

2024-03-22 04:24:39.311 Error SqliteItemRepository: Error saving items
	*** Error Report ***
	Version: 4.8.3.0
	Command line: C:\Users\S\AppData\Roaming\Emby-Server\system\EmbyServer.dll -noautorunwebapp
	Operating system: Microsoft Windows 10.0.19045
	Framework: .NET 6.0.27
	OS/Process: x64/x64
	Runtime: C:/Users/S/AppData/Roaming/Emby-Server/system/System.Private.CoreLib.dll
	Processor count: 4
	Data path: C:\Users\S\AppData\Roaming\Emby-Server\programdata
	Application path: C:\Users\S\AppData\Roaming\Emby-Server\system
	SQLitePCL.pretty.SQLiteException: Constraint: FOREIGN KEY constraint failed
	SQLitePCL.pretty.SQLiteException: Exception of type 'SQLitePCL.pretty.SQLiteException' was thrown.
	   at SQLitePCL.pretty.SQLiteException.CheckOk(sqlite3 db, Int32 rc)
	   at SQLitePCL.pretty.StatementImpl.MoveNext()
	   at SQLitePCL.pretty.DatabaseConnection.Execute(IDatabaseConnection This, String sql)
	   at Emby.Server.Implementations.Data.SqliteItemRepository.SaveItemsInTranscation(IDatabaseConnection db, List`1 tuples, MetadataRefreshOptions metadataRefreshOptions)
	   at Emby.Server.Implementations.Data.SqliteItemRepository.SaveItems(List`1 items, MetadataRefreshOptions metadataRefreshOptions, Action`1 afterSave, Boolean disableForeignKeys, CancellationToken cancellationToken)
	Source: SQLitePCL.pretty
	TargetSite: Void CheckOk(SQLitePCLEx.sqlite3, Int32)

 

Thank you dear contributor for at least pointing towards a direction. I wish someone else was not so trigger happy on the auto-replies 😅

Edited by Darius
Link to comment
Share on other sites

  • 2 weeks later...

@Dariusapologies for the disruption, but you may want to consider starting with a fresh database:

Corrupt Database

Please let us know if this helps. Thanks.

Link to comment
Share on other sites

  • 4 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...