It seems the issue comes from the main discovery being interrupted and restarted multiple times.
It's likely that the parser queue doesn't get flushed, causing multiple "new" files to be scheduled for analysis, which ends up causing the unique constraint violation.
An easy fix would be to generalize the path that ignores such errors in case of removable media and apply it for non removable media as it turns out it can happen, or maybe we should flush the parser task list when interrupting a reload task?
Actually the parser queue shouldn't be the issue, we first try to insert the task in database, which should fail if a task with an identical MRL is already present. If the insertion fails, we don't schedule the task again.
The parser queue isn't the issue, when the android app asks for some entry point ban, we flush & refresh the task list, so this is definitely the issue described in #103
Another thing that would be nice to solve is that if N ban request come in a row (as is the case for the vlc-android app) it's a total waste to flush & refresh the task list N times