mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-21 05:43:16 -07:00
fix remote_path handling on different os types.
This commit is contained in:
parent
332957caaa
commit
7ece7997a9
4 changed files with 38 additions and 7 deletions
|
@ -145,6 +145,14 @@ class autoProcessMovie:
|
|||
process_all_exceptions(inputName.lower(), dirName)
|
||||
inputName, dirName = convert_to_ascii(inputName, dirName)
|
||||
|
||||
if remote_path:
|
||||
if remote_path[-1] in ['\\','/']: # supplied directory includes final directory separator
|
||||
remote_path = remote_path + os.path.basename(dirName)
|
||||
elif remote_path[0] == '/': # posix path
|
||||
remote_path = remote_path + '/' + os.path.basename(dirName)
|
||||
else: # assume windows path or UNF path
|
||||
remote_path = remote_path + '\\' + os.path.basename(dirName)
|
||||
|
||||
if status == 0:
|
||||
if nzbtomedia.TRANSCODE == 1:
|
||||
result = transcoder.Transcode_directory(dirName)
|
||||
|
@ -165,7 +173,7 @@ class autoProcessMovie:
|
|||
|
||||
params['media_folder'] = dirName
|
||||
if remote_path:
|
||||
params['media_folder'] = os.path.join(remote_path, os.path.basename(dirName))
|
||||
params['media_folder'] = remote_path
|
||||
|
||||
url = "%s%s" % (baseURL, command)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue