NZB deleting filename when moving files

Recently I have been having problems with NZBDrone deleting a files name when it is moving it. This is not on all files, but quite a few. For instance a file will be in the watch folder as blabla.s01e01.dvdrip.dimension and when it shows up in the correct folder it will only be listed as .avi

This also causes Drone to not import the following episodes as it is also trying to rename them to .avi. I have in my settings that Drone is not to rename titles at all. I recently changed to Torrents branch, but I can’t remember if I had this happen before I changed.

The following is the relevant log entries, as far as I can tell:

System.Data.SQLite.SQLiteException (0x80004005): constraint failed
NOT NULL constraint failed: History.SourceTitle
at System.Data.SQLite.SQLite3.Reset(SQLiteStatement stmt)
at System.Data.SQLite.SQLite3.Step(SQLiteStatement stmt)
at System.Data.SQLite.SQLiteDataReader.NextResult()
at System.Data.SQLite.SQLiteDataReader…ctor(SQLiteCommand cmd, CommandBehavior behave)
at System.Data.SQLite.SQLiteCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.SQLite.SQLiteCommand.ExecuteScalar()
at Marr.Data.QGen.InsertQueryBuilder1.Execute() in m:\BuildAgent2\work\328d72309b633a8\src\Marr.Data\QGen\InsertQueryBuilder.cs:line 138 at Marr.Data.DataMapper.Insert[T](T entity) in m:\BuildAgent2\work\328d72309b633a8\src\Marr.Data\DataMapper.cs:line 728 at NzbDrone.Core.Datastore.BasicRepository1.Insert(TModel model) in m:\BuildAgent2\work\328d72309b633a8\src\NzbDrone.Core\Datastore\BasicRepository.cs:line 113
at NzbDrone.Core.History.HistoryService.Handle(EpisodeImportedEvent message) in m:\BuildAgent2\work\328d72309b633a8\src\NzbDrone.Core\History\HistoryService.cs:line 182
at NzbDrone.Core.Messaging.Events.EventAggregator.PublishEvent[TEvent](TEvent event) in m:\BuildAgent2\work\328d72309b633a8\src\NzbDrone.Core\Messaging\Events\EventAggregator.cs:line 56

14-9-17 16:01:09.0|Warn|ImportApprovedEpisodes|Couldn’t import episode D:\Downloads\NZBDrone\Temp Downloads\Frontline.1994.s01e02.The.Desert.Angel.dvdrip.xvid.avi

System.IO.IOException: The file exists.

at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.__Error.WinIOError()
at System.IO.File.InternalMove(String sourceFileName, String destFileName, Boolean checkHost)
at NzbDrone.Common.Disk.DiskProviderBase.TransferFile(String source, String destination, TransferMode mode, Boolean overwrite) in m:\BuildAgent2\work\328d72309b633a8\src\NzbDrone.Common\Disk\DiskProviderBase.cs:line 273
at NzbDrone.Core.MediaFiles.EpisodeFileMovingService.TransferFile(EpisodeFile episodeFile, Series series, List1 episodes, String destinationFilename, TransferMode mode) in m:\BuildAgent2\work\328d72309b633a8\src\NzbDrone.Core\MediaFiles\EpisodeFileMovingService.cs:line 126 at NzbDrone.Core.MediaFiles.EpisodeFileMovingService.MoveEpisodeFile(EpisodeFile episodeFile, LocalEpisode localEpisode) in m:\BuildAgent2\work\328d72309b633a8\src\NzbDrone.Core\MediaFiles\EpisodeFileMovingService.cs:line 64 at NzbDrone.Core.MediaFiles.UpgradeMediaFileService.UpgradeEpisodeFile(EpisodeFile episodeFile, LocalEpisode localEpisode, Boolean copyOnly) in m:\BuildAgent2\work\328d72309b633a8\src\NzbDrone.Core\MediaFiles\UpgradeMediaFileService.cs:line 65 at NzbDrone.Core.MediaFiles.EpisodeImport.ImportApprovedEpisodes.Import(List1 decisions, Boolean newDownload, DownloadClientItem downloadClientItem) in m:\BuildAgent2\work\328d72309b633a8\src\NzbDrone.Core\MediaFiles\EpisodeImport\ImportApprovedEpisodes.cs:line 89

@markus101 discovered this just a couple of days ago.

It was introduced in develop-branch a couple of versions ago maybe 1-2 weeks.
I’m sure he’ll try to fix it soon.

Actually it is fixed in develop, I just forgot to move the card (moved now). It won’t be fixed in torrents until its rebased off develop again.

You can resolve the issue by setting drone to rename files, instead of using the release name. Using CDH should also reduce/eliminate this issue as it will use the release’s name, instead of the often vastly different file name.

OK, thanks. Went back to develop branch, hopefully that fixes it. I wasn’t really using the torrent function anyway (at least not yet), just wanted to see how it works.