for file in files:
ftitle=os.path.splitext(file)
fname=ftitle[0]
- fname=zenhan.toHankaku(unicode(fname))
+ fname=zenhan.toHankaku(unicode(fname,"utf-8"))
+ print type(fname)
st=detNameType(fname, execpath)['title']
- if not len(ss[st])>0:
+ if not ss.has_key(st):
ss[st]=[]
ss[detNum(fname,execpath)]=ftitle
return ss
ff=[]
maxnum=0
for file in files:
- recdblist.printutf8(file)
+ recdblist.printutf8(unicode(file,'utf-8'))
file=os.path.join(movepath,file)
if os.path.isfile(file):
name=os.path.splitext(os.path.split(file)[1])
name=name[0]
- name=zenhan.toHankaku(unicode(name))
+ name=zenhan.toHankaku(unicode(name,'utf-8'))
p1=detNameType(name,movepath)
recdblist.printutf8(p1['title']+" "+str(p1['num']))
time1=time.localtime(os.path.getmtime(file))
ret['type']="A"
ret['title']=tA.group(1)
ret['num']=int(tA.group(2))
- ret['folder']=searchFolder(tA.group(1),path)
+ ret['folder']=searchFolder(tA.group(1),unicode(path,'utf-8'))
if tAj:
recdblist.printutf8("typeA")
recdblist.printutf8("title="+tAj.group(1))
ret['type']="Aj"
ret['title']=tAj.group(1)
ret['num']=int(tAj.group(2))
- ret['folder']=searchFolder(tAj.group(1),path)
+ ret['folder']=searchFolder(tAj.group(1),unicode(path,'utf-8'))
elif tB:
recdblist.printutf8("typeB")
recdblist.printutf8("title="+tB.group(1))
ret['type']="B"
ret['title']=tB.group(1)
ret['num']=int(tB.group(2))
- ret['folder']=searchFolder(tB.group(1),path)
+ ret['folder']=searchFolder(tB.group(1),unicode(path,'utf-8'))
ret['subtitle']=tB.group(3)
else:#type C or type D
#fold=searchFolder(title, path)
rt=["",0,""]
for t in ts:
tt=tt+" "+t
- ft1=searchFolder(tt,path)
+ ft1=searchFolder(tt,unicode(path,'utf-8'))
recdblist.printutf8(tt)
#print ft1
if ft1!="":