Assorted fixes and enhancements
git-svn-id: http://comictagger.googlecode.com/svn/trunk@325 6c5673fe-1810-88d6-992b-cd32ca31540c
This commit is contained in:
parent
e839b008c6
commit
37048b99fc
@ -37,16 +37,19 @@ class AutoTagStartWindow(QtGui.QDialog):
|
||||
|
||||
self.settings = settings
|
||||
|
||||
self.cbxNoAutoSaveOnLow.setCheckState( QtCore.Qt.Unchecked )
|
||||
self.cbxSaveOnLowConfidence.setCheckState( QtCore.Qt.Unchecked )
|
||||
self.cbxDontUseYear.setCheckState( QtCore.Qt.Unchecked )
|
||||
self.cbxAssumeIssueOne.setCheckState( QtCore.Qt.Unchecked )
|
||||
|
||||
self.noAutoSaveOnLow = False
|
||||
self.autoSaveOnLow = False
|
||||
self.dontUseYear = False
|
||||
self.assumeIssueOne = False
|
||||
|
||||
|
||||
def accept( self ):
|
||||
QtGui.QDialog.accept(self)
|
||||
|
||||
self.noAutoSaveOnLow = self.cbxNoAutoSaveOnLow.isChecked()
|
||||
self.autoSaveOnLow = self.cbxSaveOnLowConfidence.isChecked()
|
||||
self.dontUseYear = self.cbxDontUseYear.isChecked()
|
||||
self.assumeIssueOne = self.cbxAssumeIssueOne.isChecked()
|
||||
|
@ -9,8 +9,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>513</width>
|
||||
<height>189</height>
|
||||
<width>524</width>
|
||||
<height>248</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@ -43,20 +43,33 @@
|
||||
<property name="fieldGrowthPolicy">
|
||||
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QCheckBox" name="cbxNoAutoSaveOnLow">
|
||||
<property name="text">
|
||||
<string>Don't save on low confidence match</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<item row="1" column="1">
|
||||
<widget class="QCheckBox" name="cbxDontUseYear">
|
||||
<property name="text">
|
||||
<string>Don't use publication year in indentification process</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QCheckBox" name="cbxSaveOnLowConfidence">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Save on low confidence match</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QCheckBox" name="cbxAssumeIssueOne">
|
||||
<property name="text">
|
||||
<string>If no issue number, assume "1"</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
|
@ -10,7 +10,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>515</width>
|
||||
<height>275</height>
|
||||
<height>307</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@ -43,19 +43,35 @@
|
||||
<property name="fieldGrowthPolicy">
|
||||
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<item row="1" column="0" colspan="2">
|
||||
<widget class="QCheckBox" name="cbxAddToList">
|
||||
<property name="text">
|
||||
<string>Add New Archive to ComicTagger list</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" colspan="2">
|
||||
<widget class="QCheckBox" name="cbxDeleteOriginal">
|
||||
<property name="text">
|
||||
<string>Delete Original RAR (Not recommended)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QCheckBox" name="cbxAddToList">
|
||||
<property name="text">
|
||||
<string>Add New Archive to ComicTagger list</string>
|
||||
<item row="2" column="0">
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
</widget>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>5</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
|
@ -212,3 +212,6 @@ class FileNameParser:
|
||||
self.issue = self.issue.lstrip("0")
|
||||
if self.issue == "":
|
||||
self.issue = "0"
|
||||
if self.issue[0] == ".":
|
||||
self.issue = "0" + self.issue
|
||||
|
||||
|
@ -94,12 +94,12 @@ class FileSelectionList(QWidget):
|
||||
selectAllAction.triggered.connect(self.selectAll)
|
||||
removeAction.triggered.connect(self.removeSelection)
|
||||
|
||||
self.addAction(self.separator)
|
||||
self.addAction(selectAllAction)
|
||||
self.addAction(removeAction)
|
||||
self.addAction(self.separator)
|
||||
|
||||
def addAppAction( self, action ):
|
||||
self.insertAction( self.separator , action )
|
||||
self.insertAction( None , action )
|
||||
|
||||
def setModifiedFlag( self, modified ):
|
||||
self.modifiedFlag = modified
|
||||
|
@ -77,17 +77,6 @@
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
<widget class="QWidget" name="layoutWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>140</x>
|
||||
<y>10</y>
|
||||
<width>133</width>
|
||||
<height>29</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout"/>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections>
|
||||
|
@ -1476,10 +1476,10 @@ class TaggerWindow( QtGui.QMainWindow):
|
||||
return cv_md
|
||||
|
||||
|
||||
def identifyAndTagSingleArchive( self, ca, match_results, abortOnLowConfidence, dontUseYear ):
|
||||
def identifyAndTagSingleArchive( self, ca, match_results, dlg):
|
||||
success = False
|
||||
ii = IssueIdentifier( ca, self.settings )
|
||||
|
||||
|
||||
# read in metadata, and parse file name if not there
|
||||
md = ca.readMetadata( self.save_data_style )
|
||||
if md.isEmpty:
|
||||
@ -1497,8 +1497,10 @@ class TaggerWindow( QtGui.QMainWindow):
|
||||
QtCore.QCoreApplication.processEvents()
|
||||
QtCore.QCoreApplication.processEvents()
|
||||
|
||||
if dontUseYear:
|
||||
if dlg.dontUseYear:
|
||||
md.year = None
|
||||
if dlg.assumeIssueOne and ( md.issue is None or md.issue == ""):
|
||||
md.issue = "1"
|
||||
ii.setAdditionalMetadata( md )
|
||||
ii.onlyUseAdditionalMetaData = True
|
||||
ii.setOutputFunction( myoutput )
|
||||
@ -1531,7 +1533,7 @@ class TaggerWindow( QtGui.QMainWindow):
|
||||
if choices:
|
||||
print "Online search: Multiple matches. Save aborted"
|
||||
match_results.multipleMatches.append(MultipleMatch(ca.path,matches))
|
||||
elif low_confidence and abortOnLowConfidence:
|
||||
elif low_confidence and not dlg.autoSaveOnLow:
|
||||
print "Online search: Low confidence match. Save aborted"
|
||||
match_results.noMatches.append(ca.path)
|
||||
elif not found_match:
|
||||
@ -1569,11 +1571,11 @@ class TaggerWindow( QtGui.QMainWindow):
|
||||
"If you auto-tag now, unsaved data in the form will be lost. Are you sure?"):
|
||||
return
|
||||
|
||||
dlg = AutoTagStartWindow( self, self.settings,
|
||||
atstartdlg = AutoTagStartWindow( self, self.settings,
|
||||
self.tr("You have selected {0} archive(s) to automatically identify and write {1} tags to.\n\n".format(len(ca_list), MetaDataStyle.name[style]) +
|
||||
"Please choose options below, and select OK.\n" ))
|
||||
dlg.setModal( True )
|
||||
if not dlg.exec_():
|
||||
atstartdlg.setModal( True )
|
||||
if not atstartdlg.exec_():
|
||||
return
|
||||
|
||||
|
||||
@ -1602,7 +1604,7 @@ class TaggerWindow( QtGui.QMainWindow):
|
||||
QtCore.QCoreApplication.processEvents()
|
||||
|
||||
if ca.isWritable():
|
||||
success, match_results = self.identifyAndTagSingleArchive( ca, match_results, dlg.noAutoSaveOnLow, dlg.dontUseYear )
|
||||
success, match_results = self.identifyAndTagSingleArchive( ca, match_results, atstartdlg )
|
||||
|
||||
self.atprogdialog.close()
|
||||
self.fileSelectionList.updateSelectedRows()
|
||||
|
22
todo.txt
22
todo.txt
@ -4,31 +4,33 @@ Features
|
||||
|
||||
Re-arrange main form layout
|
||||
|
||||
|
||||
New menu graphics
|
||||
auto tag
|
||||
open folder vs file
|
||||
|
||||
Multi-file:
|
||||
|
||||
File list:
|
||||
Delete archive function??
|
||||
change menu order
|
||||
|
||||
|
||||
Batch Functions:
|
||||
Auto-Tag
|
||||
Interactive dialog at end
|
||||
Summary Dialog
|
||||
|
||||
Rename
|
||||
check-box for rows?
|
||||
manual edit the preview?
|
||||
manual edit the preview?
|
||||
|
||||
Docs:
|
||||
Explain the style comboboxes
|
||||
Basics of Batch operations
|
||||
Define Manual Search - Manual
|
||||
vs Auto-Identify - Uses form, doesn't save
|
||||
vs Auto-Tag - Doesn't use form, saves
|
||||
|
||||
|
||||
-----------------------------------------------------
|
||||
Bugs
|
||||
-----------------------------------------------------
|
||||
(python:4401): GLib-ERROR **: Creating pipes for GWakeup: Too many open files
|
||||
|
||||
RAR Password -- childrens crusade 3
|
||||
|
||||
-----------------------------------------------------
|
||||
Big Future Features
|
||||
@ -40,6 +42,8 @@ GCD scraper or DB reader
|
||||
Auto search:
|
||||
Searching w/o issue #
|
||||
|
||||
Form Mode: Single vs Batch
|
||||
|
||||
-----------------------------------------------------
|
||||
Small(er) Future Feature
|
||||
-----------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user