More text in selection dialog titles

Always search with no articles removed

git-svn-id: http://comictagger.googlecode.com/svn/trunk@53 6c5673fe-1810-88d6-992b-cd32ca31540c
This commit is contained in:
beville@gmail.com 2012-11-16 22:45:35 +00:00
parent 318a1dd23b
commit cdb22347ab
7 changed files with 25 additions and 15 deletions

View File

@ -57,6 +57,9 @@ class ComicVineTalker(QObject):
def searchForSeries( self, series_name , callback=None, refresh_cache=False ):
# remove cruft from the search string
series_name = utils.removearticles( series_name ).lower().strip()
# before we search online, look in our cache, since we might have
# done this same search recently
cvc = ComicVineCacher( ComicTaggerSettings.getSettingsFolder() )
@ -88,7 +91,8 @@ class ComicVineTalker(QObject):
current_result_count = cv_response['number_of_page_results']
total_result_count = cv_response['number_of_total_results']
print ("Found {0} of {1} results".format( cv_response['number_of_page_results'], cv_response['number_of_total_results']))
if callback is None:
print ("Found {0} of {1} results".format( cv_response['number_of_page_results'], cv_response['number_of_total_results']))
search_results.extend( cv_response['results'])
offset = 0
@ -97,7 +101,8 @@ class ComicVineTalker(QObject):
# see if we need to keep asking for more pages...
while ( current_result_count < total_result_count ):
print ("getting another page of results {0} of {1}...".format( current_result_count, total_result_count))
if callback is None:
print ("getting another page of results {0} of {1}...".format( current_result_count, total_result_count))
offset += limit
resp = urllib2.urlopen( search_url + "&offset="+str(offset) )
content = resp.read()

View File

@ -185,8 +185,6 @@ class IssueIdentifier:
#self.log_msg( ( "Searching for " + keys['series'] + "...")
self.log_msg( "Searching for {0} #{1} ...".format( keys['series'], keys['issue_number']) )
keys['series'] = utils.removearticles( keys['series'] )
cv_search_results = comicVine.searchForSeries( keys['series'] )
#self.log_msg( "Found " + str(len(cv_search_results)) + " initial results" )

View File

@ -64,10 +64,8 @@ class IssueSelectionWindow(QtGui.QDialog):
self.twList.selectRow( r )
break
def performQuery( self ):
QtGui.QApplication.setOverrideCursor(QtGui.QCursor(QtCore.Qt.WaitCursor))
while self.twList.rowCount() > 0:

View File

@ -850,6 +850,10 @@ class TaggerWindow( QtGui.QMainWindow):
issue_number = str(self.leIssueNum.text()).strip()
selector = VolumeSelectionWindow( self, self.settings.cv_api_key, series_name, issue_number, self.comic_archive, self.settings, autoselect )
title = "Search: '" + series_name + "' - "
selector.setWindowTitle( title + "Select Series")
selector.setModal(True)
selector.exec_()
@ -899,7 +903,6 @@ class TaggerWindow( QtGui.QMainWindow):
r = 0
while r < self.twCredits.rowCount():
if str(self.twCredits.item(r, 0).text()).lower() not in cix_credits:
print "Bad credit for CIX:", self.twCredits.item(r, 0).text()
self.twCredits.item(r, 0).setBackgroundColor( inactive_color )
else:
self.twCredits.item(r, 0).setBackgroundColor( active_color )

View File

@ -3,10 +3,6 @@
Features
----------------
Update the ABout Box with better graphic and more info
Issue Selection Dialog title
Series Selection Dialog title
Auto-select:
msgbox on autoselect failure, or warning
@ -79,9 +75,8 @@ Image Hashes:
Filename parsing:
Concatenation of Name and Issue??
"1602"
CV search - Maybe remove "the" and leading "A" before searching and matching for closer
Issue identifier - compare names with aricles removed
App option to covert RAR to ZIP

View File

@ -66,6 +66,7 @@ def removearticles( text ):
newText = newText.replace(":", "")
newText = newText.replace(".", "")
newText = newText.replace(",", "")
newText = newText.replace("-", " ")
return newText

View File

@ -159,6 +159,16 @@ class VolumeSelectionWindow(QtGui.QDialog):
def showIssues( self ):
selector = IssueSelectionWindow( self, self.settings, self.volume_id, self.issue_number )
selector.setModal(True)
title = ""
for record in self.cv_search_results:
if record['id'] == self.volume_id:
title = record['name']
title += " (" + str(record['start_year']) + ")"
title += " - "
break
selector.setWindowTitle( title + "Select Issue")
selector.exec_()
if selector.result():
#we should now have a volume ID