TV-Rename / tvrename

Organise your TV & Movie videos with ease
http://www.tvrename.com
Other
290 stars 36 forks source link

Copying to additinal folders issue. #999

Open Mario-P opened 5 months ago

Mario-P commented 5 months ago

Bug Details

Describe the bug When processing big number of files for a show that have additional folders set, the order of copy/move is broken. Files are not copied to additional folders as the source is removed (by move action) before the copy starts. Additionally sometimes even the folders are mixed up and File is moved to additional folder and only then there is a try to copy it to auto folder. It happens always when processing big number of files. I have not noticed it when processing few files.

Expected Behaviour First copy the file, only then move it.

Current Behaviour Example from the log file: 2024-02-10 19:16:47|INFO| TV Rename is about to be busy doing Do selected actions (80) since 10.02.2024 19:16:47 2024-02-10 19:16:47|INFO| ********************** 2024-02-10 19:16:47|INFO| Doing Selected Actions.... (80 items detected, 80 actions to be completed ) 2024-02-10 19:16:47|INFO| Setting up 'Move/Copy' worker, with 1 threads. 2024-02-10 19:16:47|INFO| Setting up 'Rename/Delete' worker, with 1 threads. 2024-02-10 19:16:47|INFO| Setting up 'Write Metadata' worker, with 4 threads. 2024-02-10 19:16:47|INFO| Setting up 'Download' worker, with 8 threads. 2024-02-10 19:18:29|INFO| Move completed: E:\series_to_process\Banshee.S01E01.Pilot.MULTi.1080p.HMAX.WEB-DL.H264-Mixio.mkv to Y:\Banshee (2013)\Season 1\Banshee - S01E01 - Pilot.mkv 2024-02-10 19:18:29|WARN| Error occurred while Copy: E:\series_to_process\Banshee.S01E01.Pilot.MULTi.1080p.HMAX.WEB-DL.H264-Mixio.mkv to F:\Seriale\Banshee (2013)\Season 1\Banshee - S01E01 - Pilot.mkv System.IO.FileNotFoundException: E:\series_to_process\Banshee.S01E01.Pilot.MULTi.1080p.HMAX.WEB-DL.H264-Mixio.mkv at Alphaleonis.Win32.Filesystem.Directory.ExistsDriveOrFolderOrFile(KernelTransaction transaction, String path, Boolean isFolder, Int32 lastError, Boolean throwIfDriveNotExists, Boolean throwIfFolderOrFileNotExists) at Alphaleonis.Win32.Filesystem.File.RestartCopyMoveOrThrowException(Int32 lastError, Boolean isFolder, Boolean isMove, KernelTransaction transaction, String sourcePathLp, String destinationPathLp, Nullable1 moveOptions) at Alphaleonis.Win32.Filesystem.File.CopyMoveCore(KernelTransaction transaction, Boolean driveChecked, Boolean isFolder, String sourcePath, String destinationPath, Nullable1 copyOptions, Nullable1 moveOptions, Boolean preserveDates, CopyMoveProgressRoutine progressHandler, Object userProgressData, CopyMoveResult copyMoveResult, PathFormat pathFormat) at Alphaleonis.Win32.Filesystem.File.Copy(String sourcePath, String destinationPath, CopyOptions copyOptions, Boolean preserveDates, CopyMoveProgressRoutine progressHandler, Object userProgressData) at TVRename.ActionCopyMoveRename.Go(TVRenameStats stats, CancellationToken cancellationToken) .... 2024-02-10 19:29:50|INFO| Move completed: E:\series_to_process\Banshee.S01E10.A.Mixture.of.Madness.FiNAL.MULTi.1080p.HMAX.WEB-DL.H264-Mixio.mkv to F:\Seriale\Banshee (2013)\Season 1\Banshee - S01E10 - A Mixture of Madness.mkv
2024-02-10 19:29:50|WARN| Error occurred while Copy: E:\series_to_process\Banshee.S01E10.A.Mixture.of.Madness.FiNAL.MULTi.1080p.HMAX.WEB-DL.H264-Mixio.mkv to Y:\Banshee (2013)\Season 1\Banshee - S01E10 - A Mixture of Madness.mkv System.IO.FileNotFoundException: E:\series_to_process\Banshee.S01E10.A.Mixture.of.Madness.FiNAL.MULTi.1080p.HMAX.WEB-DL.H264-Mixio.mkv at Alphaleonis.Win32.Filesystem.Directory.ExistsDriveOrFolderOrFile(KernelTransaction transaction, String path, Boolean isFolder, Int32 lastError, Boolean throwIfDriveNotExists, Boolean throwIfFolderOrFileNotExists) at Alphaleonis.Win32.Filesystem.File.RestartCopyMoveOrThrowException(Int32 lastError, Boolean isFolder, Boolean isMove, KernelTransaction transaction, String sourcePathLp, String destinationPathLp, Nullable1 moveOptions) at Alphaleonis.Win32.Filesystem.File.CopyMoveCore(KernelTransaction transaction, Boolean driveChecked, Boolean isFolder, String sourcePath, String destinationPath, Nullable1 copyOptions, Nullable1 moveOptions, Boolean preserveDates, CopyMoveProgressRoutine progressHandler, Object userProgressData, CopyMoveResult copyMoveResult, PathFormat pathFormat) at Alphaleonis.Win32.Filesystem.File.Copy(String sourcePath, String destinationPath, CopyOptions copyOptions, Boolean preserveDates, CopyMoveProgressRoutine progressHandler, Object userProgressData) at TVRename.ActionCopyMoveRename.Go(TVRenameStats stats, CancellationToken cancellationToken)

Additional context Add any other context about the problem here.

XML Files

XMLFiles.zip

Log Files

TVRename.01.log

Mario-P commented 5 months ago

I've made some more tests. It stops working correctly already with 4 items to copy/move.

Mario-P commented 5 months ago

More tests and it looks like it does not work even with only 2 items to process :(. The probability of spotting this is less when less items are to be processed.