Moved show on server throws duplicate key error
See original GitHub issueHi im also seeing some sync errors.
Im on EmbyStat version: 0.2.0-beta.13
Its probably my own doing i moves some shows to a different folder.
2019-11-13 18:16:55.6020 [ERROR] Error while running job LiteDB.LiteException: Cannot insert duplicate key in unique index ‘_id’. The duplicate value is ‘145990’.
at LiteDB.IndexService.AddNode(CollectionIndex index, BsonValue key, Byte level, IndexNode last)
at LiteDB.IndexService.AddNode(CollectionIndex index, BsonValue key, IndexNode last)
at LiteDB.LiteEngine.InsertDocument(CollectionPage col, BsonDocument doc, BsonType autoId)
at LiteDB.LiteEngine.<>c__DisplayClass22_0.<Insert>b__0(CollectionPage col)
at LiteDB.LiteEngine.Transaction[T](String collection, Boolean addIfNotExists, Func2 action) at LiteDB.LiteEngine.InsertBulk(String collection, IEnumerable1 docs, Int32 batchSize, BsonType autoId)
at LiteDB.LiteCollection1.InsertBulk(IEnumerable1 docs, Int32 batchSize)
at EmbyStat.Repositories.ShowRepository.<>c__DisplayClass5_0.<UpsertShow>b__0() in d:\a\1\s\EmbyStat.Repositories\ShowRepository.cs:line 90
at EmbyStat.Repositories.BaseRepository.ExecuteQuery(Action query) in d:\a\1\s\EmbyStat.Repositories\BaseRepository.cs:line 29
at EmbyStat.Jobs.Jobs.Sync.MediaSyncJob.PerformShowSyncAsync(IReadOnlyList1 showsThatNeedAnUpdate, Library library, DateTime updateStartTime) in d:\a\1\s\EmbyStat.Jobs\Jobs\Sync\MediaSyncJob.cs:line 267 at EmbyStat.Jobs.Jobs.Sync.MediaSyncJob.ProcessShowsAsync(IEnumerable1 libraries, CancellationToken cancellationToken) in d:\a\1\s\EmbyStat.Jobs\Jobs\Sync\MediaSyncJob.cs:line 204
at EmbyStat.Jobs.Jobs.Sync.MediaSyncJob.RunJobAsync() in d:\a\1\s\EmbyStat.Jobs\Jobs\Sync\MediaSyncJob.cs:line 85
at EmbyStat.Jobs.BaseJob.Execute() in d:\a\1\s\EmbyStat.Jobs\BaseJob.cs:line 54
_Originally posted by @jaycedk in https://github.com/mregni/EmbyStat/issues/978#issuecomment-553506021_
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (4 by maintainers)

Top Related StackOverflow Question
You can close this 😃 Your hard work fixed the issue 😃
Thanks for the update!