ShokoAnime / ShokoServer

Repository for Shoko Server.
https://shokoanime.com/
MIT License
413 stars 74 forks source link

Collection import error - UNIQUE constraint failed: AniDB_File #840

Closed jmediamanager closed 1 year ago

jmediamanager commented 4 years ago

## VERSION INFORMATION

Shoko Server Version: v4.0.1.0 Operating System: Windows 8 / 2012 Server 64-bit MediaInfo 20.3.0.0 (C:\Program Files (x86)\Shoko\Shoko Server\MediaInfo\MediaInfo.exe) RHash 0.0.0.0 (C:\Program Files (x86)\Shoko\Shoko Server\x64\librhash.dll)

LOG FILE

2020-09-09.log 2020-09-09.01.log

DESCRIPTION

Error 1

[2020-09-09 08:24:14:589] Error|BackgroundWorker.WorkerThreadStart => CommandProcessorGeneral.WorkerCommands_DoWork => CommandRequest_ProcessFile.ProcessCommand Error processing CommandRequest_ProcessFile: 5695 - NHibernate.Exceptions.GenericADOException: could not insert: [Shoko.Server.Models.SVR_AniDB_File][SQL: INSERT INTO AniDB_File (Anime_GroupName, Anime_GroupNameShort, AnimeID, CRC, DateTimeUpdated, Episode_Rating, Episode_Votes, File_AudioCodec, File_Description, File_FileExtension, File_LengthSeconds, File_ReleaseDate, File_Source, File_VideoCodec, File_VideoResolution, FileID, FileName, FileSize, FileVersion, IsCensored, IsDeprecated, IsChaptered, InternalVersion, GroupID, Hash, IsWatched, MD5, SHA1, WatchedDate) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); select last_insert_rowid()]
 ---> code = Constraint (19), message = System.Data.SQLite.SQLiteException (0x800027AF): constraint failed
UNIQUE constraint failed: AniDB_File.FileID

Error 2

[2020-09-09 08:31:55:964] Error|BackgroundWorker.OnDoWork => CommandProcessorGeneral.WorkerCommands_DoWork => CommandRequest_GetAnimeHTTP.ProcessCommand Error processing CommandRequest_GetAnimeHTTP: 3395 - NHibernate.Exceptions.GenericADOException: could not insert: [Shoko.Models.Server.CrossRef_AniDB_MAL][SQL: INSERT INTO "CrossRef_AniDB_MAL" (AnimeID, CrossRefSource, MALID, MALTitle, StartEpisodeType, StartEpisodeNumber) VALUES (?, ?, ?, ?, ?, ?); select last_insert_rowid()]
 ---> code = Constraint (19), message = System.Data.SQLite.SQLiteException (0x800027AF): constraint failed
UNIQUE constraint failed: CrossRef_AniDB_MAL.MALID

STEPS TO REPRODUCE

Just started with a completely new database and importing my collection

Cazzar commented 3 years ago

@da3dsoul @jmediamanager is this fixed?

revam commented 1 year ago

Closing, since i don't think this occurs anymore. The server starts just fine for me with a new database file.