Error (Could not move files) for ComicInfo.xml file moving

Ask questions and have them answered!
Post Reply
Zeoic
Posts: 5
Joined: Wed Sep 11, 2024 5:58 pm

Error (Could not move files) for ComicInfo.xml file moving

Post by Zeoic » Wed Sep 11, 2024 6:11 pm

I have found that when downloading a new manga series, it creates the folders and moves the final converted download to the destination just fine, but when a bookmark finds new chapters and downloads it, it generates a fresh new ComicInfo.xml but for some reach cannot move it. I imagine it would need to overwrite the existing one to do that, but is getting stuck for some reason? To be clear, only the comicinfo.xml gets stuck, the chapters actually move. Here is a snippet from the diagnostic logs when this happens, I can't really tell what is wrong from that.

Code: Select all

06:25:25 hdoujin dow [x] An error occurred while moving C:\Manga Buffer\All My Abilities Are Forbidden Spells\: System.IO.IOException: Could not complete operation on some files and directories. See the Data property of the exception for more details.
   at Microsoft.VisualBasic.FileIO.FileSystem.FxCopyOrMoveDirectory(CopyOrMove operation, String sourceDirectoryPath, String targetDirectoryPath, Boolean overwrite)
   at _QbW6UZ50Cy5TNxYl3SWQK4B5sOA.​‍‫‍‭‌‎‮‍‫‪‌‬‫​‭‮‮‬‬‍‬‌‏‮(FileSystemProxy , String , String )
   at _QbW6UZ50Cy5TNxYl3SWQK4B5sOA._v0cD93d9BhlKhy1tjEzS3P2gGQY(_0O8ReKCYBDGJj39XW6F4Qeez7Uj )
I am currently trying to write a middleware script that will send me push notifications for the events, as well as make Kavita scan its library on completion, but I am running into it resulting as an error when that ComicInfo.xml file moving gets stuck. Otherwise its been great and is pairing well with the rest api I made to add manga to the queue!

Any help would be appreciated!

User avatar
Squidy
Site Admin
Posts: 1463
Joined: Fri Mar 10, 2017 9:28 pm
Contact:

Re: Error (Could not move files) for ComicInfo.xml file moving

Post by Squidy » Thu Sep 12, 2024 3:01 am

Zeoic wrote:
Wed Sep 11, 2024 6:11 pm
I imagine it would need to overwrite the existing one to do that
Good observation, it probably has something to do with that. I'll investigate and see what I can figure out. :hmm:
Zeoic wrote:
Wed Sep 11, 2024 6:11 pm
I am running into it resulting as an error when that ComicInfo.xml file moving gets stuck. Otherwise its been great and is pairing well with the rest api I made to add manga to the queue!
Glad to hear it's been working well for the most part! Maybe I could add an event for invoking the middleware when a download fails?
I'm the admin and developer of HDoujin Downloader.

Zeoic
Posts: 5
Joined: Wed Sep 11, 2024 5:58 pm

Re: Error (Could not move files) for ComicInfo.xml file moving

Post by Zeoic » Thu Sep 12, 2024 3:17 am

If I am understanding it correctly, when there is an error, the $error variable will say what the error is, but be blank if successful. My script is mostly figuring out if it was successful or an error based on that currently.

Also from what I was able to see when the events are triggered, the middleware script that is launched doesn't actually have a parameter to say what event it was. An error/fail event along with a variable like $event would be pretty handy in this case.

User avatar
Squidy
Site Admin
Posts: 1463
Joined: Fri Mar 10, 2017 9:28 pm
Contact:

Re: Error (Could not move files) for ComicInfo.xml file moving

Post by Squidy » Thu Sep 12, 2024 5:05 am

Zeoic wrote:
Thu Sep 12, 2024 3:17 am
If I am understanding it correctly, when there is an error, the $error variable will say what the error is, but be blank if successful. My script is mostly figuring out if it was successful or an error based on that currently.
You're absolutely right, I spoke too hastily. It's been so long since I've messed with that feature myself I completely forgot about that.

The $error value gets set to the download status, so it'll be blank when a download is added to the queue, and "Completed" (or an error message) when a download is finished. This can be used to determine what the event is, but I agree it could be better to have it be more explicit.

I was able to reproduce the issue, by the way. It was as we suspected; it fails when attempting to overwrite the ComicInfo.xml file. I'll get this fixed for the next program update, which I hope to have available soon.
I'm the admin and developer of HDoujin Downloader.

Zeoic
Posts: 5
Joined: Wed Sep 11, 2024 5:58 pm

Re: Error (Could not move files) for ComicInfo.xml file moving

Post by Zeoic » Thu Sep 12, 2024 2:31 pm

That was quick! I look forward to the update

In the mean time its easy enough to just allow it to continue erroring and I can just make my script treat "Error (Could not move files)" as successful for the time being haha

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest