Constraint failed column Path is not unique

I reinstalled my server and decided to set up nzbdrone from scratch as well. Adding my existing shows was no problem and most of them scanned fine. Some shows, however, didn’t add properly. ND scans for existing files and then gives me this message in the log:
ImportApprovedEpisodes Couldn’t import episode D:\Series1\2 Broke Girls\Season 03\S03E02 And the Kickstarter [SDTV].mp4: constraint failed
column Path is not unique

I don’t know what triggered this behaviour initially. I added the shows fairly quickly, and while adding them, at some point, ND started scanning the rss feed and at that point, something got screwed up.

So now, while my shows are present on the disk, they are not properly handled in ND and show many episodes as missing. I already tried rescanning those shows several times, deleted them from the db and re-added them, also waited 24h between removing and adding back and left them in the db for 24h to wait for trash collection. Adding back episodes by renaming them and putting them in the incoming download folder does not work either, as it seems. So, how do I get my shows working again?

P.S. At this point 3 shows as the beginning of the alphabet are affected, 2 broke girls, anger management and arrested development, which again, lets me guess it has something to do with how i added them.

Tough to say what would have triggered it initially, deleting a series and then re-adding it an then shutting down drone or something internal to drone failing to process the delete properly. If the series was deleted the cleanup for these abandoned files wouldn’t run and it would cause this issue.

I have pushed a change up to the develop branch that should address this issue. If you’re able to, please switch over to the develop branch and let the cleanup run and confirm whether or not the issue is resolved.

I switched from master to develop and checked for updates and installed the latest version. This is what I see now:
http://imageshack.us/photo/my-images/689/was2.png/
It seemed to install fine, but everywhere on the bottom of the page, the version still shows 671 instead of 691 and the problem is not gone. I can still only find 15 episodes of 2 broke girls, 32 or anger management and 7 of arrested development. No matter how I treat it, it’s always the same episodes as well.

The cleanup will run as part of the daily cleanup, so it won’t be fixed until that runs. You need to reload the UI to see the version number change in the footer, which is also why the messaging hung, it lost connection to the server for too long.

I’m going to add a task to cleanup when drone starts though, its not ideal to have to wait 24 hours to test this fix.

EDIT 2.0.0.693 will run the cleanup on start, drone will update automatically.

Thanks, it is fixed now. All my episodes got scanned into the library. Thanks for the quick help. You guys are the best.

Awesome, thanks for confirming. If you don’t want to stay on the develop branch you can change it back to master, just don’t downgrade the version to the latest master release as the database was changed to resolve this issue.