From 9a78f596245f04032d5118317fa388bd98ce03f1 Mon Sep 17 00:00:00 2001 From: evilhero Date: Thu, 7 Mar 2013 20:49:47 -0500 Subject: [PATCH] FIX: still some more unicode fixes... --- mylar/PostProcessor.py | 3 ++- mylar/search.py | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/mylar/PostProcessor.py b/mylar/PostProcessor.py index 47e0db9f..03c24ed4 100755 --- a/mylar/PostProcessor.py +++ b/mylar/PostProcessor.py @@ -279,7 +279,8 @@ class PostProcessor(object): publisher = comicnzb['ComicPublisher'] self._log("Publisher: " + publisher, logger.DEBUG) logger.fdebug("Publisher: " + str(publisher)) - series = comicnzb['ComicName'] + #we need to un-unicode this to make sure we can write the filenames properly for spec.chars + series = comicnzb['ComicName'].encode('ascii', 'ignore').strip() self._log("Series: " + series, logger.DEBUG) logger.fdebug("Series: " + str(series)) seriesyear = comicnzb['ComicYear'] diff --git a/mylar/search.py b/mylar/search.py index 368962a5..ce994042 100755 --- a/mylar/search.py +++ b/mylar/search.py @@ -257,7 +257,9 @@ def NZB_SEARCH(ComicName, IssueNumber, ComicYear, SeriesYear, nzbprov, nzbpr, Is comyear = str(ComicYear) #print ("-------SEARCH FOR MISSING------------------") - findcomic.append(str(ComicName)) + #ComicName is unicode - let's unicode and ascii it cause we'll be comparing filenames against it. + u_ComicName = ComicName.encode('ascii', 'ignore').strip() + findcomic.append(u_ComicName) # this should be called elsewhere..redudant code. if '.' in IssueNumber: isschk_find = IssueNumber.find('.')