Add seriesYear attribute
Attribute is only serialized in ComicRack style metadata
This commit is contained in:
parent
c596062f55
commit
abd8019bf9
@ -40,6 +40,7 @@ class ComicBookInfo:
|
||||
metadata.publisher = utils.xlate(cbi['publisher'])
|
||||
metadata.month = utils.xlate(cbi['publicationMonth'], True)
|
||||
metadata.year = utils.xlate(cbi['publicationYear'], True)
|
||||
metadata.seriesYear = utils.xlate('seriesPublicationYear', True)
|
||||
metadata.issueCount = utils.xlate(cbi['numberOfIssues'], True)
|
||||
metadata.comments = utils.xlate(cbi['comments'])
|
||||
metadata.genre = utils.xlate(cbi['genre'])
|
||||
@ -106,6 +107,7 @@ class ComicBookInfo:
|
||||
assign('publisher', utils.xlate(metadata.publisher))
|
||||
assign('publicationMonth', utils.xlate(metadata.month, True))
|
||||
assign('publicationYear', utils.xlate(metadata.year, True))
|
||||
assign('seriesPublicationYear', utils.xlate(metadata.seriesYear, True))
|
||||
assign('numberOfIssues', utils.xlate(metadata.issueCount, True))
|
||||
assign('comments', utils.xlate(metadata.comments))
|
||||
assign('genre', utils.xlate(metadata.genre))
|
||||
|
@ -104,6 +104,7 @@ class ComicInfoXml:
|
||||
assign('Year', md.year)
|
||||
assign('Month', md.month)
|
||||
assign('Day', md.day)
|
||||
assign('SeriesYear', md.seriesYear)
|
||||
|
||||
# need to specially process the credits, since they are structured
|
||||
# differently than CIX
|
||||
@ -228,6 +229,7 @@ class ComicInfoXml:
|
||||
md.year = utils.xlate(get('Year'), True)
|
||||
md.month = utils.xlate(get('Month'), True)
|
||||
md.day = utils.xlate(get('Day'), True)
|
||||
md.seriesYear = utils.xlate('SeriesYear', True)
|
||||
md.publisher = utils.xlate(get('Publisher'))
|
||||
md.imprint = utils.xlate(get('Imprint'))
|
||||
md.genre = utils.xlate(get('Genre'))
|
||||
|
@ -65,6 +65,7 @@ class GenericMetadata:
|
||||
self.issue = None
|
||||
self.title = None
|
||||
self.publisher = None
|
||||
self.seriesYear = None
|
||||
self.month = None
|
||||
self.year = None
|
||||
self.day = None
|
||||
@ -132,6 +133,7 @@ class GenericMetadata:
|
||||
assign("issueCount", new_md.issueCount)
|
||||
assign("title", new_md.title)
|
||||
assign("publisher", new_md.publisher)
|
||||
assign("seriesYear", new_md.seriesYear)
|
||||
assign("day", new_md.day)
|
||||
assign("month", new_md.month)
|
||||
assign("year", new_md.year)
|
||||
@ -263,6 +265,7 @@ class GenericMetadata:
|
||||
add_attr_string("issueCount")
|
||||
add_attr_string("title")
|
||||
add_attr_string("publisher")
|
||||
add_attr_string("seriesYear")
|
||||
add_attr_string("year")
|
||||
add_attr_string("month")
|
||||
add_attr_string("day")
|
||||
|
@ -222,7 +222,7 @@ class ComicVineTalker(QObject):
|
||||
'format': 'json',
|
||||
'resources': 'volume',
|
||||
'query': series_name,
|
||||
'field_list': 'name,id,start_year,publisher,image,description,count_of_issues',
|
||||
'field_list': 'volume,name,id,start_year,publisher,image,description,count_of_issues',
|
||||
'page': 1
|
||||
}
|
||||
|
||||
@ -500,11 +500,12 @@ class ComicVineTalker(QObject):
|
||||
metadata.publisher = utils.xlate(volume_results['publisher']['name'])
|
||||
metadata.day, metadata.month, metadata.year = self.parseDateStr(issue_results['cover_date'])
|
||||
|
||||
#metadata.issueCount = volume_results['count_of_issues']
|
||||
metadata.seriesYear = utils.xlate(volume_results['start_year'])
|
||||
metadata.issueCount = utils.xlate(volume_results['count_of_issues'])
|
||||
metadata.comments = self.cleanup_html(
|
||||
issue_results['description'], settings.remove_html_tables)
|
||||
if settings.use_series_start_as_volume:
|
||||
metadata.volume = volume_results['start_year']
|
||||
metadata.volume = utils.xlate(volume_results['start_year'])
|
||||
|
||||
metadata.notes = "Tagged with ComicTagger {0} using info from Comic Vine on {1}. [Issue ID {2}]".format(
|
||||
ctversion.version,
|
||||
|
@ -188,6 +188,8 @@ class TaggerWindow(QtWidgets.QMainWindow):
|
||||
validator = QtGui.QIntValidator(1900, datetime.date.today().year + 15, self)
|
||||
self.lePubYear.setValidator(validator)
|
||||
|
||||
self.leSeriesPubYear.setValidator(validator)
|
||||
|
||||
validator = QtGui.QIntValidator(1, 12, self)
|
||||
self.lePubMonth.setValidator(validator)
|
||||
|
||||
@ -810,6 +812,7 @@ class TaggerWindow(QtWidgets.QMainWindow):
|
||||
assignText(self.lePubMonth, md.month)
|
||||
assignText(self.lePubYear, md.year)
|
||||
assignText(self.lePubDay, md.day)
|
||||
assignText(self.leSeriesPubYear, str(md.seriesYear or "").lstrip("0"))
|
||||
assignText(self.leGenre, md.genre)
|
||||
assignText(self.leImprint, md.imprint)
|
||||
assignText(self.teComments, md.comments)
|
||||
@ -935,6 +938,7 @@ class TaggerWindow(QtWidgets.QMainWindow):
|
||||
md.month = utils.xlate(self.lePubMonth.text(), True)
|
||||
md.year = utils.xlate(self.lePubYear.text(), True)
|
||||
md.day = utils.xlate(self.lePubDay.text(), True)
|
||||
md.seriesYear = utils.xlate(self.leSeriesPubYear.text(), "int")
|
||||
md.criticalRating = utils.xlate(self.leCriticalRating.text(), True)
|
||||
md.alternateCount = utils.xlate(self.leAltIssueCount.text(), True)
|
||||
|
||||
@ -988,6 +992,7 @@ class TaggerWindow(QtWidgets.QMainWindow):
|
||||
row += 1
|
||||
|
||||
md.pages = self.pageListEditor.getPageList()
|
||||
|
||||
self.metadata = md
|
||||
|
||||
def useFilename(self):
|
||||
|
@ -511,8 +511,18 @@
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="1">
|
||||
<widget class="QLineEdit" name="leSeriesPubYear"/>
|
||||
</item>
|
||||
<item row="9" column="1">
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="text">
|
||||
<string>Series Year</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="11" column="1">
|
||||
<widget class="QPushButton" name="btnAutoImprint">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Checks the publisher against a list of imprints.</p></body></html></string>
|
||||
|
Loading…
Reference in New Issue
Block a user