Renaming problem.

Chimpola

27-01-2009 22:51:35

Hi,

First of all i love your program, i was in the middle of writing something similar then found yours, its exactly what i needed! I have a problem with the renaming of my existing episodes though. I press the check button to verify my episodes, and see the progress bar in the bottom right tick upwards. Once its full i get a pause of a few seconds before an error windows appears complaining about a procedure that checks for legal filenames. Would it be possible to actually show which file is causing the problem as well as the error message? If i run a debug scan it seems to read the folder structure perfectly, and i have several thousand episodes so trawling through them is a pain trying to see if anything is wrong.

Cheers,

Nick.

sstteevvee

28-01-2009 10:37:27

Depending on how it is failing, by the time that final error window appears the information on which file/folder it was is probably long gone.

It is interesting that the Help->Bug Report scan isn't having the same problem, though.

The other way to narrow it down is to delete some of your shows. If the progress bar has gotten to the end before failing, then its possibly one of the last few shows. Try deleting the last 4 or 5 shows, then re-running the check. Just don't save the settings when you quit!

Can you copy+paste here the first 15-20 lines that come up in the error report. I'll have a quick look over the code and might be able to see the problem.

Chimpola

28-01-2009 23:23:14

The trouble is im not actually sure which shows are the last ones, before tvrename i manually renamed everything and kept them in a show\season #\episode# - name order. Tvrename seemed perfect to scan that and double check my naming on over 100 shows i'd already done. I was thinking of starting from scratch with batches of shows to see if i could narrow down what was throwing things off, I'll grab the error report tonight, hopefully it will help.

sstteevvee

29-01-2009 00:03:40

I'm fairly sure they're fetched alphabetically (its been a while since I looked at that stuff), so whatever is at the bottom of your "My Shows" list will be the last ones. The fact that there's a pause between it filling the progress bar and the crash makes it a bit of a long shot, though. I suspect its due to something in the displaying of the items needing renaming. The crash report should help narrow this down, though.

Chimpola

30-01-2009 09:08:12

I finally got around to trying again, this is the exception part of the error :

System.ArgumentException: Illegal characters in path.
at System.IO.Path.CheckInvalidPathChars(String path)
at System.IO.Path.NormalizePathFast(String path, Boolean fullCheck)
at System.IO.Path.GetFullPathInternal(String path)
at System.IO.FileInfo..ctor(String fileName)
at TVRename.TVDoc.KeepTogether(List`1 rcl)
at TVRename.TVDoc.DoRenameCheck(ProgressBar pbProgress)
at TVRename.UI.bnRenameCheck_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

I figured out the problem though, i have a series called DNAČ (squared symbol), once i unticked the renaming for that series everything worked perfectly. Thought you may want to know incase something similar comes up.

sstteevvee

30-01-2009 11:18:50

Thanks.. That definitely helps. There's a routine that runs after doing the renaming or finding&orgnising checks that looks for associated files, like .sub and .srt files. The problem was happening in there.

For a temporary workaround, you could try turning off the option in the preferences called "Copy/Move files with same base name."

Unchecking "DNAČ" to make it work suggests that the squared symbol is the problem, though I thought it would be a valid filename character. I'll have a look into it.

Chimpola

03-02-2009 00:20:15

Just a quick update, i renamed a lot of episodes yesterday, and one of those (star trek) was renamed to QČ. It renamed with no errors and in renaming runs afterwards it hasn't triggered the exception error, so it maybe the error only triggers on folder names.

sstteevvee

15-02-2009 15:32:43

Hi.. I'm looking into this bug now, but can't get it to do it here.

I've set up the folder "c:\temp\tvrenametest\DNAČ", and successfully done missing, renaming, and finding&organising (including moving a .srt file) to it.

Can you check to see if it still happens for you? If so, can you go to Help->Bug Report, turn on "Settings files" and "Folder scan", hit "Create", and email the output to me at "tvrename [at] tvrename.com". If doing that causes a crash, turn on just "Settings files". Thanks!

Chimpola

15-02-2009 22:44:47

Ive done the folder scan, everything looks perfect. Ive renamed all the episodes for DNA incase there was a weird filename error with the original names, the folder scan gives me this.

80407 : DNAČ : S1
Folder: t:\series\DnaČ\Season 1
t:\series\DnaČ\Season 1\06 - 6.avi (OK 1,6 .avi)
t:\series\DnaČ\Season 1\01 - 1.avi (OK 1,1 .avi)
t:\series\DnaČ\Season 1\15 - 15.avi (OK 1,15 .avi)
t:\series\DnaČ\Season 1\03 - 3.avi (OK 1,3 .avi)
t:\series\DnaČ\Season 1\05 - 5.avi (OK 1,5 .avi)
t:\series\DnaČ\Season 1\12 - 12.avi (OK 1,12 .avi)
t:\series\DnaČ\Season 1\11 - 11.avi (OK 1,11 .avi)
t:\series\DnaČ\Season 1\08 - 8.avi (OK 1,8 .avi)
t:\series\DnaČ\Season 1\07 - 7.avi (OK 1,7 .avi)
t:\series\DnaČ\Season 1\09 - 9.avi (OK 1,9 .avi)
t:\series\DnaČ\Season 1\10 - 10.avi (OK 1,10 .avi)
t:\series\DnaČ\Season 1\04 - 4.avi (OK 1,4 .avi)
t:\series\DnaČ\Season 1\02 - 2.avi (OK 1,2 .avi)
t:\series\DnaČ\Season 1\14 - 14.avi (OK 1,14 .avi)
t:\series\DnaČ\Season 1\13 - 13.avi (OK 1,13 .avi)

It looks fine to me, this is with the latest alpha too. Ive turned off renaming for this show and renaming works again now.

sstteevvee

01-03-2009 18:07:14

That definitely looks ok, and I've given it another go here without any problems.

Just to check we're both talking about the same thing, I've got a folder with files (.avi and .srt) named as per your previous post. I've added the show to My Shows, and done a Rename check. That works fine, then when I tell it to go ahead and rename, the files are renamed in the folder as expected.


(note: 05 -5.srt not renamed since its name didn't exactly match the .avi)

Which version of TVRename are you using? Am I understanding what you're trying to do correctly? Is it definitely still not working for you?

Chimpola

01-03-2009 21:54:34

Its working perfectly now! Using alpha 4, i forced a refresh on the series and switched renaming back on, and it worked first time. Perhaps it was a problem with some weird characters in one of the episode names on tvdb?

sstteevvee

01-03-2009 23:34:41

Ah, excellent. Maybe it was some weird characters. If it happens again, let me know and I'll look into it further.