mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-20 21:33:13 -07:00
fix ascii convert
This commit is contained in:
parent
4b4f7ee4ec
commit
b456fc4b0b
1 changed files with 3 additions and 3 deletions
|
@ -331,8 +331,8 @@ def converto_to_ascii(nzbName, dirName):
|
||||||
nzbName2 = str(nzbName.decode('ascii', 'replace').replace(u'\ufffd', '_'))
|
nzbName2 = str(nzbName.decode('ascii', 'replace').replace(u'\ufffd', '_'))
|
||||||
dirName2 = str(dirName.decode('ascii', 'replace').replace(u'\ufffd', '_'))
|
dirName2 = str(dirName.decode('ascii', 'replace').replace(u'\ufffd', '_'))
|
||||||
if dirName != dirName2:
|
if dirName != dirName2:
|
||||||
Logger.info("Renaming directory:%s to: %s.", dirName, nzbName2)
|
Logger.info("Renaming directory:%s to: %s.", dirName, dirName2)
|
||||||
shutil.move(dirName, nzbName2)
|
shutil.move(dirName, dirName2)
|
||||||
for dirpath, dirnames, filesnames in os.walk(dirName2):
|
for dirpath, dirnames, filesnames in os.walk(dirName2):
|
||||||
for filename in filesnames:
|
for filename in filesnames:
|
||||||
filename2 = str(filename.decode('ascii', 'replace').replace(u'\ufffd', '_'))
|
filename2 = str(filename.decode('ascii', 'replace').replace(u'\ufffd', '_'))
|
||||||
|
@ -340,7 +340,7 @@ def converto_to_ascii(nzbName, dirName):
|
||||||
Logger.info("Renaming file:%s to: %s.", filename, filename2)
|
Logger.info("Renaming file:%s to: %s.", filename, filename2)
|
||||||
shutil.move(filename, filename2)
|
shutil.move(filename, filename2)
|
||||||
nzbName = nzbName2
|
nzbName = nzbName2
|
||||||
dirName = nzbName2
|
dirName = dirName2
|
||||||
return nzbName, dirName
|
return nzbName, dirName
|
||||||
|
|
||||||
def parse_other(args):
|
def parse_other(args):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue