Add OverlayMode options for read style and data source
This commit is contained in:
parent
ffb4efbcd7
commit
62240bf2f4
@ -262,7 +262,7 @@ class AutoTagMatchWindow(QtWidgets.QDialog):
|
||||
return
|
||||
|
||||
QtWidgets.QApplication.setOverrideCursor(QtGui.QCursor(QtCore.Qt.CursorShape.WaitCursor))
|
||||
md.overlay(ct_md, self.config.internal__source_data_overlay)
|
||||
md.overlay(ct_md, self.config.Metadata_Options__source_overlay)
|
||||
for style in self._styles:
|
||||
success = ca.write_metadata(md, style)
|
||||
QtWidgets.QApplication.restoreOverrideCursor()
|
||||
|
@ -253,7 +253,7 @@ class CLI:
|
||||
if ca.has_metadata(style):
|
||||
try:
|
||||
t_md = ca.read_metadata(style)
|
||||
md.overlay(t_md, self.config.internal__load_data_overlay)
|
||||
md.overlay(t_md, self.config.Metadata_Options__read_style_overlay)
|
||||
break
|
||||
except Exception as e:
|
||||
logger.error("Failed to load metadata for %s: %s", ca.path, e)
|
||||
|
@ -206,6 +206,7 @@ class Metadata_Options(typing.TypedDict):
|
||||
cbl_copy_weblink_to_comments: bool
|
||||
cbl_apply_transform_on_import: bool
|
||||
cbl_apply_transform_on_bulk_operation: bool
|
||||
metadata_overlay: OverlayMode
|
||||
use_short_metadata_names: bool
|
||||
disable_cr: bool
|
||||
|
||||
|
@ -433,10 +433,10 @@ class SettingsWindow(QtWidgets.QDialog):
|
||||
self.config[0].Metadata_Options__cbl_apply_transform_on_bulk_operation
|
||||
)
|
||||
self.cbxOverlayReadStyle.setCurrentIndex(
|
||||
self.cbxOverlayReadStyle.findData(self.config[0].internal__load_data_overlay.value)
|
||||
self.cbxOverlayReadStyle.findData(self.config[0].Metadata_Options__read_style_overlay.value)
|
||||
)
|
||||
self.cbxOverlaySource.setCurrentIndex(
|
||||
self.cbxOverlaySource.findData(self.config[0].internal__source_data_overlay.value)
|
||||
self.cbxOverlaySource.findData(self.config[0].Metadata_Options__source_overlay.value)
|
||||
)
|
||||
self.cbxShortMetadataNames.setChecked(self.config[0].Metadata_Options__use_short_metadata_names)
|
||||
self.cbxDisableCR.setChecked(self.config[0].Metadata_Options__disable_cr)
|
||||
@ -570,8 +570,8 @@ class SettingsWindow(QtWidgets.QDialog):
|
||||
self.cbxApplyCBLTransformOnBatchOperation.isChecked()
|
||||
)
|
||||
|
||||
self.config[0].internal__load_data_overlay = OverlayMode[self.cbxOverlayReadStyle.currentData()]
|
||||
self.config[0].internal__source_data_overlay = OverlayMode[self.cbxOverlaySource.currentData()]
|
||||
self.config[0].Metadata_Options__read_style_overlay = OverlayMode[self.cbxOverlayReadStyle.currentData()]
|
||||
self.config[0].Metadata_Options__source_overlay = OverlayMode[self.cbxOverlaySource.currentData()]
|
||||
self.config[0].Metadata_Options__disable_cr = self.cbxDisableCR.isChecked()
|
||||
# Update metadata style names if required
|
||||
if self.config[0].Metadata_Options__use_short_metadata_names != self.cbxShortMetadataNames.isChecked():
|
||||
|
@ -755,7 +755,8 @@
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="plainText">
|
||||
<string>Overlays all the none empty values of the read style/data source (e.g. Comic Vine) metadata on top of the current metadata (i.e. file name parsing, other read style(s)).
|
||||
<string>Read Style: Overlays all the none empty values of the read style metadata on top of the current metadata (i.e. file name parsing, other read style(s)).
|
||||
Data Source: Overlays all the none empty values from the data source (e.g. Comic Vine) on top of the current metadata (i.e. file name parsing, read style(s)).
|
||||
|
||||
Example:
|
||||
(Series=batman, Issue=1, Tags=[batman,joker,robin])
|
||||
@ -792,7 +793,8 @@ Example:
|
||||
<item>
|
||||
<widget class="QPlainTextEdit" name="addTextEdit">
|
||||
<property name="plainText">
|
||||
<string>Adds any metadata that is present in the read style/data source (e.g. Comic Vine) but is missing in the current metadata (i.e. file name parsing, other read style(s)).
|
||||
<string>Read Style: Adds any metadata that is present in the read style but is missing in the current metadata (i.e. file name parsing, other read style(s)).
|
||||
Data Source: Add any metadata that is present in the data source (e.g. Comic Vine) but is missing in the current metadata (i.e. file name parsing, read style(s)).
|
||||
|
||||
Example:
|
||||
(Series=batman, Issue=1, Tags=[batman,joker,robin])
|
||||
@ -829,7 +831,8 @@ Example:
|
||||
<item>
|
||||
<widget class="QPlainTextEdit" name="combineTextEdit">
|
||||
<property name="plainText">
|
||||
<string>Combine lists (tags, characters, genres, credits, etc.) replacing duplicates with the "new" data and all other non-empty values are replaced by the "new" values.
|
||||
<string>Read Style: Same as Overlay except lists (tags, characters, genres, credits, etc.) are combined with the current metadata (i.e. file name parsing, other read style(s)).
|
||||
Data Source: Same as Overlay except lists (tags, characters, genres, credits, etc.) are combined with the current metadata (i.e. file name parsing, read style(s)).
|
||||
|
||||
Example:
|
||||
(Series=batman, Issue=1, Tags=[batman,joker,robin])
|
||||
|
Loading…
Reference in New Issue
Block a user