Page 1 of 1

Change in "Replace Illegal Characters in Folder Names"

Posted: July 2nd, 2011, 6:53 pm
by syth
It used to be that the : character was replaced with a - in downloads, but recently it has been replaced with a ; instead.

This means I have lots of folders where files are in two different folders, one named with a - and one with a ;

Being a programmer, I don't like seeing ;'s in filenames, and I want my fodler to match the pattern "name- subname/name- subname.S01E01 - Title.avi" that I've been using for years, but I don't see a way to customize this; the sabnzbd.ini file simply has a binary replace_illegals = [0|1]

Re: Change in

Posted: July 3rd, 2011, 4:14 am
by shypike
There have been a number of conflicting changes in the past.
Changing ":" to ";" or "-" is primarily a matter of taste.
However, the most recent change makes the semicolon an illegal character again (mainly due to cross-platform issues).
That makes substituting a colon with a semicolon rather odd.

This needs fixing.
That might be in a 0.6.x release (if there's a good reason to have one) or an 0.7.x. release (longer away).
In the mean time you can write a simple user script to rename the folder afterwards.

BTW: removal of colon is only required for Windows, other platforms are OK with it.
Which platform do you use and would you prefer/need this conversion at all?

Re: Change in

Posted: July 4th, 2011, 8:38 am
by syth
shypike wrote: BTW: removal of colon is only required for Windows, other platforms are OK with it.
Which platform do you use and would you prefer/need this conversion at all?
Well, OS X doesn't LIKE :'s in filenames (it displays them as '/' in the GUI) but they are not illegal per se. However, I do rsync my TV downloads to an SMB share on a PC, so the filenames have to be WIndohs compliant.

I think a script would be rather complicated as it would first have to see if there's a ; in the path, then check if there is an existing path that has a -, then create the folder if it doesn't exist, then copy the file into it, then rename the file.

Re: Change in

Posted: July 4th, 2011, 9:42 am
by shypike
Most substitutions are done for folder names.
We are very conservative with file names for a very good reason:
the par2 program will reconstruct files that are renamed by SABnzbd.
In fact we're careful to mimic the odd character substitutions that par2 does (like the colon).
Most posts consist of a container RARs anyway, so what counts is the result of unpacking.
SABnzbd doesn't change anything in the names of unpacked files.

Re: Change in

Posted: July 4th, 2011, 9:53 am
by syth
Since I had to change the folder AND FILENAMES for the last few episodes of Criminal Minds; Suspect Behavior, Csi; NY, and Law & Order; Criminal Intent I can say that at least in 0.6.5 this is not the case. It could be some weird interaction with EpisodeButler, but sabnzbd is the only thing that has updated recently (EB last updated July 2010).

Re: Change in

Posted: July 4th, 2011, 11:11 am
by shypike
Again, SABnzbd does minimal renaming and only on directly downloaded files.
On OSX, the colon will terminate the file name, because that's the bizarre way par2 handles it.
Folder names, *including* NZB names (because they lead to folder names) have more substitution.
However when you use the sorting functions, files might be renamed after the folder.
Anyway, the substitution of colons and semicolons in folder names will be fixed in the next release.