Compare commits
25 Commits
1.0.2a-bet
...
1.0.3-beta
Author | SHA1 | Date | |
---|---|---|---|
1b3feaa167 | |||
2526fa0ca8 | |||
a878d36dcf | |||
90de6433b6 | |||
d9abc364f1 | |||
e542b6df1f | |||
a7a6b085f1 | |||
0078f76e8c | |||
1a01cb60d9 | |||
0f81ce4c24 | |||
c4ef4137d0 | |||
cdc6d71356 | |||
2357a6378e | |||
9503d0fef4 | |||
c46dda4540 | |||
894c23f64f | |||
9360fa954c | |||
74408e56fd | |||
dd8e54fa6b | |||
b378840878 | |||
c0a6406dc9 | |||
df3544e734 | |||
d40de5b67e | |||
25b63dfc65 | |||
70f50c8595 |
2
Makefile
2
Makefile
@ -12,7 +12,7 @@ clean:
|
||||
zip:
|
||||
cd release; \
|
||||
rm -rf *zip comictagger-src-$(VERSION_STR) ; \
|
||||
svn checkout https://comictagger.googlecode.com/svn/trunk/ comictagger-src-$(VERSION_STR); \
|
||||
svn export https://comictagger.googlecode.com/svn/trunk/ comictagger-src-$(VERSION_STR); \
|
||||
zip -r comictagger-src-$(VERSION_STR).zip comictagger-src-$(VERSION_STR); \
|
||||
rm -rf comictagger-src-$(VERSION_STR)
|
||||
|
||||
|
@ -26,6 +26,7 @@ from PyQt4.QtCore import QUrl, pyqtSignal, QByteArray
|
||||
|
||||
from imagefetcher import ImageFetcher
|
||||
from settings import ComicTaggerSettings
|
||||
from options import MetaDataStyle
|
||||
|
||||
class AutoTagMatchWindow(QtGui.QDialog):
|
||||
|
||||
@ -67,7 +68,7 @@ class AutoTagMatchWindow(QtGui.QDialog):
|
||||
self.twList.selectRow( 0 )
|
||||
|
||||
path = self.current_match_set.ca.path
|
||||
self.setWindowTitle( "Select correct match ({0} of {1}): {2}".format(
|
||||
self.setWindowTitle( u"Select correct match ({0} of {1}): {2}".format(
|
||||
self.current_match_set_idx+1,
|
||||
len( self.match_set_list ),
|
||||
os.path.split(path)[1] ))
|
||||
@ -85,6 +86,7 @@ class AutoTagMatchWindow(QtGui.QDialog):
|
||||
|
||||
item_text = match['series']
|
||||
item = QtGui.QTableWidgetItem(item_text)
|
||||
item.setData( QtCore.Qt.ToolTipRole, item_text )
|
||||
item.setFlags(QtCore.Qt.ItemIsSelectable| QtCore.Qt.ItemIsEnabled)
|
||||
self.twList.setItem(row, 0, item)
|
||||
|
||||
@ -93,6 +95,7 @@ class AutoTagMatchWindow(QtGui.QDialog):
|
||||
else:
|
||||
item_text = u"Unknown"
|
||||
item = QtGui.QTableWidgetItem(item_text)
|
||||
item.setData( QtCore.Qt.ToolTipRole, item_text )
|
||||
item.setFlags(QtCore.Qt.ItemIsSelectable| QtCore.Qt.ItemIsEnabled)
|
||||
self.twList.setItem(row, 1, item)
|
||||
|
||||
@ -104,6 +107,7 @@ class AutoTagMatchWindow(QtGui.QDialog):
|
||||
else:
|
||||
item_text += u"????"
|
||||
item = QtGui.QTableWidgetItem(item_text)
|
||||
item.setData( QtCore.Qt.ToolTipRole, item_text )
|
||||
item.setFlags(QtCore.Qt.ItemIsSelectable| QtCore.Qt.ItemIsEnabled)
|
||||
self.twList.setItem(row, 2, item)
|
||||
|
||||
@ -196,6 +200,8 @@ class AutoTagMatchWindow(QtGui.QDialog):
|
||||
QtGui.QApplication.setOverrideCursor(QtGui.QCursor(QtCore.Qt.WaitCursor))
|
||||
md.overlay( cv_md )
|
||||
success = ca.writeMetadata( md, self.style )
|
||||
ca.loadCache( [ MetaDataStyle.CBI, MetaDataStyle.CIX ] )
|
||||
|
||||
QtGui.QApplication.restoreOverrideCursor()
|
||||
|
||||
if not success:
|
||||
|
@ -40,16 +40,62 @@ class AutoTagStartWindow(QtGui.QDialog):
|
||||
self.cbxSaveOnLowConfidence.setCheckState( QtCore.Qt.Unchecked )
|
||||
self.cbxDontUseYear.setCheckState( QtCore.Qt.Unchecked )
|
||||
self.cbxAssumeIssueOne.setCheckState( QtCore.Qt.Unchecked )
|
||||
self.cbxIgnoreLeadingDigitsInFilename.setCheckState( QtCore.Qt.Unchecked )
|
||||
self.cbxRemoveAfterSuccess.setCheckState( QtCore.Qt.Unchecked )
|
||||
self.cbxSpecifySearchString.setCheckState( QtCore.Qt.Unchecked )
|
||||
self.leNameLengthMatchTolerance.setText( str(self.settings.id_length_delta_thresh) )
|
||||
self.leSearchString.setEnabled( False )
|
||||
|
||||
nlmtTip = (
|
||||
""" <html>The <b>Name Length Match Tolerance</b> is for eliminating automatic
|
||||
search matches that are too long compared to your series name search. The higher
|
||||
it is, the more likely to have a good match, but each search will take longer and
|
||||
use more bandwidth. Too low, and only the very closest lexical matches will be
|
||||
explored.</html>""" )
|
||||
|
||||
self.leNameLengthMatchTolerance.setToolTip(nlmtTip)
|
||||
|
||||
ssTip = (
|
||||
"""<html>
|
||||
The <b>series search string</b> specifies the search string to be used for all selected archives.
|
||||
Use this only when trying to match archives with hard-to-parse filenames. All archives selected
|
||||
should be from the same series.
|
||||
</html>"""
|
||||
)
|
||||
self.leSearchString.setToolTip(ssTip)
|
||||
self.cbxSpecifySearchString.setToolTip(ssTip)
|
||||
|
||||
|
||||
validator = QtGui.QIntValidator(0, 99, self)
|
||||
self.leNameLengthMatchTolerance.setValidator(validator)
|
||||
|
||||
self.cbxSpecifySearchString.stateChanged.connect(self.searchStringToggle)
|
||||
|
||||
self.autoSaveOnLow = False
|
||||
self.dontUseYear = False
|
||||
self.assumeIssueOne = False
|
||||
self.ignoreLeadingDigitsInFilename = False
|
||||
self.removeAfterSuccess = False
|
||||
self.searchString = None
|
||||
self.nameLengthMatchTolerance = self.settings.id_length_delta_thresh
|
||||
|
||||
def searchStringToggle(self):
|
||||
enable = self.cbxSpecifySearchString.isChecked()
|
||||
self.leSearchString.setEnabled( enable )
|
||||
|
||||
|
||||
def accept( self ):
|
||||
QtGui.QDialog.accept(self)
|
||||
|
||||
self.autoSaveOnLow = self.cbxSaveOnLowConfidence.isChecked()
|
||||
self.dontUseYear = self.cbxDontUseYear.isChecked()
|
||||
self.assumeIssueOne = self.cbxAssumeIssueOne.isChecked()
|
||||
|
||||
self.ignoreLeadingDigitsInFilename = self.cbxIgnoreLeadingDigitsInFilename.isChecked()
|
||||
self.removeAfterSuccess = self.cbxRemoveAfterSuccess.isChecked()
|
||||
self.nameLengthMatchTolerance = int(self.leNameLengthMatchTolerance.text())
|
||||
|
||||
if self.cbxSpecifySearchString.isChecked():
|
||||
self.searchString = unicode(self.leSearchString.text())
|
||||
if len(self.searchString) == 0:
|
||||
self.searchString = None
|
||||
|
||||
|
@ -9,10 +9,16 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>524</width>
|
||||
<height>248</height>
|
||||
<width>607</width>
|
||||
<height>319</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Auto-Tag</string>
|
||||
</property>
|
||||
@ -40,20 +46,16 @@
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QFormLayout" name="formLayout">
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SetFixedSize</enum>
|
||||
</property>
|
||||
<property name="fieldGrowthPolicy">
|
||||
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
|
||||
</property>
|
||||
<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">
|
||||
<item row="0" column="0" colspan="2">
|
||||
<widget class="QCheckBox" name="cbxSaveOnLowConfidence">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
@ -63,13 +65,129 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<item row="1" column="0" colspan="2">
|
||||
<widget class="QCheckBox" name="cbxDontUseYear">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Don't use publication year in indentification process</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="2">
|
||||
<widget class="QCheckBox" name="cbxAssumeIssueOne">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>If no issue number, assume "1"</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" colspan="2">
|
||||
<widget class="QCheckBox" name="cbxIgnoreLeadingDigitsInFilename">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Ignore leading (sequence) numbers in filename</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0" colspan="2">
|
||||
<widget class="QCheckBox" name="cbxRemoveAfterSuccess">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Remove archives from list after successful tagging</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0" colspan="2">
|
||||
<widget class="QCheckBox" name="cbxSpecifySearchString">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Specify series search string for all selected archives</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<widget class="QLineEdit" name="leSearchString">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="1">
|
||||
<widget class="QLineEdit" name="leNameLengthMatchTolerance">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>50</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0" colspan="2">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Adjust Name Length Match Tolerance:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
|
@ -288,7 +288,7 @@ class RarArchiver:
|
||||
rarc = self.getRARObj()
|
||||
|
||||
tries = 0
|
||||
while tries < 10:
|
||||
while tries < 7:
|
||||
try:
|
||||
tries = tries+1
|
||||
entries = rarc.read_files( archive_file )
|
||||
@ -375,10 +375,14 @@ class RarArchiver:
|
||||
#return namelist
|
||||
|
||||
tries = 0
|
||||
while tries < 10:
|
||||
while tries < 7:
|
||||
try:
|
||||
tries = tries+1
|
||||
namelist = [ item.filename for item in rarc.infolist() ]
|
||||
#namelist = [ item.filename for item in rarc.infolist() ]
|
||||
namelist = []
|
||||
for item in rarc.infolist():
|
||||
if item.size != 0:
|
||||
namelist.append( item.filename )
|
||||
|
||||
except (OSError, IOError) as e:
|
||||
print "getArchiveFilenameList(): [{0}] {1} attempt#{2}".format(str(e), self.path, tries)
|
||||
@ -393,7 +397,7 @@ class RarArchiver:
|
||||
|
||||
def getRARObj( self ):
|
||||
tries = 0
|
||||
while tries < 10:
|
||||
while tries < 7:
|
||||
try:
|
||||
tries = tries+1
|
||||
rarc = UnRAR2.RarFile( self.path )
|
||||
@ -524,7 +528,6 @@ class ComicArchive:
|
||||
fname = os.path.join(ComicTaggerSettings.baseDir(), 'graphics','nocover.png' )
|
||||
with open(fname, 'rb') as fd:
|
||||
ComicArchive.logo_data = fd.read()
|
||||
print len(ComicArchive.logo_data)
|
||||
|
||||
# Clears the cached data
|
||||
def resetCache( self ):
|
||||
@ -537,7 +540,11 @@ class ComicArchive:
|
||||
self.cix_md = None
|
||||
self.cbi_md = None
|
||||
self.comet_md = None
|
||||
|
||||
|
||||
def loadCache( self, style_list ):
|
||||
for style in style_list:
|
||||
self.readMetadata(style)
|
||||
|
||||
def rename( self, path ):
|
||||
self.path = path
|
||||
self.archiver.path = path
|
||||
@ -736,8 +743,7 @@ class ComicArchive:
|
||||
if write_success:
|
||||
self.has_cbi = True
|
||||
self.cbi_md = metadata
|
||||
else:
|
||||
self.resetCache()
|
||||
self.resetCache()
|
||||
return write_success
|
||||
else:
|
||||
return False
|
||||
@ -748,8 +754,7 @@ class ComicArchive:
|
||||
if write_success:
|
||||
self.has_cbi = False
|
||||
self.cbi_md = None
|
||||
else:
|
||||
self.resetCache()
|
||||
self.resetCache()
|
||||
return write_success
|
||||
return True
|
||||
|
||||
@ -792,8 +797,7 @@ class ComicArchive:
|
||||
if write_success:
|
||||
self.has_cix = True
|
||||
self.cix_md = metadata
|
||||
else:
|
||||
self.resetCache()
|
||||
self.resetCache()
|
||||
return write_success
|
||||
else:
|
||||
return False
|
||||
@ -804,8 +808,7 @@ class ComicArchive:
|
||||
if write_success:
|
||||
self.has_cix = False
|
||||
self.cix_md = None
|
||||
else:
|
||||
self.resetCache()
|
||||
self.resetCache()
|
||||
return write_success
|
||||
return True
|
||||
|
||||
@ -875,8 +878,7 @@ class ComicArchive:
|
||||
if write_success:
|
||||
self.has_comet = True
|
||||
self.comet_md = metadata
|
||||
else:
|
||||
self.resetCache()
|
||||
self.resetCache()
|
||||
return write_success
|
||||
else:
|
||||
return False
|
||||
@ -887,8 +889,7 @@ class ComicArchive:
|
||||
if write_success:
|
||||
self.has_comet = False
|
||||
self.comet_md = None
|
||||
else:
|
||||
self.resetCache()
|
||||
self.resetCache()
|
||||
return write_success
|
||||
return True
|
||||
|
||||
|
@ -115,7 +115,7 @@ class ComicBookInfo:
|
||||
#helper func
|
||||
def toInt(s):
|
||||
i = None
|
||||
if type(s) == str or type(s) == int:
|
||||
if type(s) in [ str, unicode, int ]:
|
||||
try:
|
||||
i = int(s)
|
||||
except ValueError:
|
||||
|
@ -200,7 +200,7 @@ class ComicVineTalker(QObject):
|
||||
for record in volume_results['issues']:
|
||||
if IssueString(issue_number).asFloat() is None:
|
||||
issue_number = 1
|
||||
if float(record['issue_number']) == float(issue_number):
|
||||
if float(record['issue_number']) == IssueString(issue_number).asFloat():
|
||||
found = True
|
||||
break
|
||||
|
||||
|
@ -1,3 +1,3 @@
|
||||
# This file should contan only these comments, and the line below.
|
||||
# Used by packaging makefiles and app
|
||||
version="1.0.2a-beta"
|
||||
version="1.0.3-beta"
|
||||
|
@ -9,18 +9,24 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>515</width>
|
||||
<height>307</height>
|
||||
<width>533</width>
|
||||
<height>202</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Export to Zip Archive</string>
|
||||
</property>
|
||||
<property name="modal">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<item row="0" column="0">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
|
@ -85,7 +85,13 @@ class FileNameParser:
|
||||
elif "___" in filename:
|
||||
# the pattern seems to be that anything to left of the first "__" is the series name followed by issue
|
||||
filename = filename.split("__")[0]
|
||||
|
||||
filename = filename.replace("+", " ")
|
||||
|
||||
# remove parenthetical phrases
|
||||
filename = re.sub( "\(.*\)", "", filename)
|
||||
filename = re.sub( "\[.*\]", "", filename)
|
||||
|
||||
# guess based on position
|
||||
|
||||
# replace any name seperators with spaces
|
||||
@ -101,18 +107,29 @@ class FileNameParser:
|
||||
word_list[i+2] ="XXX"
|
||||
|
||||
|
||||
# first look for the last "#" followed by a digit in the filename. this is almost certainly the issue number
|
||||
#issnum = re.search('#\d+', filename)
|
||||
matchlist = re.findall("#\d+", filename)
|
||||
if len(matchlist) > 0:
|
||||
#get the last item
|
||||
issue = matchlist[ len(matchlist) - 1]
|
||||
issue = issue[1:]
|
||||
found = True
|
||||
|
||||
|
||||
# assume the last number in the filename that is under 4 digits is the issue number
|
||||
for word in reversed(word_list):
|
||||
if len(word) > 0 and word[0] == "#":
|
||||
word = word[1:]
|
||||
if (
|
||||
(word.isdigit() and len(word) < 4) or
|
||||
(self.isPointIssue(word))
|
||||
):
|
||||
issue = word
|
||||
found = True
|
||||
#print 'Assuming issue number is ' + str(issue) + ' based on the position.'
|
||||
break
|
||||
if not found:
|
||||
for word in reversed(word_list):
|
||||
if len(word) > 0 and word[0] == "#":
|
||||
word = word[1:]
|
||||
if (
|
||||
(word.isdigit() and len(word) < 4) or
|
||||
(self.isPointIssue(word))
|
||||
):
|
||||
issue = word
|
||||
found = True
|
||||
#print 'Assuming issue number is ' + str(issue) + ' based on the position.'
|
||||
break
|
||||
|
||||
if not found:
|
||||
# try a regex
|
||||
@ -133,7 +150,7 @@ class FileNameParser:
|
||||
# TODO: we really should pass in the *INDEX* of the issue, that makes
|
||||
# finding it easier
|
||||
|
||||
|
||||
filename = filename.replace("+", " ")
|
||||
tmpstr = self.fixSpaces(filename)
|
||||
|
||||
#remove pound signs. this might mess up the series name if there is a# in it.
|
||||
@ -195,9 +212,9 @@ class FileNameParser:
|
||||
# remove the first word that word is a 3 digit number.
|
||||
# some story arcs collection packs do this, but it's ugly
|
||||
# this will probably break something, i.e. "100 bullets"
|
||||
word = filename.split(' ')[0]
|
||||
if len(word) == 3 and word[0] =='0' and word.isdigit():
|
||||
filename = filename[4:]
|
||||
#word = filename.split(' ')[0]
|
||||
#if len(word) == 3 and word[0] =='0' and word.isdigit():
|
||||
# filename = filename[4:]
|
||||
# ----HACK -
|
||||
|
||||
self.issue = self.getIssueNumber(filename)
|
||||
|
@ -20,6 +20,7 @@ limitations under the License.
|
||||
"""
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
from PyQt4.QtCore import *
|
||||
from PyQt4.QtGui import *
|
||||
@ -162,6 +163,11 @@ class FileSelectionList(QWidget):
|
||||
filelist = []
|
||||
for p in pathlist:
|
||||
# if path is a folder, walk it recursivly, and all files underneath
|
||||
if type(p) == str:
|
||||
#make sure string is unicode
|
||||
filename_encoding = sys.getfilesystemencoding()
|
||||
p = p.decode(filename_encoding, 'replace')
|
||||
|
||||
if os.path.isdir( unicode(p)):
|
||||
for root,dirs,files in os.walk( unicode(p) ):
|
||||
for f in files:
|
||||
|
@ -66,7 +66,6 @@ class IssueIdentifier:
|
||||
self.length_delta_thresh = settings.id_length_delta_thresh
|
||||
|
||||
# used to eliminate unlikely publishers
|
||||
#self.publisher_blacklist = [ 'panini comics', 'abril', 'scholastic book services' ]
|
||||
self.publisher_blacklist = [ s.strip().lower() for s in settings.id_publisher_blacklist.split(',') ]
|
||||
|
||||
self.additional_metadata = GenericMetadata()
|
||||
@ -75,7 +74,7 @@ class IssueIdentifier:
|
||||
self.coverUrlCallback = None
|
||||
self.search_result = self.ResultNoMatches
|
||||
self.cover_page_index = 0
|
||||
|
||||
|
||||
def setScoreMinThreshold( self, thresh ):
|
||||
self.min_score_thresh = thresh
|
||||
|
||||
@ -86,7 +85,7 @@ class IssueIdentifier:
|
||||
self.additional_metadata = md
|
||||
|
||||
def setNameLengthDeltaThreshold( self, delta ):
|
||||
self.length_delta_thresh = md
|
||||
self.length_delta_thresh = delta
|
||||
|
||||
def setPublisherBlackList( self, blacklist ):
|
||||
self.publisher_blacklist = blacklist
|
||||
|
@ -90,6 +90,7 @@ class IssueSelectionWindow(QtGui.QDialog):
|
||||
|
||||
item_text = record['issue_number']
|
||||
item = QtGui.QTableWidgetItem(item_text)
|
||||
item.setData( QtCore.Qt.ToolTipRole, item_text )
|
||||
item.setData( QtCore.Qt.UserRole ,record['id'])
|
||||
item.setData(QtCore.Qt.DisplayRole, float(item_text))
|
||||
item.setFlags(QtCore.Qt.ItemIsSelectable| QtCore.Qt.ItemIsEnabled)
|
||||
@ -97,6 +98,7 @@ class IssueSelectionWindow(QtGui.QDialog):
|
||||
|
||||
item_text = record['name']
|
||||
item = QtGui.QTableWidgetItem(item_text)
|
||||
item.setData( QtCore.Qt.ToolTipRole, item_text )
|
||||
item.setFlags(QtCore.Qt.ItemIsSelectable| QtCore.Qt.ItemIsEnabled)
|
||||
self.twList.setItem(row, 1, item)
|
||||
|
||||
|
@ -59,6 +59,7 @@ class MatchSelectionWindow(QtGui.QDialog):
|
||||
|
||||
item_text = match['series']
|
||||
item = QtGui.QTableWidgetItem(item_text)
|
||||
item.setData( QtCore.Qt.ToolTipRole, item_text )
|
||||
item.setFlags(QtCore.Qt.ItemIsSelectable| QtCore.Qt.ItemIsEnabled)
|
||||
self.twList.setItem(row, 0, item)
|
||||
|
||||
@ -73,6 +74,7 @@ class MatchSelectionWindow(QtGui.QDialog):
|
||||
else:
|
||||
item_text = u"Unknown"
|
||||
item = QtGui.QTableWidgetItem(item_text)
|
||||
item.setData( QtCore.Qt.ToolTipRole, item_text )
|
||||
item.setFlags(QtCore.Qt.ItemIsSelectable| QtCore.Qt.ItemIsEnabled)
|
||||
self.twList.setItem(row, 1, item)
|
||||
|
||||
@ -84,6 +86,7 @@ class MatchSelectionWindow(QtGui.QDialog):
|
||||
else:
|
||||
item_text += u"????"
|
||||
item = QtGui.QTableWidgetItem(item_text)
|
||||
item.setData( QtCore.Qt.ToolTipRole, item_text )
|
||||
item.setFlags(QtCore.Qt.ItemIsSelectable| QtCore.Qt.ItemIsEnabled)
|
||||
self.twList.setItem(row, 2, item)
|
||||
|
||||
|
@ -234,7 +234,8 @@ If no options are given, {0} will run in windowed mode
|
||||
if o == "--nooverwrite":
|
||||
self.no_overwrite = True
|
||||
if o == "--version":
|
||||
print "ComicTagger version: ", ctversion.version
|
||||
print "ComicTagger {0}: Copyright (c) 2012-2013 Anthony Beville".format(ctversion.version)
|
||||
print "Distributed under Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)"
|
||||
sys.exit(0)
|
||||
if o in ("-t", "--type"):
|
||||
if a.lower() == "cr":
|
||||
|
@ -1,3 +1,11 @@
|
||||
|
||||
---------------------------------
|
||||
1.0.3-beta - ??-Jan-2013
|
||||
---------------------------------
|
||||
Changes:
|
||||
Misc bug fixes and enhancements
|
||||
|
||||
|
||||
---------------------------------
|
||||
1.0.2-beta - 25-Jan-2013
|
||||
---------------------------------
|
||||
|
@ -79,7 +79,7 @@ class SettingsWindow(QtGui.QDialog):
|
||||
|
||||
|
||||
nldtTip = (
|
||||
""" <html>The <b>Name Length Delta Threshold</b> is for eliminating automatic
|
||||
""" <html>The <b>Default Name Length Match Tolerance</b> is for eliminating automatic
|
||||
search matches that are too long compared to your series name search. The higher
|
||||
it is, the more likely to have a good match, but each search will take longer and
|
||||
use more bandwidth. Too low, and only the very closest lexical matches will be
|
||||
|
@ -263,7 +263,7 @@
|
||||
<string/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Name Length Delta Threshold:</string>
|
||||
<string>Default Name Length Match Tolerance:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@ -275,6 +275,12 @@
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>50</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string/>
|
||||
</property>
|
||||
|
145
taggerwindow.py
145
taggerwindow.py
@ -29,6 +29,7 @@ import os
|
||||
import pprint
|
||||
import json
|
||||
import webbrowser
|
||||
import re
|
||||
|
||||
from volumeselectionwindow import VolumeSelectionWindow
|
||||
from options import MetaDataStyle
|
||||
@ -122,13 +123,6 @@ class TaggerWindow( QtGui.QMainWindow):
|
||||
#self.splitter.setHandleWidth(0)
|
||||
#self.splitter.handle(1).setDisabled(True)
|
||||
|
||||
# This is ugly, and should probably be done in a resource file
|
||||
if platform.system() == "Linux":
|
||||
self.scrollAreaWidgetContents.resize( self.scrollAreaWidgetContents.width(), 630)
|
||||
#if platform.system() == "Darwin":
|
||||
# self.scrollAreaWidgetContents.resize( 550, self.scrollAreaWidgetContents.height())
|
||||
|
||||
|
||||
# we can't specify relative font sizes in the UI designer, so
|
||||
# walk through all the lablels in the main form, and make them
|
||||
# a smidge smaller
|
||||
@ -140,8 +134,8 @@ class TaggerWindow( QtGui.QMainWindow):
|
||||
f.setItalic( True )
|
||||
child.setFont( f )
|
||||
|
||||
#---------------------------
|
||||
|
||||
self.scrollAreaWidgetContents.adjustSize()
|
||||
|
||||
self.setWindowIcon(QtGui.QIcon(os.path.join(ComicTaggerSettings.baseDir(), 'graphics/app.png' )))
|
||||
|
||||
@ -201,6 +195,9 @@ class TaggerWindow( QtGui.QMainWindow):
|
||||
self.splitter.setSizes([ self.settings.last_form_side_width , self.settings.last_list_side_width])
|
||||
self.raise_()
|
||||
QtCore.QCoreApplication.processEvents()
|
||||
self.resizeEvent( None )
|
||||
|
||||
self.splitter.splitterMoved.connect( self.splitterMovedEvent )
|
||||
|
||||
self.fileSelectionList.addAppAction( self.actionAutoIdentify )
|
||||
self.fileSelectionList.addAppAction( self.actionAutoTag )
|
||||
@ -390,6 +387,7 @@ class TaggerWindow( QtGui.QMainWindow):
|
||||
if rar_count != 0:
|
||||
dlg = ExportWindow( self, self.settings,
|
||||
self.tr("You have selected {0} archive(s) to export to Zip format. New archives will be created in the same folder as the original.\n\nPlease choose options below, and select OK.\n".format(rar_count) ))
|
||||
dlg.adjustSize( )
|
||||
dlg.setModal( True )
|
||||
if not dlg.exec_():
|
||||
return
|
||||
@ -402,6 +400,9 @@ class TaggerWindow( QtGui.QMainWindow):
|
||||
|
||||
new_archives_to_add = []
|
||||
archives_to_remove = []
|
||||
skipped_list = []
|
||||
failed_list = []
|
||||
success_count = 0
|
||||
|
||||
for ca in ca_list:
|
||||
if ca.isRar():
|
||||
@ -419,11 +420,13 @@ class TaggerWindow( QtGui.QMainWindow):
|
||||
if os.path.lexists( export_name ):
|
||||
if dlg.fileConflictBehavior == ExportConflictOpts.dontCreate:
|
||||
export_name = None
|
||||
skipped_list.append( ca.path )
|
||||
elif dlg.fileConflictBehavior == ExportConflictOpts.createUnique:
|
||||
export_name = utils.unique_file( export_name )
|
||||
|
||||
if export_name is not None:
|
||||
if ca.exportAsZip( export_name ):
|
||||
success_count += 1
|
||||
if dlg.addToList:
|
||||
new_archives_to_add.append( export_name )
|
||||
if dlg.deleteOriginal:
|
||||
@ -431,15 +434,31 @@ class TaggerWindow( QtGui.QMainWindow):
|
||||
os.unlink( ca.path )
|
||||
|
||||
else:
|
||||
QtGui.QMessageBox.information(self, self.tr("Export as Zip Archive"),
|
||||
self.tr("An error occured while exporting {0} to {1}. Batch operation aborted!".format(original_path, export_name)))
|
||||
break
|
||||
# last export failed, so remove the zip, if it exists
|
||||
failed_list.append( ca.path )
|
||||
if os.path.lexists( export_name ):
|
||||
os.remove( export_name )
|
||||
|
||||
progdialog.close()
|
||||
|
||||
self.fileSelectionList.addPathList( new_archives_to_add )
|
||||
self.fileSelectionList.removeArchiveList( archives_to_remove )
|
||||
# ATB maybe show a summary of files created here...?
|
||||
|
||||
summary = u"Successfully created {0} Zip archive(s).".format( success_count )
|
||||
if len( skipped_list ) > 0:
|
||||
summary += u"\n\nThe following {0} RAR archive(s) were skipped due to file name conflicts:\n".format( len( skipped_list ) )
|
||||
for f in skipped_list:
|
||||
summary += u"\t{0}\n".format( f )
|
||||
if len( failed_list ) > 0:
|
||||
summary += u"\n\nThe following {0} RAR archive(s) failed to export due to read/write errors:\n".format( len( failed_list ) )
|
||||
for f in failed_list:
|
||||
summary += u"\t{0}\n".format( f )
|
||||
|
||||
dlg = LogWindow( self )
|
||||
dlg.setText( summary )
|
||||
dlg.setWindowTitle( "Archive Export to Zip Summary" )
|
||||
dlg.exec_()
|
||||
|
||||
|
||||
def aboutApp( self ):
|
||||
|
||||
@ -485,6 +504,7 @@ class TaggerWindow( QtGui.QMainWindow):
|
||||
def actualLoadCurrentArchive( self ):
|
||||
if self.metadata.isEmpty:
|
||||
self.metadata = self.comic_archive.metadataFromFilename( )
|
||||
if len(self.metadata.pages) == 0:
|
||||
self.metadata.setDefaultPageList( self.comic_archive.getNumberOfPages() )
|
||||
|
||||
self.updateCoverImage()
|
||||
@ -754,10 +774,13 @@ class TaggerWindow( QtGui.QMainWindow):
|
||||
item_text = role
|
||||
item = QtGui.QTableWidgetItem(item_text)
|
||||
item.setFlags(QtCore.Qt.ItemIsSelectable| QtCore.Qt.ItemIsEnabled)
|
||||
item.setData( QtCore.Qt.ToolTipRole, item_text )
|
||||
self.twCredits.setItem(row, 1, item)
|
||||
|
||||
|
||||
item_text = name
|
||||
item = QtGui.QTableWidgetItem(item_text)
|
||||
item.setData( QtCore.Qt.ToolTipRole, item_text )
|
||||
item.setFlags(QtCore.Qt.ItemIsSelectable| QtCore.Qt.ItemIsEnabled)
|
||||
self.twCredits.setItem(row, 2, item)
|
||||
|
||||
@ -988,6 +1011,7 @@ class TaggerWindow( QtGui.QMainWindow):
|
||||
self.formToMetadata()
|
||||
|
||||
success = self.comic_archive.writeMetadata( self.metadata, self.save_data_style )
|
||||
self.comic_archive.loadCache( [ MetaDataStyle.CBI, MetaDataStyle.CIX ] )
|
||||
QtGui.QApplication.restoreOverrideCursor()
|
||||
|
||||
if not success:
|
||||
@ -1388,6 +1412,8 @@ class TaggerWindow( QtGui.QMainWindow):
|
||||
progdialog.show()
|
||||
prog_idx = 0
|
||||
|
||||
failed_list = []
|
||||
success_count = 0
|
||||
for ca in ca_list:
|
||||
if ca.hasMetadata( style ):
|
||||
QtCore.QCoreApplication.processEvents()
|
||||
@ -1400,17 +1426,26 @@ class TaggerWindow( QtGui.QMainWindow):
|
||||
|
||||
if ca.hasMetadata( style ) and ca.isWritable():
|
||||
if not ca.removeMetadata( style ):
|
||||
if has_md_count == 1:
|
||||
QtGui.QMessageBox.warning(self, self.tr("Remove failed"), self.tr("The tag removal operation seemed to fail!"))
|
||||
else:
|
||||
QtGui.QMessageBox.warning(self, self.tr("Remove failed"),
|
||||
self.tr("The tag removal operation seemed to fail for {0} Operation aborted!".format(ca.path)))
|
||||
break
|
||||
failed_list.append( ca.path )
|
||||
else:
|
||||
success_count += 1
|
||||
ca.loadCache( [ MetaDataStyle.CBI, MetaDataStyle.CIX ] )
|
||||
|
||||
progdialog.close()
|
||||
self.fileSelectionList.updateSelectedRows()
|
||||
self.updateInfoBox()
|
||||
self.updateMenus()
|
||||
|
||||
summary = u"Successfully removed tags in {0} archive(s).".format( success_count )
|
||||
if len( failed_list ) > 0:
|
||||
summary += u"\n\nThe remove operation failed in the following {0} archive(s):\n".format( len( failed_list ) )
|
||||
for f in failed_list:
|
||||
summary += u"\t{0}\n".format( f )
|
||||
|
||||
dlg = LogWindow( self )
|
||||
dlg.setText( summary )
|
||||
dlg.setWindowTitle( "Tag Remove Summary" )
|
||||
dlg.exec_()
|
||||
|
||||
def copyTags( self ):
|
||||
# copy the indicated tags in the archive
|
||||
@ -1452,6 +1487,8 @@ class TaggerWindow( QtGui.QMainWindow):
|
||||
progdialog.show()
|
||||
prog_idx = 0
|
||||
|
||||
failed_list = []
|
||||
success_count = 0
|
||||
for ca in ca_list:
|
||||
if ca.hasMetadata( src_style ):
|
||||
QtCore.QCoreApplication.processEvents()
|
||||
@ -1469,16 +1506,27 @@ class TaggerWindow( QtGui.QMainWindow):
|
||||
md = CBLTransformer( md, self.settings ).apply()
|
||||
|
||||
if not ca.writeMetadata( md, dest_style ):
|
||||
if has_md_count == 1:
|
||||
QtGui.QMessageBox.warning(self, self.tr("Remove failed"), self.tr("The tag removal operation seemed to fail!"))
|
||||
else:
|
||||
QtGui.QMessageBox.warning(self, self.tr("Remove failed"),
|
||||
self.tr("The tag removal operation seemed to fail for {0} Operation aborted!".format(ca.path)))
|
||||
break
|
||||
failed_list.append( ca.path )
|
||||
else:
|
||||
success_count += 1
|
||||
|
||||
ca.loadCache( [ MetaDataStyle.CBI, MetaDataStyle.CIX ] )
|
||||
|
||||
progdialog.close()
|
||||
self.fileSelectionList.updateSelectedRows()
|
||||
self.updateInfoBox()
|
||||
self.updateMenus()
|
||||
|
||||
summary = u"Successfully copied tags in {0} archive(s).".format( success_count )
|
||||
if len( failed_list ) > 0:
|
||||
summary += u"\n\nThe copy operation failed in the following {0} archive(s):\n".format( len( failed_list ) )
|
||||
for f in failed_list:
|
||||
summary += u"\t{0}\n".format( f )
|
||||
|
||||
dlg = LogWindow( self )
|
||||
dlg.setText( summary )
|
||||
dlg.setWindowTitle( "Tag Copy Summary" )
|
||||
dlg.exec_()
|
||||
|
||||
def actualIssueDataFetch( self, match ):
|
||||
|
||||
@ -1515,8 +1563,15 @@ class TaggerWindow( QtGui.QMainWindow):
|
||||
# read in metadata, and parse file name if not there
|
||||
md = ca.readMetadata( self.save_data_style )
|
||||
if md.isEmpty:
|
||||
md = ca.metadataFromFilename()
|
||||
|
||||
md = ca.metadataFromFilename()
|
||||
if dlg.ignoreLeadingDigitsInFilename and md.series is not None:
|
||||
#remove all leading numbers
|
||||
md.series = re.sub( "([\d.]*)(.*)", "\\2", md.series)
|
||||
|
||||
# use the dialog specified search string
|
||||
if dlg.searchString is not None:
|
||||
md.series = dlg.searchString
|
||||
|
||||
if md is None or md.isEmpty:
|
||||
print "!!!!No metadata given to search online with!"
|
||||
return False, match_results
|
||||
@ -1529,7 +1584,8 @@ class TaggerWindow( QtGui.QMainWindow):
|
||||
ii.onlyUseAdditionalMetaData = True
|
||||
ii.setOutputFunction( self.autoTagLog )
|
||||
ii.cover_page_index = md.getCoverPageIndexList()[0]
|
||||
ii.setCoverURLCallback( self.atprogdialog.setTestImage )
|
||||
ii.setCoverURLCallback( self.atprogdialog.setTestImage )
|
||||
ii.setNameLengthDeltaThreshold( dlg.nameLengthMatchTolerance )
|
||||
|
||||
matches = ii.search()
|
||||
|
||||
@ -1573,8 +1629,7 @@ class TaggerWindow( QtGui.QMainWindow):
|
||||
if cv_md is None:
|
||||
match_results.fetchDataFailures.append(ca.path)
|
||||
|
||||
if cv_md is not None:
|
||||
|
||||
if cv_md is not None:
|
||||
md.overlay( cv_md )
|
||||
|
||||
if not ca.writeMetadata( md, self.save_data_style ):
|
||||
@ -1583,7 +1638,8 @@ class TaggerWindow( QtGui.QMainWindow):
|
||||
else:
|
||||
match_results.goodMatches.append(ca.path)
|
||||
success = True
|
||||
self.autoTagLog( "Save complete!\n" )
|
||||
self.autoTagLog( "Save complete!\n" )
|
||||
ca.loadCache( [ MetaDataStyle.CBI, MetaDataStyle.CIX ] )
|
||||
|
||||
return success, match_results
|
||||
|
||||
@ -1601,7 +1657,8 @@ class TaggerWindow( QtGui.QMainWindow):
|
||||
|
||||
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" ))
|
||||
"Please choose options below, and select OK to Auto-Tag.\n" ))
|
||||
atstartdlg.adjustSize( )
|
||||
atstartdlg.setModal( True )
|
||||
if not atstartdlg.exec_():
|
||||
return
|
||||
@ -1614,10 +1671,11 @@ class TaggerWindow( QtGui.QMainWindow):
|
||||
|
||||
self.autoTagLog( u"========================================================================\n" )
|
||||
self.autoTagLog( u"Auto-Tagging Started for {0} items\n".format(len(ca_list)))
|
||||
|
||||
|
||||
prog_idx = 0
|
||||
|
||||
match_results = OnlineMatchResults()
|
||||
archives_to_remove = []
|
||||
for ca in ca_list:
|
||||
self.autoTagLog( u"============================================================\n" )
|
||||
self.autoTagLog( u"Auto-Tagging {0} of {1}\n".format(prog_idx+1, len(ca_list)))
|
||||
@ -1638,8 +1696,15 @@ class TaggerWindow( QtGui.QMainWindow):
|
||||
if ca.isWritable():
|
||||
success, match_results = self.identifyAndTagSingleArchive( ca, match_results, atstartdlg )
|
||||
|
||||
self.atprogdialog.close()
|
||||
if success and atstartdlg.removeAfterSuccess:
|
||||
archives_to_remove.append( ca )
|
||||
|
||||
self.atprogdialog.close()
|
||||
|
||||
if atstartdlg.removeAfterSuccess:
|
||||
self.fileSelectionList.removeArchiveList( archives_to_remove )
|
||||
self.fileSelectionList.updateSelectedRows()
|
||||
|
||||
self.loadArchive( self.fileSelectionList.getCurrentArchive() )
|
||||
self.atprogdialog = None
|
||||
|
||||
@ -1789,4 +1854,16 @@ class TaggerWindow( QtGui.QMainWindow):
|
||||
self.actualLoadCurrentArchive()
|
||||
|
||||
def fileListCleared( self ):
|
||||
self.resetApp()
|
||||
self.resetApp()
|
||||
|
||||
def splitterMovedEvent( self, w1, w2 ):
|
||||
scrollbar_w = 0
|
||||
if self.scrollArea.verticalScrollBar().isVisible():
|
||||
scrollbar_w = self.scrollArea.verticalScrollBar().width()
|
||||
|
||||
new_w = self.scrollArea.width() - scrollbar_w - 5
|
||||
self.scrollAreaWidgetContents.resize( new_w, self.scrollAreaWidgetContents.height())
|
||||
|
||||
def resizeEvent( self, ev ):
|
||||
self.splitterMovedEvent( 0, 0)
|
||||
|
||||
|
@ -301,13 +301,13 @@
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>-64</y>
|
||||
<y>0</y>
|
||||
<width>470</width>
|
||||
<height>520</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
@ -1107,7 +1107,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1096</width>
|
||||
<height>25</height>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
</property>
|
||||
<widget class="QMenu" name="menuComicTagger">
|
||||
|
3
todo.txt
3
todo.txt
@ -12,10 +12,10 @@ Docs:
|
||||
|
||||
Look into using libarchive
|
||||
|
||||
|
||||
-----------------------------------------------------
|
||||
Bugs
|
||||
-----------------------------------------------------
|
||||
Auto-Tag doesn't save page list info!
|
||||
|
||||
Rar flakes out when a space is at the front of the subfolder in the archive.
|
||||
Zip flakes out when filename differs from index (or whatever) i.e "\" vs "/". Python issue
|
||||
@ -81,3 +81,4 @@ Release Process
|
||||
----------------------------------------------
|
||||
|
||||
|
||||
rename 's/([A-Za-z]+)(\d+)(.cb[rz])/$1 $2$3/' *.cb?
|
||||
|
@ -304,23 +304,27 @@ class VolumeSelectionWindow(QtGui.QDialog):
|
||||
|
||||
item_text = record['name']
|
||||
item = QtGui.QTableWidgetItem( item_text )
|
||||
item.setData( QtCore.Qt.ToolTipRole, item_text )
|
||||
item.setData( QtCore.Qt.UserRole ,record['id'])
|
||||
item.setFlags(QtCore.Qt.ItemIsSelectable| QtCore.Qt.ItemIsEnabled)
|
||||
self.twList.setItem(row, 0, item)
|
||||
|
||||
item_text = str(record['start_year'])
|
||||
item = QtGui.QTableWidgetItem(item_text)
|
||||
item.setData( QtCore.Qt.ToolTipRole, item_text )
|
||||
item.setFlags(QtCore.Qt.ItemIsSelectable| QtCore.Qt.ItemIsEnabled)
|
||||
self.twList.setItem(row, 1, item)
|
||||
|
||||
item_text = record['count_of_issues']
|
||||
item = QtGui.QTableWidgetItem(item_text)
|
||||
item.setData( QtCore.Qt.ToolTipRole, item_text )
|
||||
item.setData(QtCore.Qt.DisplayRole, record['count_of_issues'])
|
||||
item.setFlags(QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled)
|
||||
self.twList.setItem(row, 2, item)
|
||||
|
||||
if record['publisher'] is not None:
|
||||
item_text = record['publisher']['name']
|
||||
item.setData( QtCore.Qt.ToolTipRole, item_text )
|
||||
item = QtGui.QTableWidgetItem(item_text)
|
||||
item.setFlags(QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled)
|
||||
self.twList.setItem(row, 3, item)
|
||||
|
Reference in New Issue
Block a user