Added "assume lone credit is primary" to the UI
git-svn-id: http://comictagger.googlecode.com/svn/trunk@207 6c5673fe-1810-88d6-992b-cd32ca31540c
This commit is contained in:
parent
3689317518
commit
117d8d8998
@ -229,7 +229,7 @@ def process_file_cli( filename, opts, settings ):
|
||||
|
||||
# now get the particular issue data
|
||||
try:
|
||||
cv_md = ComicVineTalker().fetchIssueData( matches[0]['volume_id'], matches[0]['issue_number'] )
|
||||
cv_md = ComicVineTalker().fetchIssueData( matches[0]['volume_id'], matches[0]['issue_number'], settings.assume_lone_credit_is_primary )
|
||||
except ComicVineTalkerException:
|
||||
print "Network error while getting issue details. Save aborted"
|
||||
return
|
||||
|
@ -226,7 +226,6 @@ class ComicVineTalker(QObject):
|
||||
role_name = role['role'].title()
|
||||
metadata.addCredit( person['name'], role['role'].title(), False )
|
||||
|
||||
assumeLoneCreditIsPrimary = True
|
||||
if assumeLoneCreditIsPrimary:
|
||||
def setLonePrimary( role ):
|
||||
lone_credit = None
|
||||
|
@ -67,7 +67,7 @@ class ComicTaggerSettings:
|
||||
self.show_disclaimer = True
|
||||
|
||||
# Comic Vine settings
|
||||
self.assumeLoneCreditIsPrimary = False
|
||||
self.assume_lone_credit_is_primary = False
|
||||
|
||||
def __init__(self):
|
||||
|
||||
@ -146,8 +146,8 @@ class ComicTaggerSettings:
|
||||
if self.config.has_option('dialogflags', 'show_disclaimer'):
|
||||
self.show_disclaimer = self.config.getboolean( 'dialogflags', 'show_disclaimer' )
|
||||
|
||||
if self.config.has_option('comicvine', 'assumeLoneCreditIsPrimary'):
|
||||
self.ask_about_cbi_in_rar = self.config.getboolean( 'comicvine', 'assumeLoneCreditIsPrimary' )
|
||||
if self.config.has_option('comicvine', 'assume_lone_credit_is_primary'):
|
||||
self.assume_lone_credit_is_primary = self.config.getboolean( 'comicvine', 'assume_lone_credit_is_primary' )
|
||||
|
||||
|
||||
def save( self ):
|
||||
@ -183,7 +183,7 @@ class ComicTaggerSettings:
|
||||
if not self.config.has_section( 'comicvine' ):
|
||||
self.config.add_section( 'comicvine' )
|
||||
|
||||
self.config.set( 'comicvine', 'assumeLoneCreditIsPrimary', self.assumeLoneCreditIsPrimary )
|
||||
self.config.set( 'comicvine', 'assume_lone_credit_is_primary', self.assume_lone_credit_is_primary )
|
||||
|
||||
|
||||
with open( self.settings_file, 'wb') as configfile:
|
||||
|
@ -111,6 +111,9 @@ class SettingsWindow(QtGui.QDialog):
|
||||
self.leNameLengthDeltaThresh.setText( str(self.settings.id_length_delta_thresh) )
|
||||
self.tePublisherBlacklist.setPlainText( self.settings.id_publisher_blacklist )
|
||||
|
||||
if self.settings.assume_lone_credit_is_primary:
|
||||
self.cbxAssumeLoneCreditIsPrimary.setCheckState( QtCore.Qt.Checked)
|
||||
|
||||
def accept( self ):
|
||||
|
||||
# Copy values from form to settings and save
|
||||
@ -126,6 +129,7 @@ class SettingsWindow(QtGui.QDialog):
|
||||
|
||||
self.settings.id_length_delta_thresh = int(self.leNameLengthDeltaThresh.text())
|
||||
self.settings.id_publisher_blacklist = str(self.tePublisherBlacklist.toPlainText())
|
||||
self.settings.assume_lone_credit_is_primary = self.cbxAssumeLoneCreditIsPrimary.isChecked()
|
||||
|
||||
self.settings.save()
|
||||
QtGui.QDialog.accept(self)
|
||||
|
@ -301,6 +301,24 @@
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab_3">
|
||||
<attribute name="title">
|
||||
<string>Comic Vine</string>
|
||||
</attribute>
|
||||
<widget class="QCheckBox" name="cbxAssumeLoneCreditIsPrimary">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>50</x>
|
||||
<y>30</y>
|
||||
<width>241</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Assume Lone Credit Is Primary</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
|
@ -789,7 +789,7 @@ class TaggerWindow( QtGui.QMainWindow):
|
||||
|
||||
try:
|
||||
comicVine = ComicVineTalker( )
|
||||
new_metadata = comicVine.fetchIssueData( selector.volume_id, selector.issue_number )
|
||||
new_metadata = comicVine.fetchIssueData( selector.volume_id, selector.issue_number, self.settings.assume_lone_credit_is_primary )
|
||||
except ComicVineTalkerException:
|
||||
QtGui.QApplication.restoreOverrideCursor()
|
||||
QtGui.QMessageBox.critical(self, self.tr("Network Issue"), self.tr("Could not connect to ComicVine to get issue details!"))
|
||||
|
Loading…
x
Reference in New Issue
Block a user