unicode issue in tvshow nfo

This commit is contained in:
Marcel van der Veldt 2015-03-21 16:05:47 +01:00
parent c6e5bc28ac
commit a1ed4ef0f6

View file

@ -97,9 +97,9 @@ class CreateFiles():
if item_type == "Episode": if item_type == "Episode":
itemPath = os.path.join(tvLibrary,item["SeriesId"]) itemPath = os.path.join(tvLibrary,item["SeriesId"])
if str(item.get("ParentIndexNumber")) != None: if str(item.get("ParentIndexNumber")) != None:
filenamestr = self.CleanName(item.get("SeriesName")).encode('utf-8') + " S" + str(item.get("ParentIndexNumber")) + "E" + str(item.get("IndexNumber")) + " (" + item["Id"] + ").nfo" filenamestr = self.CleanName(utils.convertEncoding(item.get("SeriesName"))) + " S" + str(item.get("ParentIndexNumber")) + "E" + str(item.get("IndexNumber")) + " (" + item["Id"] + ").nfo"
else: else:
filenamestr = self.CleanName(item.get("SeriesName")).encode('utf-8') + " S0E0 " + self.CleanName(item["Name"].decode('utf-8')) + " (" + item["Id"] + ").nfo" filenamestr = self.CleanName(utils.convertEncoding(item.get("SeriesName"))) + " S0E0 " + utils.convertEncoding(self.CleanName(item["Name"])) + " (" + item["Id"] + ").nfo"
nfoFile = os.path.join(itemPath,filenamestr) nfoFile = os.path.join(itemPath,filenamestr)
rootelement = "episodedetails" rootelement = "episodedetails"