From c93386586a35990a1c91a1b53a22edf87a154261 Mon Sep 17 00:00:00 2001 From: evilhero Date: Wed, 11 Dec 2013 13:54:43 -0500 Subject: [PATCH] FIX: decimal issues weren't being searched properly and giving errors --- mylar/search.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/mylar/search.py b/mylar/search.py index 2d7b9628..91ab849e 100755 --- a/mylar/search.py +++ b/mylar/search.py @@ -465,27 +465,28 @@ def NZB_SEARCH(ComicName, IssueNumber, ComicYear, SeriesYear, nzbprov, nzbpr, Is #determine the amount of loops here i = 0 c_alpha = None + dsp_c_alpha = None c_number = None c_num_a4 = None while i < len(findcomiciss): - #print findcomiciss[i] #take first occurance of alpha in string and carry it through if findcomiciss[i].isalpha(): - #print 'alpha detected' c_alpha = findcomiciss[i:].rstrip() c_number = findcomiciss[:i].rstrip() break elif '.' in findcomiciss[i]: - #print 'decimal detected' c_number = findcomiciss[:i].rstrip() c_num_a4 = findcomiciss[i+1:].rstrip() - if c_num_a4.isalpha(): - c_alpha = c_num_a4 + #if decimal seperates numeric from alpha (ie - 7.INH) + #don't give calpha a value or else will seperate with a space further down + #assign it to dsp_c_alpha so that it can be displayed for debugging. + if not c_num_a4.isdigit(): + dsp_c_alpha = c_num_a4 else: - c_number = str(cnumber) + str(c_num_a4) + c_number = str(c_number) + '.' + str(c_num_a4) break i+=1 - logger.fdebug("calpha/cnumber: " + str(c_alpha) + " / " + str(c_number)) + logger.fdebug("calpha/cnumber: " + str(dsp_c_alpha) + " / " + str(c_number)) if c_number is None: c_number = findcomiciss # if it's None, means no special alphas or decimals