This hovers somewhere between a bug and a missing feature I suppose , so for form's sake I'll mention it here.
As sabnzbd+ works now , the feature that strips illegal characters and replaces them by allowed ones polls the OS sab is installed on to determine which characters to replace.
This gives an issue with linux systems who use cifs to map network shares on windows machines and vice versa. Folders cannot be created.
To fix this , I would say a per-folder option to turn on stripping , and with it the method to be used would seem the most versatile solution to this.
The ugliest implementation , add a textbox , if empty do nothing , else strip depending on what's in it.. ['\/<>?*|"','++{}!@#`'] or ['/','+']
This doesn't seem to be trivial either , since , from what I see from the source stripping would have to be done on a different level than now.
I do not want/expect any yes/no answer. I am mentioning this here when the next version gets started on this can be kept in mind by the people doing so.
Regards.
edit:
Another quick fix needing only a flag would be to always replace everything that could create issues with any OS... mac , linux , pc .. / and \ etc ...
OS of the actual folder location. (Stripping illegal chars)
Re: OS of the actual folder location. (Stripping illegal cha
This is a problem that cannot be solved.
When SABnzbd renames files, the first thing the par2 program will do is try to rename them
to their original names. Which will subsequently fail.
When SABnzbd renames files, the first thing the par2 program will do is try to rename them
to their original names. Which will subsequently fail.
Re: OS of the actual folder location. (Stripping illegal cha
Stripping illegal characters of folders is already being done..
This is what I'm talking about:
In misc.py :
It is being done already . The problem is sab assumes all paths on linux point to linux filesystems , and all paths on windows point to windows filesystems.
When sab creates a directory on a network share to a windows machine from a linux one , the directory cannot be created.
This is what I'm talking about:
In misc.py :
Code: Select all
################################################################################
# sanitize_filename #
################################################################################
if sabnzbd.WIN32:
# the colon should be here too, but we'll handle that separately
CH_ILLEGAL = r'\/<>?*|"'
CH_LEGAL = r'++{}!@#`'
else:
CH_ILLEGAL = r'/'
CH_LEGAL = r'+'
When sab creates a directory on a network share to a windows machine from a linux one , the directory cannot be created.
I am not talking about renaming files before processing. I am talking about fixing a system already in place to allow output to network shares of a different OS.shypike wrote: the par2 program will do is try to rename them
Re: OS of the actual folder location. (Stripping illegal cha
Kun you not delete the if-else , then it will always strip like windows.
You can then forking in git then kloon.
################################################################################
# sanitize_filename #
################################################################################
# the colon should be here too, but we'll handle that separately
CH_ILLEGAL = r'\/<>?*|"'
CH_LEGAL = r'++{}!@#`'
You can then forking in git then kloon.
################################################################################
# sanitize_filename #
################################################################################
# the colon should be here too, but we'll handle that separately
CH_ILLEGAL = r'\/<>?*|"'
CH_LEGAL = r'++{}!@#`'
Re: OS of the actual folder location. (Stripping illegal cha
Of course , but i'm hoping for a somewhat more elegant solution that could be implemented in time.Mikasa wrote:forking in git
As a stop gap measure , like I indicated in my original message , always stripping for a worst case scenario is fine . Bit in that case I would also hope for that modification to be put in the main trunk. Although branching , modifying then cloning on 4 computers every time a new version comes out isn't all that bad, I vastly prefer using jcfp's ppa. Also , I'm sure I'm not the only one who stumbled on this issue.
Re: OS of the actual folder location. (Stripping illegal cha
The current system doesn't always work either.phoenixxl wrote:I am not talking about renaming files before processing. I am talking about fixing a system already in place to allow output to network shares of a different OS.
If files are created on a platform that allows character X, it will still fail when downloaded on a platform that doesn't allow X.
For the reasons explained, par2 will override our fixes.
Clean-up could be improved for folder names, but not for file names.
Re: OS of the actual folder location. (Stripping illegal cha
Folder names alone would already fix 90% of the issues . There's already the custom length in place that's very handy , I'm sure a "worst case scenario" flag for the stripping of folder names would be doable as an intermediate ? Anything would be appreciated tbh.shypike wrote:Clean-up could be improved for folder names, but not for file names.
Duplicating the issue is simple , install sab on any flavor of linux , mount a network share that is located on a windows machine, configure sab to use folders on that share for temporary and finished downloads. Install the sab plugin for chrome , search "720p" on nz****ex , click advanced search , only display posts by comfun. Click any result using the plugin in chrome. Sab will try to create folders with "(720p|.mkv|h264|aac)" in the name and fail.
Regards.
Re: OS of the actual folder location. (Stripping illegal cha
I'll have a look at what can be done for folder names.
It won't be anything configurable, because that would generate more support
requests instead of less.
It won't be anything configurable, because that would generate more support
requests instead of less.
Re: OS of the actual folder location. (Stripping illegal cha
Thank you for having a look.
Re: OS of the actual folder location. (Stripping illegal cha
Will be in 0.7.15
Re: OS of the actual folder location. (Stripping illegal cha
Thank you , I'm looking forward to it.