Skip to content

Commit

Permalink
xbmc.validatePath() should be decoded to UTF-8
Browse files Browse the repository at this point in the history
  • Loading branch information
amet committed Oct 7, 2012
1 parent 810a1d2 commit 5d843e7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions script.xbmc.subtitles/resources/lib/gui.py
Expand Up @@ -324,7 +324,7 @@ def Download_Subtitles( self, pos, auto = False, gui = True ):
else:
file_name = u"%s%s" % ( sub_name, sub_ext )
file_from = file
file_to = xbmc.validatePath(os.path.join(self.sub_folder, file_name))
file_to = xbmc.validatePath(os.path.join(self.sub_folder, file_name)).decode("utf-8")
# Create a files list of from-to tuples so that multiple files may be
# copied (sub+idx etc')
files_list = [(file_from,file_to)]
Expand Down Expand Up @@ -433,8 +433,8 @@ def create_name(self,zip_entry,sub_filename,subtitle_lang):
file_name = u"%s%s" % ( name, os.path.splitext( zip_entry )[1] )
log( __name__ ,"Sub in Zip [%s], File Name [%s]" % (zip_entry,
file_name,))
ret_zip_entry = xbmc.validatePath(os.path.join(self.tmp_sub_dir,zip_entry))
ret_file_name = xbmc.validatePath(os.path.join(self.sub_folder,file_name))
ret_zip_entry = xbmc.validatePath(os.path.join(self.tmp_sub_dir,zip_entry)).decode("utf-8")
ret_file_name = xbmc.validatePath(os.path.join(self.sub_folder,file_name)).decode("utf-8")
return ret_zip_entry,ret_file_name

def list_services( self ):
Expand Down

0 comments on commit 5d843e7

Please sign in to comment.