Change in "Replace Illegal Characters in Folder Names"

Get help with all aspects of SABnzbd
Forum rules
Help us help you:
  • Are you using the latest stable version of SABnzbd? Downloads page.
  • Tell us what system you run SABnzbd on.
  • Adhere to the forum rules.
  • Do you experience problems during downloading?
    Check your connection in Status and Interface settings window.
    Use Test Server in Config > Servers.
    We will probably ask you to do a test using only basic settings.
  • Do you experience problems during repair or unpacking?
    Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
Post Reply
User avatar
syth
Jr. Member
Jr. Member
Posts: 60
Joined: August 1st, 2008, 2:54 am
Location: Zed Zed 9 Plural Zed Alpha

Change in "Replace Illegal Characters in Folder Names"

Post 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]
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: Change in

Post 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?
User avatar
syth
Jr. Member
Jr. Member
Posts: 60
Joined: August 1st, 2008, 2:54 am
Location: Zed Zed 9 Plural Zed Alpha

Re: Change in

Post 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.
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: Change in

Post 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.
User avatar
syth
Jr. Member
Jr. Member
Posts: 60
Joined: August 1st, 2008, 2:54 am
Location: Zed Zed 9 Plural Zed Alpha

Re: Change in

Post 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).
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: Change in

Post 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.
Post Reply