mirror of
https://github.com/ciromattia/kcc
synced 2026-09-29 14:12:31 +00:00
Metadata editor in bulk v2 (#1349)
* Add bulk metadata editing support
* Enable multi-file selection in Metadata Editor using getOpenFileNames()
* Disable Volume, Number, and Title fields in bulk mode
* Pre-fill Series and author fields from first selected file in bulk mode
* Show status "Editing Y files" in bulk mode
* Add progress display during bulk save ("Processing X/Y: filename")
* Disable buttons during processing
* Skip read-only CBR files with error collection
* Show error summary dialog if any files fail to save
* Keep single file metadata editing the same
* Add bulk volume editing with rich tooltip
* Add checkbox next to Volume field for enabling bulk volume editing (only in bulk mode)
* Support single number (5), range (1-10), or comma list (1, 3, 5) input formats
* Sort files alphabetically before volume assignment
* Validate that volume count matches file count
* Add rich HTML tooltip explaining the feature
* Move bulkVolumeCheck widget definition to MetaEditor.ui
* Define bulkVolumeCheck QCheckBox in MetaEditor.ui instead of creating it programmatically in KCC_gui.py
* Update tab order to include bulkVolumeCheck after volumeLine
* Add multi-directory selection for bulk metadata editing
* Shift+click on editor button now opens multi-directory selection dialog
* Multiple directories enable bulk mode with volume number assignment
* Uses Qt's built-in dialog with multi-selection enabled for native look and feel
* Fix volume input validation in bulk metadata editor
* Handle invalid range formats like "1-2-3" or "--" that previously fell through, now returns an error message
* Add explicit check for empty/malformed range parts before attempting to parse
* Add positive number validation for all input types (range, comma-list, single number) to be consistent with single file mode which uses isnumeric()
* Add explicit validation for empty volumes list after parsing
* Keep metadata editor dialog open when error occur during bulks save
* Fix CBR read-only check in bulk metadata editor
* Check all files for CBR format during load instead of during save
* Unify the CBR check for single and bulk mode
* Handle mixed metadata values in bulk editing
* In bulk mode, compare Series + Writer/Penciller/Inker/Colorist across all selected files (instead of using only the first file)
* When values differ, show “(multiple values)” placeholder for that field
* Add hover tooltip with overwrite warning and a File|Value table (or Value|Count summary when there are >20 files)
* Code comments cleanup
* Use ExtendedSelection for multi-directory file dialog
* use !=
This commit is contained in:
@@ -15,9 +15,9 @@ from PySide6.QtGui import (QBrush, QColor, QConicalGradient, QCursor,
|
||||
QFont, QFontDatabase, QGradient, QIcon,
|
||||
QImage, QKeySequence, QLinearGradient, QPainter,
|
||||
QPalette, QPixmap, QRadialGradient, QTransform)
|
||||
from PySide6.QtWidgets import (QApplication, QDialog, QGridLayout, QHBoxLayout,
|
||||
QLabel, QLineEdit, QPushButton, QSizePolicy,
|
||||
QVBoxLayout, QWidget)
|
||||
from PySide6.QtWidgets import (QApplication, QCheckBox, QDialog, QGridLayout,
|
||||
QHBoxLayout, QLabel, QLineEdit, QPushButton,
|
||||
QSizePolicy, QVBoxLayout, QWidget)
|
||||
from . import KCC_rc
|
||||
|
||||
class Ui_editorDialog(object):
|
||||
@@ -57,6 +57,12 @@ class Ui_editorDialog(object):
|
||||
|
||||
self.gridLayout.addWidget(self.volumeLine, 1, 1, 1, 1)
|
||||
|
||||
self.bulkVolumeCheck = QCheckBox(self.editorWidget)
|
||||
self.bulkVolumeCheck.setObjectName(u"bulkVolumeCheck")
|
||||
self.bulkVolumeCheck.setVisible(False)
|
||||
|
||||
self.gridLayout.addWidget(self.bulkVolumeCheck, 1, 2, 1, 1)
|
||||
|
||||
self.label_3 = QLabel(self.editorWidget)
|
||||
self.label_3.setObjectName(u"label_3")
|
||||
|
||||
@@ -157,7 +163,8 @@ class Ui_editorDialog(object):
|
||||
self.verticalLayout.addWidget(self.optionWidget)
|
||||
|
||||
QWidget.setTabOrder(self.seriesLine, self.volumeLine)
|
||||
QWidget.setTabOrder(self.volumeLine, self.titleLine)
|
||||
QWidget.setTabOrder(self.volumeLine, self.bulkVolumeCheck)
|
||||
QWidget.setTabOrder(self.bulkVolumeCheck, self.titleLine)
|
||||
QWidget.setTabOrder(self.titleLine, self.numberLine)
|
||||
QWidget.setTabOrder(self.numberLine, self.writerLine)
|
||||
QWidget.setTabOrder(self.writerLine, self.pencillerLine)
|
||||
@@ -175,6 +182,10 @@ class Ui_editorDialog(object):
|
||||
editorDialog.setWindowTitle(QCoreApplication.translate("editorDialog", u"Metadata editor", None))
|
||||
self.label_1.setText(QCoreApplication.translate("editorDialog", u"Series:", None))
|
||||
self.label_2.setText(QCoreApplication.translate("editorDialog", u"Volume:", None))
|
||||
#if QT_CONFIG(tooltip)
|
||||
self.bulkVolumeCheck.setToolTip(QCoreApplication.translate("editorDialog", u"<b>Bulk Volume Editing</b><br>Check this box to assign volume numbers to multiple files.<br><br><b>Input formats:</b><br><code>5</code> \u2192 sequence starting from 5 (5, 6, 7...)<br><code>1-10</code> \u2192 range from 1 to 10<br><code>1, 3, 5</code> \u2192 specific values<br><br><i>Note: Files are sorted alphabetically before assignment.</i>", None))
|
||||
#endif // QT_CONFIG(tooltip)
|
||||
self.bulkVolumeCheck.setText("")
|
||||
self.label_3.setText(QCoreApplication.translate("editorDialog", u"Number:", None))
|
||||
self.label_4.setText(QCoreApplication.translate("editorDialog", u"Writer:", None))
|
||||
self.label_5.setText(QCoreApplication.translate("editorDialog", u"Penciller:", None))
|
||||
|
||||
Reference in New Issue
Block a user