class Ui_MainWindow(object):
    def setupUi(self, MainWindow):
        MainWindow.setObjectName("MainWindow")
        MainWindow.resize(1920, 993)
        icon = QtGui.QIcon()
        icon.addPixmap(QtGui.QPixmap("pypordb/8027068_splash.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        MainWindow.setWindowIcon(icon)
        self.centralwidget = QtWidgets.QWidget(MainWindow)
        self.centralwidget.setObjectName("centralwidget")
        self.gridLayout_4 = QtWidgets.QGridLayout(self.centralwidget)
        self.gridLayout_4.setObjectName("gridLayout_4")
        self.splitter = QtWidgets.QSplitter(self.centralwidget)
        self.splitter.setOrientation(QtCore.Qt.Horizontal)
        self.splitter.setHandleWidth(4)
        self.splitter.setChildrenCollapsible(True)
        self.splitter.setObjectName("splitter")
        self.layoutWidget = QtWidgets.QWidget(self.splitter)
        self.layoutWidget.setObjectName("layoutWidget")
        self.verticalLayout = QtWidgets.QVBoxLayout(self.layoutWidget)
        self.verticalLayout.setContentsMargins(0, 0, 0, 0)
        self.verticalLayout.setObjectName("verticalLayout")
        self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_2.setObjectName("horizontalLayout_2")
        self.label_akt_verzeichnis = QtWidgets.QLabel(self.layoutWidget)
        self.label_akt_verzeichnis.setObjectName("label_akt_verzeichnis")
        self.horizontalLayout_2.addWidget(self.label_akt_verzeichnis)
        self.pushButtonRefresh = QtWidgets.QPushButton(self.layoutWidget)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.pushButtonRefresh.sizePolicy().hasHeightForWidth())
        self.pushButtonRefresh.setSizePolicy(sizePolicy)
        self.pushButtonRefresh.setMaximumSize(QtCore.QSize(20, 20))
        self.pushButtonRefresh.setText("")
        icon1 = QtGui.QIcon()
        icon1.addPixmap(QtGui.QPixmap("pypordb/appointment-recurring.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.pushButtonRefresh.setIcon(icon1)
        self.pushButtonRefresh.setObjectName("pushButtonRefresh")
        self.horizontalLayout_2.addWidget(self.pushButtonRefresh)
        self.pushButtonDir = QtWidgets.QPushButton(self.layoutWidget)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.pushButtonDir.sizePolicy().hasHeightForWidth())
        self.pushButtonDir.setSizePolicy(sizePolicy)
        self.pushButtonDir.setMaximumSize(QtCore.QSize(20, 20))
        self.pushButtonDir.setText("")
        icon2 = QtGui.QIcon()
        icon2.addPixmap(QtGui.QPixmap("pypordb/folder.svg"), QtGui.QIcon.Active, QtGui.QIcon.On)
        self.pushButtonDir.setIcon(icon2)
        self.pushButtonDir.setObjectName("pushButtonDir")
        self.horizontalLayout_2.addWidget(self.pushButtonDir)
        self.verticalLayout.addLayout(self.horizontalLayout_2)
        self.tableWidgetBilderAktuell = QtWidgets.QTableWidget(self.layoutWidget)
        self.tableWidgetBilderAktuell.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
        self.tableWidgetBilderAktuell.setEditTriggers(QtWidgets.QAbstractItemView.NoEditTriggers)
        self.tableWidgetBilderAktuell.setDragEnabled(True)
        self.tableWidgetBilderAktuell.setDragDropMode(QtWidgets.QAbstractItemView.DragOnly)
        self.tableWidgetBilderAktuell.setDefaultDropAction(QtCore.Qt.CopyAction)
        self.tableWidgetBilderAktuell.setSelectionMode(QtWidgets.QAbstractItemView.ExtendedSelection)
        self.tableWidgetBilderAktuell.setObjectName("tableWidgetBilderAktuell")
        self.tableWidgetBilderAktuell.setColumnCount(0)
        self.tableWidgetBilderAktuell.setRowCount(0)
        self.tableWidgetBilderAktuell.horizontalHeader().setVisible(False)
        self.verticalLayout.addWidget(self.tableWidgetBilderAktuell)
        self.tabWidget = QtWidgets.QTabWidget(self.splitter)
        self.tabWidget.setFocusPolicy(QtCore.Qt.NoFocus)
        self.tabWidget.setObjectName("tabWidget")
        self.tab_1 = QtWidgets.QWidget()
        self.tab_1.setObjectName("tab_1")
        self.gridLayout_5 = QtWidgets.QGridLayout(self.tab_1)
        self.gridLayout_5.setObjectName("gridLayout_5")
        self.tableWidgetBilder = QtWidgets.QTableWidget(self.tab_1)
        font = QtGui.QFont()
        font.setPointSize(9)
        self.tableWidgetBilder.setFont(font)
        self.tableWidgetBilder.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
        self.tableWidgetBilder.setAcceptDrops(True)
        self.tableWidgetBilder.setEditTriggers(QtWidgets.QAbstractItemView.NoEditTriggers)
        self.tableWidgetBilder.setDragDropMode(QtWidgets.QAbstractItemView.DropOnly)
        self.tableWidgetBilder.setDefaultDropAction(QtCore.Qt.CopyAction)
        self.tableWidgetBilder.setIconSize(QtCore.QSize(0, 0))
        self.tableWidgetBilder.setObjectName("tableWidgetBilder")
        self.tableWidgetBilder.setColumnCount(0)
        self.tableWidgetBilder.setRowCount(0)
        self.tableWidgetBilder.horizontalHeader().setDefaultSectionSize(499)
        self.tableWidgetBilder.verticalHeader().setDefaultSectionSize(200)
        self.gridLayout_5.addWidget(self.tableWidgetBilder, 0, 0, 1, 1)
        self.tabWidget.addTab(self.tab_1, "")
        self.tab_2 = QtWidgets.QWidget()
        self.tab_2.setObjectName("tab_2")
        self.horizontalLayout_19 = QtWidgets.QHBoxLayout(self.tab_2)
        self.horizontalLayout_19.setObjectName("horizontalLayout_19")
        self.horizontalLayout_9 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_9.setObjectName("horizontalLayout_9")
        self.verticalLayout_12 = QtWidgets.QVBoxLayout()
        self.verticalLayout_12.setObjectName("verticalLayout_12")
        self.labelDarsteller = QtWidgets.QLabel(self.tab_2)
        self.labelDarsteller.setMinimumSize(QtCore.QSize(391, 16))
        self.labelDarsteller.setMaximumSize(QtCore.QSize(391, 16))
        font = QtGui.QFont()
        font.setBold(True)
        font.setWeight(75)
        self.labelDarsteller.setFont(font)
        self.labelDarsteller.setText("")
        self.labelDarsteller.setAlignment(QtCore.Qt.AlignCenter)
        self.labelDarsteller.setObjectName("labelDarsteller")
        self.verticalLayout_12.addWidget(self.labelDarsteller)
        self.frame = QtWidgets.QFrame(self.tab_2)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.frame.sizePolicy().hasHeightForWidth())
        self.frame.setSizePolicy(sizePolicy)
        self.frame.setMinimumSize(QtCore.QSize(400, 0))
        self.frame.setFrameShape(QtWidgets.QFrame.StyledPanel)
        self.frame.setFrameShadow(QtWidgets.QFrame.Raised)
        self.frame.setObjectName("frame")
        self.gridLayout_6 = QtWidgets.QGridLayout(self.frame)
        self.gridLayout_6.setObjectName("gridLayout_6")
        self.labelBildanzeige = QtWidgets.QLabel(self.frame)
        self.labelBildanzeige.setMinimumSize(QtCore.QSize(0, 0))
        self.labelBildanzeige.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
        self.labelBildanzeige.setAcceptDrops(True)
        self.labelBildanzeige.setLayoutDirection(QtCore.Qt.LeftToRight)
        self.labelBildanzeige.setText("")
        self.labelBildanzeige.setAlignment(QtCore.Qt.AlignHCenter|QtCore.Qt.AlignTop)
        self.labelBildanzeige.setObjectName("labelBildanzeige")
        self.gridLayout_6.addWidget(self.labelBildanzeige, 0, 0, 1, 1)
        self.verticalLayout_12.addWidget(self.frame)
        self.horizontalLayout_9.addLayout(self.verticalLayout_12)
        self.frame_2 = QtWidgets.QFrame(self.tab_2)
        self.frame_2.setMinimumSize(QtCore.QSize(0, 0))
        self.frame_2.setMaximumSize(QtCore.QSize(590, 16777215))
        self.frame_2.setFrameShape(QtWidgets.QFrame.StyledPanel)
        self.frame_2.setFrameShadow(QtWidgets.QFrame.Raised)
        self.frame_2.setObjectName("frame_2")
        self.gridLayout_3 = QtWidgets.QGridLayout(self.frame_2)
        self.gridLayout_3.setObjectName("gridLayout_3")
        self.horizontalLayout_7 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_7.setObjectName("horizontalLayout_7")
        self.bildAnzeige = QtWidgets.QPushButton(self.frame_2)
        self.bildAnzeige.setMinimumSize(QtCore.QSize(24, 24))
        self.bildAnzeige.setMaximumSize(QtCore.QSize(24, 24))
        self.bildAnzeige.setText("")
        icon3 = QtGui.QIcon()
        icon3.addPixmap(QtGui.QPixmap("pypordb/bild.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.bildAnzeige.setIcon(icon3)
        self.bildAnzeige.setIconSize(QtCore.QSize(10, 10))
        self.bildAnzeige.setObjectName("bildAnzeige")
        self.horizontalLayout_7.addWidget(self.bildAnzeige)
        self.comboBoxSex = QtWidgets.QComboBox(self.frame_2)
        self.comboBoxSex.setMinimumSize(QtCore.QSize(72, 24))
        self.comboBoxSex.setMaximumSize(QtCore.QSize(90, 24))
        self.comboBoxSex.setIconSize(QtCore.QSize(16, 10))
        self.comboBoxSex.setObjectName("comboBoxSex")
        self.comboBoxSex.addItem("")
        icon4 = QtGui.QIcon()
        icon4.addPixmap(QtGui.QPixmap("pypordb/male.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.comboBoxSex.addItem(icon4, "")
        icon5 = QtGui.QIcon()
        icon5.addPixmap(QtGui.QPixmap("pypordb/female.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.comboBoxSex.addItem(icon5, "")
        self.horizontalLayout_7.addWidget(self.comboBoxSex)
        self.pushButtonDarstellerSuchen = QtWidgets.QPushButton(self.frame_2)
        self.pushButtonDarstellerSuchen.setMinimumSize(QtCore.QSize(24, 24))
        self.pushButtonDarstellerSuchen.setMaximumSize(QtCore.QSize(24, 24))
        self.pushButtonDarstellerSuchen.setText("")
        icon6 = QtGui.QIcon()
        icon6.addPixmap(QtGui.QPixmap("pypordb/suchen.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.pushButtonDarstellerSuchen.setIcon(icon6)
        self.pushButtonDarstellerSuchen.setIconSize(QtCore.QSize(10, 10))
        self.pushButtonDarstellerSuchen.setObjectName("pushButtonDarstellerSuchen")
        self.horizontalLayout_7.addWidget(self.pushButtonDarstellerSuchen)
        self.pushButtonUmbenennen = QtWidgets.QPushButton(self.frame_2)
        self.pushButtonUmbenennen.setMinimumSize(QtCore.QSize(24, 24))
        self.pushButtonUmbenennen.setMaximumSize(QtCore.QSize(24, 24))
        self.pushButtonUmbenennen.setText("")
        icon7 = QtGui.QIcon()
        icon7.addPixmap(QtGui.QPixmap("pypordb/umbenennen.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.pushButtonUmbenennen.setIcon(icon7)
        self.pushButtonUmbenennen.setIconSize(QtCore.QSize(10, 10))
        self.pushButtonUmbenennen.setObjectName("pushButtonUmbenennen")
        self.horizontalLayout_7.addWidget(self.pushButtonUmbenennen)
        self.labelAktiv = QtWidgets.QLabel(self.frame_2)
        self.labelAktiv.setMinimumSize(QtCore.QSize(70, 0))
        self.labelAktiv.setText("")
        self.labelAktiv.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
        self.labelAktiv.setObjectName("labelAktiv")
        self.horizontalLayout_7.addWidget(self.labelAktiv)
        self.gridLayout_3.addLayout(self.horizontalLayout_7, 0, 0, 1, 1)
        self.verticalLayout_6 = QtWidgets.QVBoxLayout()
        self.verticalLayout_6.setObjectName("verticalLayout_6")
        self.gridLayout_2 = QtWidgets.QGridLayout()
        self.gridLayout_2.setObjectName("gridLayout_2")
        self.label_9 = QtWidgets.QLabel(self.frame_2)
        self.label_9.setMaximumSize(QtCore.QSize(41, 16))
        self.label_9.setObjectName("label_9")
        self.gridLayout_2.addWidget(self.label_9, 0, 1, 1, 1)
        self.labelFilme = QtWidgets.QLabel(self.frame_2)
        self.labelFilme.setMaximumSize(QtCore.QSize(41, 16))
        self.labelFilme.setWhatsThis("")
        self.labelFilme.setText("")
        self.labelFilme.setObjectName("labelFilme")
        self.gridLayout_2.addWidget(self.labelFilme, 0, 2, 1, 1)
        self.label_8 = QtWidgets.QLabel(self.frame_2)
        self.label_8.setMinimumSize(QtCore.QSize(41, 16))
        self.label_8.setMaximumSize(QtCore.QSize(41, 16))
        self.label_8.setObjectName("label_8")
        self.gridLayout_2.addWidget(self.label_8, 1, 1, 1, 1)
        self.labelAlter = QtWidgets.QLabel(self.frame_2)
        self.labelAlter.setMinimumSize(QtCore.QSize(61, 20))
        self.labelAlter.setMaximumSize(QtCore.QSize(61, 20))
        self.labelAlter.setText("")
        self.labelAlter.setObjectName("labelAlter")
        self.gridLayout_2.addWidget(self.labelAlter, 1, 2, 1, 1)
        self.labelFehler = QtWidgets.QLabel(self.frame_2)
        self.labelFehler.setMinimumSize(QtCore.QSize(391, 16))
        self.labelFehler.setMaximumSize(QtCore.QSize(391, 16))
        self.labelFehler.setText("")
        self.labelFehler.setObjectName("labelFehler")
        self.gridLayout_2.addWidget(self.labelFehler, 0, 0, 1, 1)
        self.verticalLayout_6.addLayout(self.gridLayout_2)
        self.verticalLayout_5 = QtWidgets.QVBoxLayout()
        self.verticalLayout_5.setObjectName("verticalLayout_5")
        self.horizontalLayout_4 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_4.setObjectName("horizontalLayout_4")
        self.verticalLayout_4 = QtWidgets.QVBoxLayout()
        self.verticalLayout_4.setObjectName("verticalLayout_4")
        self.horizontalLayout_5 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_5.setObjectName("horizontalLayout_5")
        self.labelText = QtWidgets.QLabel(self.frame_2)
        self.labelText.setText("")
        self.labelText.setObjectName("labelText")
        self.horizontalLayout_5.addWidget(self.labelText)
        self.comboBoxEthnicFilter = QtWidgets.QComboBox(self.frame_2)
        self.comboBoxEthnicFilter.setMaximumSize(QtCore.QSize(50, 26))
        self.comboBoxEthnicFilter.setIconSize(QtCore.QSize(16, 10))
        self.comboBoxEthnicFilter.setObjectName("comboBoxEthnicFilter")
        self.comboBoxEthnicFilter.addItem("")
        self.comboBoxEthnicFilter.setItemText(0, "")
        icon8 = QtGui.QIcon()
        icon8.addPixmap(QtGui.QPixmap("pypordb/white.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.comboBoxEthnicFilter.addItem(icon8, "")
        icon9 = QtGui.QIcon()
        icon9.addPixmap(QtGui.QPixmap("pypordb/yellow.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.comboBoxEthnicFilter.addItem(icon9, "")
        icon10 = QtGui.QIcon()
        icon10.addPixmap(QtGui.QPixmap("pypordb/black.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.comboBoxEthnicFilter.addItem(icon10, "")
        icon11 = QtGui.QIcon()
        icon11.addPixmap(QtGui.QPixmap("pypordb/brown.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.comboBoxEthnicFilter.addItem(icon11, "")
        self.horizontalLayout_5.addWidget(self.comboBoxEthnicFilter)
        self.comboBoxCSFilter = QtWidgets.QComboBox(self.frame_2)
        self.comboBoxCSFilter.setMinimumSize(QtCore.QSize(140, 0))
        self.comboBoxCSFilter.setMaximumSize(QtCore.QSize(160, 29))
        self.comboBoxCSFilter.setIconSize(QtCore.QSize(16, 10))
        self.comboBoxCSFilter.setObjectName("comboBoxCSFilter")
        self.comboBoxCSFilter.addItem("")
        self.comboBoxCSFilter.setItemText(0, "")
        self.comboBoxCSFilter.addItem("")
        self.comboBoxCSFilter.addItem("")
        self.comboBoxCSFilter.addItem("")
        self.comboBoxCSFilter.addItem("")
        self.comboBoxCSFilter.addItem("")
        self.comboBoxCSFilter.addItem("")
        self.comboBoxCSFilter.addItem("")
        self.comboBoxCSFilter.addItem("")
        self.comboBoxCSFilter.addItem("")
        self.comboBoxCSFilter.addItem("")
        self.horizontalLayout_5.addWidget(self.comboBoxCSFilter)
        self.pushButtonSortPartner = QtWidgets.QPushButton(self.frame_2)
        self.pushButtonSortPartner.setIconSize(QtCore.QSize(16, 10))
        self.pushButtonSortPartner.setObjectName("pushButtonSortPartner")
        self.horizontalLayout_5.addWidget(self.pushButtonSortPartner)
        self.verticalLayout_4.addLayout(self.horizontalLayout_5)
        self.listWidgetDarsteller = QtWidgets.QListWidget(self.frame_2)
        self.listWidgetDarsteller.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
        self.listWidgetDarsteller.setObjectName("listWidgetDarsteller")
        self.verticalLayout_4.addWidget(self.listWidgetDarsteller)
        self.horizontalLayout_6 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_6.setObjectName("horizontalLayout_6")
        self.pushButtonPartnerZeigen = QtWidgets.QPushButton(self.frame_2)
        self.pushButtonPartnerZeigen.setText("")
        icon12 = QtGui.QIcon()
        icon12.addPixmap(QtGui.QPixmap("pypordb/darsteller.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.pushButtonPartnerZeigen.setIcon(icon12)
        self.pushButtonPartnerZeigen.setIconSize(QtCore.QSize(16, 10))
        self.pushButtonPartnerZeigen.setObjectName("pushButtonPartnerZeigen")
        self.horizontalLayout_6.addWidget(self.pushButtonPartnerZeigen)
        self.pushButtonPseudo = QtWidgets.QPushButton(self.frame_2)
        self.pushButtonPseudo.setText("")
        icon13 = QtGui.QIcon()
        icon13.addPixmap(QtGui.QPixmap("pypordb/alias.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.pushButtonPseudo.setIcon(icon13)
        self.pushButtonPseudo.setIconSize(QtCore.QSize(16, 10))
        self.pushButtonPseudo.setObjectName("pushButtonPseudo")
        self.horizontalLayout_6.addWidget(self.pushButtonPseudo)
        self.verticalLayout_4.addLayout(self.horizontalLayout_6)
        self.horizontalLayout_4.addLayout(self.verticalLayout_4)
        self.verticalLayout_2 = QtWidgets.QVBoxLayout()
        self.verticalLayout_2.setObjectName("verticalLayout_2")
        self.label_16 = QtWidgets.QLabel(self.frame_2)
        self.label_16.setMinimumSize(QtCore.QSize(0, 23))
        self.label_16.setObjectName("label_16")
        self.verticalLayout_2.addWidget(self.label_16)
        self.listWidgetStatistik = QtWidgets.QListWidget(self.frame_2)
        font = QtGui.QFont()
        font.setFamily("Monospace")
        font.setPointSize(8)
        self.listWidgetStatistik.setFont(font)
        self.listWidgetStatistik.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
        self.listWidgetStatistik.setObjectName("listWidgetStatistik")
        self.verticalLayout_2.addWidget(self.listWidgetStatistik)
        self.horizontalLayout_3 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_3.setObjectName("horizontalLayout_3")
        self.label_17 = QtWidgets.QLabel(self.frame_2)
        self.label_17.setObjectName("label_17")
        self.horizontalLayout_3.addWidget(self.label_17)
        self.lineEditFilter = QtWidgets.QLineEdit(self.frame_2)
        self.lineEditFilter.setObjectName("lineEditFilter")
        self.horizontalLayout_3.addWidget(self.lineEditFilter)
        self.pushButtonSort = QtWidgets.QPushButton(self.frame_2)
        self.pushButtonSort.setIconSize(QtCore.QSize(16, 10))
        self.pushButtonSort.setObjectName("pushButtonSort")
        self.horizontalLayout_3.addWidget(self.pushButtonSort)
        self.verticalLayout_2.addLayout(self.horizontalLayout_3)
        self.listWidgetFilme = QtWidgets.QListWidget(self.frame_2)
        self.listWidgetFilme.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
        self.listWidgetFilme.setObjectName("listWidgetFilme")
        self.verticalLayout_2.addWidget(self.listWidgetFilme)
        self.horizontalLayout_4.addLayout(self.verticalLayout_2)
        self.verticalLayout_5.addLayout(self.horizontalLayout_4)
        self.gridLayout = QtWidgets.QGridLayout()
        self.gridLayout.setObjectName("gridLayout")
        self.horizontalLayout_15 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_15.setObjectName("horizontalLayout_15")
        self.label_4 = QtWidgets.QLabel(self.frame_2)
        self.label_4.setMaximumSize(QtCore.QSize(45, 18))
        self.label_4.setObjectName("label_4")
        self.horizontalLayout_15.addWidget(self.label_4)
        self.comboBoxNation = QtWidgets.QComboBox(self.frame_2)
        self.comboBoxNation.setObjectName("comboBoxNation")
        self.horizontalLayout_15.addWidget(self.comboBoxNation)
        self.gridLayout.addLayout(self.horizontalLayout_15, 1, 0, 1, 1)
        self.horizontalLayout_10 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_10.setObjectName("horizontalLayout_10")
        self.label = QtWidgets.QLabel(self.frame_2)
        self.label.setObjectName("label")
        self.horizontalLayout_10.addWidget(self.label)
        self.comboBoxGeschlecht = QtWidgets.QComboBox(self.frame_2)
        self.comboBoxGeschlecht.setIconSize(QtCore.QSize(16, 10))
        self.comboBoxGeschlecht.setObjectName("comboBoxGeschlecht")
        self.comboBoxGeschlecht.addItem(icon5, "")
        self.comboBoxGeschlecht.addItem(icon4, "")
        self.horizontalLayout_10.addWidget(self.comboBoxGeschlecht)
        self.label_2 = QtWidgets.QLabel(self.frame_2)
        self.label_2.setObjectName("label_2")
        self.horizontalLayout_10.addWidget(self.label_2)
        self.lineEditAnzahl = QtWidgets.QLineEdit(self.frame_2)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.lineEditAnzahl.sizePolicy().hasHeightForWidth())
        self.lineEditAnzahl.setSizePolicy(sizePolicy)
        self.lineEditAnzahl.setMaximumSize(QtCore.QSize(41, 16777215))
        self.lineEditAnzahl.setObjectName("lineEditAnzahl")
        self.horizontalLayout_10.addWidget(self.lineEditAnzahl)
        self.label_7 = QtWidgets.QLabel(self.frame_2)
        self.label_7.setObjectName("label_7")
        self.horizontalLayout_10.addWidget(self.label_7)
        self.lineEditGeboren = QtWidgets.QLineEdit(self.frame_2)
        self.lineEditGeboren.setMaximumSize(QtCore.QSize(98, 16777215))
        self.lineEditGeboren.setObjectName("lineEditGeboren")
        self.horizontalLayout_10.addWidget(self.lineEditGeboren)
        self.label_3 = QtWidgets.QLabel(self.frame_2)
        self.label_3.setObjectName("label_3")
        self.horizontalLayout_10.addWidget(self.label_3)
        self.comboBoxHaarfarbe = QtWidgets.QComboBox(self.frame_2)
        self.comboBoxHaarfarbe.setIconSize(QtCore.QSize(16, 10))
        self.comboBoxHaarfarbe.setObjectName("comboBoxHaarfarbe")
        icon14 = QtGui.QIcon()
        icon14.addPixmap(QtGui.QPixmap("pypordb/bald.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.comboBoxHaarfarbe.addItem(icon14, "")
        icon15 = QtGui.QIcon()
        icon15.addPixmap(QtGui.QPixmap("pypordb/blond.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.comboBoxHaarfarbe.addItem(icon15, "")
        self.comboBoxHaarfarbe.addItem(icon11, "")
        icon16 = QtGui.QIcon()
        icon16.addPixmap(QtGui.QPixmap("pypordb/grey.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.comboBoxHaarfarbe.addItem(icon16, "")
        icon17 = QtGui.QIcon()
        icon17.addPixmap(QtGui.QPixmap("pypordb/red.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.comboBoxHaarfarbe.addItem(icon17, "")
        self.comboBoxHaarfarbe.addItem(icon10, "")
        self.horizontalLayout_10.addWidget(self.comboBoxHaarfarbe)
        spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout_10.addItem(spacerItem)
        self.gridLayout.addLayout(self.horizontalLayout_10, 0, 0, 1, 1)
        self.horizontalLayout_12 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_12.setObjectName("horizontalLayout_12")
        self.label_5 = QtWidgets.QLabel(self.frame_2)
        self.label_5.setMaximumSize(QtCore.QSize(45, 18))
        self.label_5.setObjectName("label_5")
        self.horizontalLayout_12.addWidget(self.label_5)
        self.lineEditTattoo = QtWidgets.QLineEdit(self.frame_2)
        self.lineEditTattoo.setObjectName("lineEditTattoo")
        self.horizontalLayout_12.addWidget(self.lineEditTattoo)
        self.gridLayout.addLayout(self.horizontalLayout_12, 2, 0, 1, 1)
        self.horizontalLayout = QtWidgets.QHBoxLayout()
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.label_6 = QtWidgets.QLabel(self.frame_2)
        self.label_6.setMaximumSize(QtCore.QSize(45, 18))
        self.label_6.setObjectName("label_6")
        self.horizontalLayout.addWidget(self.label_6)
        self.comboBoxEthnic = QtWidgets.QComboBox(self.frame_2)
        self.comboBoxEthnic.setMaximumSize(QtCore.QSize(16777215, 16777215))
        self.comboBoxEthnic.setIconSize(QtCore.QSize(16, 10))
        self.comboBoxEthnic.setObjectName("comboBoxEthnic")
        self.comboBoxEthnic.addItem(icon8, "")
        self.comboBoxEthnic.addItem(icon9, "")
        self.comboBoxEthnic.addItem(icon10, "")
        self.comboBoxEthnic.addItem(icon11, "")
        self.horizontalLayout.addWidget(self.comboBoxEthnic)
        self.pushButtonIAFDholen = QtWidgets.QPushButton(self.frame_2)
        self.pushButtonIAFDholen.setMaximumSize(QtCore.QSize(24, 24))
        icon18 = QtGui.QIcon()
        icon18.addPixmap(QtGui.QPixmap("pypordb/favicon.ico"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.pushButtonIAFDholen.setIcon(icon18)
        self.pushButtonIAFDholen.setIconSize(QtCore.QSize(10, 10))
        self.pushButtonIAFDholen.setObjectName("pushButtonIAFDholen")
        self.horizontalLayout.addWidget(self.pushButtonIAFDholen)
        self.pushButtonDarstellerspeichern = QtWidgets.QPushButton(self.frame_2)
        self.pushButtonDarstellerspeichern.setMaximumSize(QtCore.QSize(24, 24))
        self.pushButtonDarstellerspeichern.setText("")
        icon19 = QtGui.QIcon()
        icon19.addPixmap(QtGui.QPixmap("pypordb/media-floppy.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.pushButtonDarstellerspeichern.setIcon(icon19)
        self.pushButtonDarstellerspeichern.setIconSize(QtCore.QSize(10, 10))
        self.pushButtonDarstellerspeichern.setObjectName("pushButtonDarstellerspeichern")
        self.horizontalLayout.addWidget(self.pushButtonDarstellerspeichern)
        self.pushButtonIAFDBackground = QtWidgets.QPushButton(self.frame_2)
        self.pushButtonIAFDBackground.setMaximumSize(QtCore.QSize(24, 24))
        self.pushButtonIAFDBackground.setIcon(icon1)
        self.pushButtonIAFDBackground.setIconSize(QtCore.QSize(10, 10))
        self.pushButtonIAFDBackground.setObjectName("pushButtonIAFDBackground")
        self.horizontalLayout.addWidget(self.pushButtonIAFDBackground)
        spacerItem1 = QtWidgets.QSpacerItem(40, 10, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout.addItem(spacerItem1)
        self.pushButtonDarstellerLoeschen = QtWidgets.QPushButton(self.frame_2)
        self.pushButtonDarstellerLoeschen.setMaximumSize(QtCore.QSize(24, 24))
        self.pushButtonDarstellerLoeschen.setText("")
        icon20 = QtGui.QIcon()
        icon20.addPixmap(QtGui.QPixmap("pypordb/user-trash.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.pushButtonDarstellerLoeschen.setIcon(icon20)
        self.pushButtonDarstellerLoeschen.setIconSize(QtCore.QSize(10, 10))
        self.pushButtonDarstellerLoeschen.setObjectName("pushButtonDarstellerLoeschen")
        self.horizontalLayout.addWidget(self.pushButtonDarstellerLoeschen)
        self.gridLayout.addLayout(self.horizontalLayout, 3, 0, 1, 1)
        self.verticalLayout_5.addLayout(self.gridLayout)
        self.verticalLayout_6.addLayout(self.verticalLayout_5)
        self.gridLayout_3.addLayout(self.verticalLayout_6, 1, 0, 1, 1)
        self.horizontalLayout_9.addWidget(self.frame_2)
        self.horizontalLayout_19.addLayout(self.horizontalLayout_9)
        self.tabWidget.addTab(self.tab_2, "")
        self.tab_3 = QtWidgets.QWidget()
        self.tab_3.setObjectName("tab_3")
        self.gridLayout_9 = QtWidgets.QGridLayout(self.tab_3)
        self.gridLayout_9.setObjectName("gridLayout_9")
        self.verticalLayout_3 = QtWidgets.QVBoxLayout()
        self.verticalLayout_3.setObjectName("verticalLayout_3")
        self.horizontalLayout_20 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_20.setObjectName("horizontalLayout_20")
        self.pushButtonClear = QtWidgets.QPushButton(self.tab_3)
        icon21 = QtGui.QIcon()
        icon21.addPixmap(QtGui.QPixmap("pypordb/clear.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.pushButtonClear.setIcon(icon21)
        self.pushButtonClear.setObjectName("pushButtonClear")
        self.horizontalLayout_20.addWidget(self.pushButtonClear)
        self.lineEditSuchen = QtWidgets.QLineEdit(self.tab_3)
        self.lineEditSuchen.setObjectName("lineEditSuchen")
        self.horizontalLayout_20.addWidget(self.lineEditSuchen)
        self.horizontalLayout_11 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_11.setObjectName("horizontalLayout_11")
        self.label_18 = QtWidgets.QLabel(self.tab_3)
        self.label_18.setObjectName("label_18")
        self.horizontalLayout_11.addWidget(self.label_18)
        self.lineEditFilesizeFrom = QtWidgets.QLineEdit(self.tab_3)
        self.lineEditFilesizeFrom.setObjectName("lineEditFilesizeFrom")
        self.horizontalLayout_11.addWidget(self.lineEditFilesizeFrom)
        self.label_19 = QtWidgets.QLabel(self.tab_3)
        self.label_19.setObjectName("label_19")
        self.horizontalLayout_11.addWidget(self.label_19)
        self.lineEditFilesizeTo = QtWidgets.QLineEdit(self.tab_3)
        self.lineEditFilesizeTo.setToolTip("")
        self.lineEditFilesizeTo.setObjectName("lineEditFilesizeTo")
        self.horizontalLayout_11.addWidget(self.lineEditFilesizeTo)
        self.comboBoxFilesizeUnit = QtWidgets.QComboBox(self.tab_3)
        self.comboBoxFilesizeUnit.setToolTip("")
        self.comboBoxFilesizeUnit.setObjectName("comboBoxFilesizeUnit")
        self.comboBoxFilesizeUnit.addItem("")
        self.comboBoxFilesizeUnit.addItem("")
        self.comboBoxFilesizeUnit.addItem("")
        self.horizontalLayout_11.addWidget(self.comboBoxFilesizeUnit)
        self.horizontalLayout_20.addLayout(self.horizontalLayout_11)
        self.pushButtonSuchen = QtWidgets.QPushButton(self.tab_3)
        self.pushButtonSuchen.setText("")
        self.pushButtonSuchen.setIcon(icon6)
        self.pushButtonSuchen.setIconSize(QtCore.QSize(10, 10))
        self.pushButtonSuchen.setObjectName("pushButtonSuchen")
        self.horizontalLayout_20.addWidget(self.pushButtonSuchen)
        self.pushButtonUebernehmen = QtWidgets.QPushButton(self.tab_3)
        self.pushButtonUebernehmen.setWhatsThis("")
        self.pushButtonUebernehmen.setText("")
        icon22 = QtGui.QIcon()
        icon22.addPixmap(QtGui.QPixmap("pypordb/go-up.svg"), QtGui.QIcon.Active, QtGui.QIcon.On)
        self.pushButtonUebernehmen.setIcon(icon22)
        self.pushButtonUebernehmen.setIconSize(QtCore.QSize(10, 10))
        self.pushButtonUebernehmen.setObjectName("pushButtonUebernehmen")
        self.horizontalLayout_20.addWidget(self.pushButtonUebernehmen)
        self.verticalLayout_3.addLayout(self.horizontalLayout_20)
        self.splitter_2 = QtWidgets.QSplitter(self.tab_3)
        self.splitter_2.setOrientation(QtCore.Qt.Vertical)
        self.splitter_2.setObjectName("splitter_2")
        self.groupBox_2 = QtWidgets.QGroupBox(self.splitter_2)
        self.groupBox_2.setObjectName("groupBox_2")
        self.gridLayout_7 = QtWidgets.QGridLayout(self.groupBox_2)
        self.gridLayout_7.setObjectName("gridLayout_7")
        self.horizontalLayout_21 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_21.setObjectName("horizontalLayout_21")
        self.labelMpgGefunden = QtWidgets.QLabel(self.groupBox_2)
        self.labelMpgGefunden.setMinimumSize(QtCore.QSize(126, 14))
        self.labelMpgGefunden.setObjectName("labelMpgGefunden")
        self.horizontalLayout_21.addWidget(self.labelMpgGefunden)
        self.lineEditSearchMpg = QtWidgets.QLineEdit(self.groupBox_2)
        self.lineEditSearchMpg.setObjectName("lineEditSearchMpg")
        self.horizontalLayout_21.addWidget(self.lineEditSearchMpg)
        self.pushButtonSearchMpg = QtWidgets.QPushButton(self.groupBox_2)
        self.pushButtonSearchMpg.setText("")
        self.pushButtonSearchMpg.setIcon(icon6)
        self.pushButtonSearchMpg.setIconSize(QtCore.QSize(10, 10))
        self.pushButtonSearchMpg.setObjectName("pushButtonSearchMpg")
        self.horizontalLayout_21.addWidget(self.pushButtonSearchMpg)
        self.pushButtonFilterMpgKatalog = QtWidgets.QPushButton(self.groupBox_2)
        self.pushButtonFilterMpgKatalog.setText("")
        icon23 = QtGui.QIcon()
        icon23.addPixmap(QtGui.QPixmap("pypordb/filter.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.pushButtonFilterMpgKatalog.setIcon(icon23)
        self.pushButtonFilterMpgKatalog.setIconSize(QtCore.QSize(10, 10))
        self.pushButtonFilterMpgKatalog.setObjectName("pushButtonFilterMpgKatalog")
        self.horizontalLayout_21.addWidget(self.pushButtonFilterMpgKatalog)
        self.labelMpgFound = QtWidgets.QLabel(self.groupBox_2)
        self.labelMpgFound.setText("")
        self.labelMpgFound.setObjectName("labelMpgFound")
        self.horizontalLayout_21.addWidget(self.labelMpgFound)
        spacerItem2 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout_21.addItem(spacerItem2)
        self.pushButtonDelete = QtWidgets.QPushButton(self.groupBox_2)
        self.pushButtonDelete.setText("")
        icon24 = QtGui.QIcon()
        icon24.addPixmap(QtGui.QPixmap("pypordb/user-trash.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.pushButtonDelete.setIcon(icon24)
        self.pushButtonDelete.setIconSize(QtCore.QSize(10, 10))
        self.pushButtonDelete.setObjectName("pushButtonDelete")
        self.horizontalLayout_21.addWidget(self.pushButtonDelete)
        self.gridLayout_7.addLayout(self.horizontalLayout_21, 0, 0, 1, 1)
        self.tableWidget = QtWidgets.QTableWidget(self.groupBox_2)
        self.tableWidget.setToolTip("")
        self.tableWidget.setObjectName("tableWidget")
        self.tableWidget.setColumnCount(0)
        self.tableWidget.setRowCount(0)
        self.gridLayout_7.addWidget(self.tableWidget, 1, 0, 1, 1)
        self.groupBox_3 = QtWidgets.QGroupBox(self.splitter_2)
        self.groupBox_3.setObjectName("groupBox_3")
        self.gridLayout_8 = QtWidgets.QGridLayout(self.groupBox_3)
        self.gridLayout_8.setObjectName("gridLayout_8")
        self.horizontalLayout_22 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_22.setObjectName("horizontalLayout_22")
        self.labelVidGefunden = QtWidgets.QLabel(self.groupBox_3)
        self.labelVidGefunden.setMinimumSize(QtCore.QSize(126, 0))
        self.labelVidGefunden.setMaximumSize(QtCore.QSize(140, 16777215))
        self.labelVidGefunden.setObjectName("labelVidGefunden")
        self.horizontalLayout_22.addWidget(self.labelVidGefunden)
        self.lineEditSearchVid = QtWidgets.QLineEdit(self.groupBox_3)
        self.lineEditSearchVid.setObjectName("lineEditSearchVid")
        self.horizontalLayout_22.addWidget(self.lineEditSearchVid)
        self.pushButtonSearchVid = QtWidgets.QPushButton(self.groupBox_3)
        self.pushButtonSearchVid.setText("")
        self.pushButtonSearchVid.setIcon(icon6)
        self.pushButtonSearchVid.setIconSize(QtCore.QSize(10, 10))
        self.pushButtonSearchVid.setObjectName("pushButtonSearchVid")
        self.horizontalLayout_22.addWidget(self.pushButtonSearchVid)
        self.pushButtonFilterVid = QtWidgets.QPushButton(self.groupBox_3)
        self.pushButtonFilterVid.setText("")
        self.pushButtonFilterVid.setIcon(icon23)
        self.pushButtonFilterVid.setIconSize(QtCore.QSize(10, 10))
        self.pushButtonFilterVid.setObjectName("pushButtonFilterVid")
        self.horizontalLayout_22.addWidget(self.pushButtonFilterVid)
        self.labelVidFound = QtWidgets.QLabel(self.groupBox_3)
        self.labelVidFound.setText("")
        self.labelVidFound.setObjectName("labelVidFound")
        self.horizontalLayout_22.addWidget(self.labelVidFound)
        spacerItem3 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout_22.addItem(spacerItem3)
        self.gridLayout_8.addLayout(self.horizontalLayout_22, 0, 0, 1, 1)
        self.tableWidget1 = QtWidgets.QTableWidget(self.groupBox_3)
        self.tableWidget1.setToolTip("")
        self.tableWidget1.setObjectName("tableWidget1")
        self.tableWidget1.setColumnCount(0)
        self.tableWidget1.setRowCount(0)
        self.gridLayout_8.addWidget(self.tableWidget1, 1, 0, 1, 1)
        self.verticalLayout_3.addWidget(self.splitter_2)
        self.gridLayout_9.addLayout(self.verticalLayout_3, 0, 0, 1, 1)
        self.tabWidget.addTab(self.tab_3, "")
        self.tab_4 = QtWidgets.QWidget()
        self.tab_4.setObjectName("tab_4")
        self.gridLayout_10 = QtWidgets.QGridLayout(self.tab_4)
        self.gridLayout_10.setObjectName("gridLayout_10")
        self.verticalLayout_10 = QtWidgets.QVBoxLayout()
        self.verticalLayout_10.setObjectName("verticalLayout_10")
        self.horizontalLayout_14 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_14.setObjectName("horizontalLayout_14")
        self.pushButtonBack = QtWidgets.QPushButton(self.tab_4)
        self.pushButtonBack.setText("")
        icon25 = QtGui.QIcon()
        icon25.addPixmap(QtGui.QPixmap("pypordb/go-previous.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.pushButtonBack.setIcon(icon25)
        self.pushButtonBack.setIconSize(QtCore.QSize(10, 10))
        self.pushButtonBack.setObjectName("pushButtonBack")
        self.horizontalLayout_14.addWidget(self.pushButtonBack)
        self.pushButtonForward = QtWidgets.QPushButton(self.tab_4)
        self.pushButtonForward.setText("")
        icon26 = QtGui.QIcon()
        icon26.addPixmap(QtGui.QPixmap("pypordb/go-next.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.pushButtonForward.setIcon(icon26)
        self.pushButtonForward.setIconSize(QtCore.QSize(10, 10))
        self.pushButtonForward.setObjectName("pushButtonForward")
        self.horizontalLayout_14.addWidget(self.pushButtonForward)
        self.pushButtonIAFD = QtWidgets.QPushButton(self.tab_4)
        self.pushButtonIAFD.setText("")
        self.pushButtonIAFD.setIcon(icon18)
        self.pushButtonIAFD.setIconSize(QtCore.QSize(10, 10))
        self.pushButtonIAFD.setObjectName("pushButtonIAFD")
        self.horizontalLayout_14.addWidget(self.pushButtonIAFD)
        self.lineEditSearchWebsite = QtWidgets.QLineEdit(self.tab_4)
        self.lineEditSearchWebsite.setMaximumSize(QtCore.QSize(200, 16777215))
        self.lineEditSearchWebsite.setObjectName("lineEditSearchWebsite")
        self.horizontalLayout_14.addWidget(self.lineEditSearchWebsite)
        self.pushButtonClearSearch = QtWidgets.QPushButton(self.tab_4)
        self.pushButtonClearSearch.setText("")
        icon27 = QtGui.QIcon()
        icon27.addPixmap(QtGui.QPixmap("pypordb/clear_l.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.pushButtonClearSearch.setIcon(icon27)
        self.pushButtonClearSearch.setIconSize(QtCore.QSize(10, 10))
        self.pushButtonClearSearch.setObjectName("pushButtonClearSearch")
        self.horizontalLayout_14.addWidget(self.pushButtonClearSearch)
        self.pushButtonSearchWebsite = QtWidgets.QPushButton(self.tab_4)
        self.pushButtonSearchWebsite.setText("")
        self.pushButtonSearchWebsite.setIcon(icon6)
        self.pushButtonSearchWebsite.setIconSize(QtCore.QSize(10, 10))
        self.pushButtonSearchWebsite.setObjectName("pushButtonSearchWebsite")
        self.horizontalLayout_14.addWidget(self.pushButtonSearchWebsite)
        self.pushButtonVideo = QtWidgets.QPushButton(self.tab_4)
        self.pushButtonVideo.setText("")
        icon28 = QtGui.QIcon()
        icon28.addPixmap(QtGui.QPixmap("pypordb/video.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.pushButtonVideo.setIcon(icon28)
        self.pushButtonVideo.setIconSize(QtCore.QSize(10, 10))
        self.pushButtonVideo.setObjectName("pushButtonVideo")
        self.horizontalLayout_14.addWidget(self.pushButtonVideo)
        self.pushButtonAbholen = QtWidgets.QPushButton(self.tab_4)
        self.pushButtonAbholen.setText("")
        icon29 = QtGui.QIcon()
        icon29.addPixmap(QtGui.QPixmap("pypordb/user-identity.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.pushButtonAbholen.setIcon(icon29)
        self.pushButtonAbholen.setIconSize(QtCore.QSize(10, 10))
        self.pushButtonAbholen.setObjectName("pushButtonAbholen")
        self.horizontalLayout_14.addWidget(self.pushButtonAbholen)
        self.pushButtonMovie = QtWidgets.QPushButton(self.tab_4)
        self.pushButtonMovie.setText("")
        icon30 = QtGui.QIcon()
        icon30.addPixmap(QtGui.QPixmap("pypordb/add.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.pushButtonMovie.setIcon(icon30)
        self.pushButtonMovie.setIconSize(QtCore.QSize(10, 10))
        self.pushButtonMovie.setObjectName("pushButtonMovie")
        self.horizontalLayout_14.addWidget(self.pushButtonMovie)
        self.lineEditURL = QtWidgets.QLineEdit(self.tab_4)
        self.lineEditURL.setObjectName("lineEditURL")
        self.horizontalLayout_14.addWidget(self.lineEditURL)
        self.pushButtonClearURL = QtWidgets.QPushButton(self.tab_4)
        self.pushButtonClearURL.setText("")
        self.pushButtonClearURL.setIcon(icon27)
        self.pushButtonClearURL.setIconSize(QtCore.QSize(10, 10))
        self.pushButtonClearURL.setObjectName("pushButtonClearURL")
        self.horizontalLayout_14.addWidget(self.pushButtonClearURL)
        self.pushButtonUrl = QtWidgets.QPushButton(self.tab_4)
        self.pushButtonUrl.setText("")
        icon31 = QtGui.QIcon()
        icon31.addPixmap(QtGui.QPixmap("pypordb/bookmarks.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.pushButtonUrl.setIcon(icon31)
        self.pushButtonUrl.setIconSize(QtCore.QSize(10, 10))
        self.pushButtonUrl.setObjectName("pushButtonUrl")
        self.horizontalLayout_14.addWidget(self.pushButtonUrl)
        self.verticalLayout_10.addLayout(self.horizontalLayout_14)
        self.webView = QtWebEngineWidgets.QWebEngineView(self.tab_4)
        self.webView.setContextMenuPolicy(QtCore.Qt.DefaultContextMenu)
        self.webView.setObjectName("webView")
        self.verticalLayout_10.addWidget(self.webView)
        self.gridLayout_10.addLayout(self.verticalLayout_10, 0, 0, 1, 1)
        self.tabWidget.addTab(self.tab_4, "")
        self.tab_5 = QtWidgets.QWidget()
        self.tab_5.setObjectName("tab_5")
        self.gridLayout_11 = QtWidgets.QGridLayout(self.tab_5)
        self.gridLayout_11.setObjectName("gridLayout_11")
        self.horizontalLayout_13 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_13.setObjectName("horizontalLayout_13")
        self.tableWidgetStatistik = QtWidgets.QTableWidget(self.tab_5)
        self.tableWidgetStatistik.setObjectName("tableWidgetStatistik")
        self.tableWidgetStatistik.setColumnCount(0)
        self.tableWidgetStatistik.setRowCount(0)
        self.horizontalLayout_13.addWidget(self.tableWidgetStatistik)
        self.verticalLayout_11 = QtWidgets.QVBoxLayout()
        self.verticalLayout_11.setObjectName("verticalLayout_11")
        self.pushButtonCS = QtWidgets.QPushButton(self.tab_5)
        icon32 = QtGui.QIcon()
        icon32.addPixmap(QtGui.QPixmap("pypordb/cumshot.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.pushButtonCS.setIcon(icon32)
        self.pushButtonCS.setIconSize(QtCore.QSize(36, 16))
        self.pushButtonCS.setObjectName("pushButtonCS")
        self.verticalLayout_11.addWidget(self.pushButtonCS)
        self.horizontalLayout_17 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_17.setObjectName("horizontalLayout_17")
        self.pushButtonDarstellerW = QtWidgets.QPushButton(self.tab_5)
        self.pushButtonDarstellerW.setIcon(icon5)
        self.pushButtonDarstellerW.setObjectName("pushButtonDarstellerW")
        self.horizontalLayout_17.addWidget(self.pushButtonDarstellerW)
        self.lineEditAnzahlW = QtWidgets.QLineEdit(self.tab_5)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.lineEditAnzahlW.sizePolicy().hasHeightForWidth())
        self.lineEditAnzahlW.setSizePolicy(sizePolicy)
        self.lineEditAnzahlW.setMaximumSize(QtCore.QSize(41, 16777215))
        self.lineEditAnzahlW.setMaxLength(4)
        self.lineEditAnzahlW.setObjectName("lineEditAnzahlW")
        self.horizontalLayout_17.addWidget(self.lineEditAnzahlW)
        self.verticalLayout_11.addLayout(self.horizontalLayout_17)
        self.horizontalLayout_8 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_8.setObjectName("horizontalLayout_8")
        self.pushButtonDarstellerM = QtWidgets.QPushButton(self.tab_5)
        self.pushButtonDarstellerM.setIcon(icon4)
        self.pushButtonDarstellerM.setObjectName("pushButtonDarstellerM")
        self.horizontalLayout_8.addWidget(self.pushButtonDarstellerM)
        self.lineEditAnzahlM = QtWidgets.QLineEdit(self.tab_5)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.lineEditAnzahlM.sizePolicy().hasHeightForWidth())
        self.lineEditAnzahlM.setSizePolicy(sizePolicy)
        self.lineEditAnzahlM.setMaximumSize(QtCore.QSize(41, 16777215))
        self.lineEditAnzahlM.setMaxLength(4)
        self.lineEditAnzahlM.setObjectName("lineEditAnzahlM")
        self.horizontalLayout_8.addWidget(self.lineEditAnzahlM)
        self.verticalLayout_11.addLayout(self.horizontalLayout_8)
        self.pushButtonAnzahlClips = QtWidgets.QPushButton(self.tab_5)
        icon33 = QtGui.QIcon()
        icon33.addPixmap(QtGui.QPixmap("pypordb/quantity.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.pushButtonAnzahlClips.setIcon(icon33)
        self.pushButtonAnzahlClips.setIconSize(QtCore.QSize(36, 16))
        self.pushButtonAnzahlClips.setObjectName("pushButtonAnzahlClips")
        self.verticalLayout_11.addWidget(self.pushButtonAnzahlClips)
        self.pushButtonClipsJahr = QtWidgets.QPushButton(self.tab_5)
        self.pushButtonClipsJahr.setIcon(icon28)
        self.pushButtonClipsJahr.setObjectName("pushButtonClipsJahr")
        self.verticalLayout_11.addWidget(self.pushButtonClipsJahr)
        spacerItem4 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
        self.verticalLayout_11.addItem(spacerItem4)
        self.horizontalLayout_13.addLayout(self.verticalLayout_11)
        self.gridLayout_11.addLayout(self.horizontalLayout_13, 0, 0, 1, 1)
        self.tabWidget.addTab(self.tab_5, "")
        self.tab_6 = QtWidgets.QWidget()
        self.tab_6.setObjectName("tab_6")
        self.gridLayout_12 = QtWidgets.QGridLayout(self.tab_6)
        self.gridLayout_12.setObjectName("gridLayout_12")
        self.verticalLayout_8 = QtWidgets.QVBoxLayout()
        self.verticalLayout_8.setObjectName("verticalLayout_8")
        self.verticalLayout_14 = QtWidgets.QVBoxLayout()
        self.verticalLayout_14.setObjectName("verticalLayout_14")
        self.gridLayout_14 = QtWidgets.QGridLayout()
        self.gridLayout_14.setObjectName("gridLayout_14")
        self.checkBoxPictures = QtWidgets.QCheckBox(self.tab_6)
        self.checkBoxPictures.setMaximumSize(QtCore.QSize(100, 16777215))
        self.checkBoxPictures.setChecked(True)
        self.checkBoxPictures.setObjectName("checkBoxPictures")
        self.gridLayout_14.addWidget(self.checkBoxPictures, 2, 2, 1, 1)
        self.pushButtonBackup = QtWidgets.QPushButton(self.tab_6)
        icon34 = QtGui.QIcon()
        icon34.addPixmap(QtGui.QPixmap("pypordb/backup.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.pushButtonBackup.setIcon(icon34)
        self.pushButtonBackup.setObjectName("pushButtonBackup")
        self.gridLayout_14.addWidget(self.pushButtonBackup, 2, 0, 1, 1)
        self.pushButtonRestore = QtWidgets.QPushButton(self.tab_6)
        icon35 = QtGui.QIcon()
        icon35.addPixmap(QtGui.QPixmap("pypordb/restore.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.pushButtonRestore.setIcon(icon35)
        self.pushButtonRestore.setObjectName("pushButtonRestore")
        self.gridLayout_14.addWidget(self.pushButtonRestore, 3, 0, 1, 1)
        self.pushButtonWartung = QtWidgets.QPushButton(self.tab_6)
        icon36 = QtGui.QIcon()
        icon36.addPixmap(QtGui.QPixmap("pypordb/database.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.pushButtonWartung.setIcon(icon36)
        self.pushButtonWartung.setObjectName("pushButtonWartung")
        self.gridLayout_14.addWidget(self.pushButtonWartung, 4, 0, 1, 1)
        self.pushButtonDateikatalog = QtWidgets.QPushButton(self.tab_6)
        icon37 = QtGui.QIcon()
        icon37.addPixmap(QtGui.QPixmap("pypordb/catalog.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.pushButtonDateikatalog.setIcon(icon37)
        self.pushButtonDateikatalog.setCheckable(True)
        self.pushButtonDateikatalog.setObjectName("pushButtonDateikatalog")
        self.gridLayout_14.addWidget(self.pushButtonDateikatalog, 5, 0, 1, 1)
        self.checkBoxDatabase = QtWidgets.QCheckBox(self.tab_6)
        self.checkBoxDatabase.setMaximumSize(QtCore.QSize(100, 16777215))
        self.checkBoxDatabase.setChecked(True)
        self.checkBoxDatabase.setObjectName("checkBoxDatabase")
        self.gridLayout_14.addWidget(self.checkBoxDatabase, 2, 1, 1, 1)
        self.horizontalLayout_25 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_25.setObjectName("horizontalLayout_25")
        self.pushButtonCheckNewVersion = QtWidgets.QPushButton(self.tab_6)
        icon38 = QtGui.QIcon()
        icon38.addPixmap(QtGui.QPixmap("pypordb/check_new_version.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.pushButtonCheckNewVersion.setIcon(icon38)
        self.pushButtonCheckNewVersion.setObjectName("pushButtonCheckNewVersion")
        self.horizontalLayout_25.addWidget(self.pushButtonCheckNewVersion)
        self.pushButtonSuchbegriffe = QtWidgets.QPushButton(self.tab_6)
        icon39 = QtGui.QIcon()
        icon39.addPixmap(QtGui.QPixmap("pypordb/kdict.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.pushButtonSuchbegriffe.setIcon(icon39)
        self.pushButtonSuchbegriffe.setObjectName("pushButtonSuchbegriffe")
        self.horizontalLayout_25.addWidget(self.pushButtonSuchbegriffe)
        self.pushButtonLand = QtWidgets.QPushButton(self.tab_6)
        icon40 = QtGui.QIcon()
        icon40.addPixmap(QtGui.QPixmap("pypordb/land.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.pushButtonLand.setIcon(icon40)
        self.pushButtonLand.setObjectName("pushButtonLand")
        self.horizontalLayout_25.addWidget(self.pushButtonLand)
        self.gridLayout_14.addLayout(self.horizontalLayout_25, 1, 0, 1, 1)
        self.verticalLayout_14.addLayout(self.gridLayout_14)
        self.verticalLayout_8.addLayout(self.verticalLayout_14)
        self.frame_Dateikatalog = QtWidgets.QFrame(self.tab_6)
        self.frame_Dateikatalog.setMinimumSize(QtCore.QSize(200, 200))
        self.frame_Dateikatalog.setFrameShape(QtWidgets.QFrame.StyledPanel)
        self.frame_Dateikatalog.setFrameShadow(QtWidgets.QFrame.Raised)
        self.frame_Dateikatalog.setObjectName("frame_Dateikatalog")
        self.horizontalLayout_24 = QtWidgets.QHBoxLayout(self.frame_Dateikatalog)
        self.horizontalLayout_24.setObjectName("horizontalLayout_24")
        self.verticalLayout_7 = QtWidgets.QVBoxLayout()
        self.verticalLayout_7.setObjectName("verticalLayout_7")
        self.horizontalLayout_16 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_16.setObjectName("horizontalLayout_16")
        self.label_14 = QtWidgets.QLabel(self.frame_Dateikatalog)
        self.label_14.setObjectName("label_14")
        self.horizontalLayout_16.addWidget(self.label_14)
        self.comboBoxDevice = QtWidgets.QComboBox(self.frame_Dateikatalog)
        self.comboBoxDevice.setObjectName("comboBoxDevice")
        self.horizontalLayout_16.addWidget(self.comboBoxDevice)
        self.pushButtonVerwalten = QtWidgets.QPushButton(self.frame_Dateikatalog)
        self.pushButtonVerwalten.setToolTip("")
        icon41 = QtGui.QIcon()
        icon41.addPixmap(QtGui.QPixmap("pypordb/disk.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.pushButtonVerwalten.setIcon(icon41)
        self.pushButtonVerwalten.setObjectName("pushButtonVerwalten")
        self.horizontalLayout_16.addWidget(self.pushButtonVerwalten)
        self.checkBoxSubdirectories = QtWidgets.QCheckBox(self.frame_Dateikatalog)
        self.checkBoxSubdirectories.setObjectName("checkBoxSubdirectories")
        self.horizontalLayout_16.addWidget(self.checkBoxSubdirectories)
        self.pushButtonStart = QtWidgets.QPushButton(self.frame_Dateikatalog)
        icon42 = QtGui.QIcon()
        icon42.addPixmap(QtGui.QPixmap("pypordb/run.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.pushButtonStart.setIcon(icon42)
        self.pushButtonStart.setObjectName("pushButtonStart")
        self.horizontalLayout_16.addWidget(self.pushButtonStart)
        spacerItem5 = QtWidgets.QSpacerItem(278, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout_16.addItem(spacerItem5)
        self.verticalLayout_7.addLayout(self.horizontalLayout_16)
        self.line = QtWidgets.QFrame(self.frame_Dateikatalog)
        self.line.setFrameShape(QtWidgets.QFrame.HLine)
        self.line.setFrameShadow(QtWidgets.QFrame.Sunken)
        self.line.setObjectName("line")
        self.verticalLayout_7.addWidget(self.line)
        self.label_15 = QtWidgets.QLabel(self.frame_Dateikatalog)
        self.label_15.setObjectName("label_15")
        self.verticalLayout_7.addWidget(self.label_15)
        self.tableWidgetDubletten = QtWidgets.QTableWidget(self.frame_Dateikatalog)
        self.tableWidgetDubletten.setObjectName("tableWidgetDubletten")
        self.tableWidgetDubletten.setColumnCount(0)
        self.tableWidgetDubletten.setRowCount(0)
        self.verticalLayout_7.addWidget(self.tableWidgetDubletten)
        self.horizontalLayout_18 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_18.setObjectName("horizontalLayout_18")
        self.pushButtonDeleteDuplicates = QtWidgets.QPushButton(self.frame_Dateikatalog)
        self.pushButtonDeleteDuplicates.setIcon(icon24)
        self.pushButtonDeleteDuplicates.setObjectName("pushButtonDeleteDuplicates")
        self.horizontalLayout_18.addWidget(self.pushButtonDeleteDuplicates)
        self.pushButtonDeselect = QtWidgets.QPushButton(self.frame_Dateikatalog)
        icon43 = QtGui.QIcon()
        icon43.addPixmap(QtGui.QPixmap("pypordb/unselect.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.pushButtonDeselect.setIcon(icon43)
        self.pushButtonDeselect.setObjectName("pushButtonDeselect")
        self.horizontalLayout_18.addWidget(self.pushButtonDeselect)
        self.verticalLayout_7.addLayout(self.horizontalLayout_18)
        self.horizontalLayout_23 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_23.setObjectName("horizontalLayout_23")
        self.labelCurrentFile = QtWidgets.QLabel(self.frame_Dateikatalog)
        self.labelCurrentFile.setMaximumSize(QtCore.QSize(16777215, 16777215))
        self.labelCurrentFile.setText("")
        self.labelCurrentFile.setObjectName("labelCurrentFile")
        self.horizontalLayout_23.addWidget(self.labelCurrentFile)
        self.labelMessage = QtWidgets.QLabel(self.frame_Dateikatalog)
        self.labelMessage.setMaximumSize(QtCore.QSize(16777215, 16777215))
        self.labelMessage.setText("")
        self.labelMessage.setObjectName("labelMessage")
        self.horizontalLayout_23.addWidget(self.labelMessage)
        self.verticalLayout_7.addLayout(self.horizontalLayout_23)
        self.horizontalLayout_24.addLayout(self.verticalLayout_7)
        self.verticalLayout_8.addWidget(self.frame_Dateikatalog)
        spacerItem6 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
        self.verticalLayout_8.addItem(spacerItem6)
        self.gridLayout_12.addLayout(self.verticalLayout_8, 0, 0, 1, 1)
        self.tabWidget.addTab(self.tab_6, "")
        self.gridLayout_4.addWidget(self.splitter, 0, 0, 1, 1)
        MainWindow.setCentralWidget(self.centralwidget)
        self.statusBar = QtWidgets.QStatusBar(MainWindow)
        self.statusBar.setObjectName("statusBar")
        MainWindow.setStatusBar(self.statusBar)
        self.toolBar = QtWidgets.QToolBar(MainWindow)
        self.toolBar.setFocusPolicy(QtCore.Qt.StrongFocus)
        self.toolBar.setContextMenuPolicy(QtCore.Qt.PreventContextMenu)
        self.toolBar.setMovable(False)
        self.toolBar.setFloatable(False)
        self.toolBar.setObjectName("toolBar")
        MainWindow.addToolBar(QtCore.Qt.TopToolBarArea, self.toolBar)
        self.actionDarsteller = QtWidgets.QAction(MainWindow)
        self.actionDarsteller.setIcon(icon12)
        self.actionDarsteller.setObjectName("actionDarsteller")
        self.actionCd = QtWidgets.QAction(MainWindow)
        icon44 = QtGui.QIcon()
        icon44.addPixmap(QtGui.QPixmap("pypordb/cd.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.actionCd.setIcon(icon44)
        self.actionCd.setObjectName("actionCd")
        self.actionTitel = QtWidgets.QAction(MainWindow)
        icon45 = QtGui.QIcon()
        icon45.addPixmap(QtGui.QPixmap("pypordb/titel.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.actionTitel.setIcon(icon45)
        self.actionTitel.setObjectName("actionTitel")
        self.actionOriginal = QtWidgets.QAction(MainWindow)
        icon46 = QtGui.QIcon()
        icon46.addPixmap(QtGui.QPixmap("pypordb/original.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.actionOriginal.setIcon(icon46)
        self.actionOriginal.setObjectName("actionOriginal")
        self.actionVid = QtWidgets.QAction(MainWindow)
        self.actionVid.setCheckable(True)
        self.actionVid.setIcon(icon28)
        self.actionVid.setObjectName("actionVid")
        self.actionCheckBoxDVDCover = QtWidgets.QAction(MainWindow)
        self.actionCheckBoxDVDCover.setCheckable(True)
        icon47 = QtGui.QIcon()
        icon47.addPixmap(QtGui.QPixmap("pypordb/dvd_unmount.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.actionCheckBoxDVDCover.setIcon(icon47)
        self.actionCheckBoxDVDCover.setObjectName("actionCheckBoxDVDCover")
        self.actionSuche = QtWidgets.QAction(MainWindow)
        self.actionSuche.setIcon(icon6)
        self.actionSuche.setObjectName("actionSuche")
        self.actionDrucken = QtWidgets.QAction(MainWindow)
        icon48 = QtGui.QIcon()
        icon48.addPixmap(QtGui.QPixmap("pypordb/printer1.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.actionDrucken.setIcon(icon48)
        self.actionDrucken.setObjectName("actionDrucken")
        self.actionSuchfeld = QtWidgets.QAction(MainWindow)
        self.actionSuchfeld.setObjectName("actionSuchfeld")
        self.actionFirst = QtWidgets.QAction(MainWindow)
        icon49 = QtGui.QIcon()
        icon49.addPixmap(QtGui.QPixmap("pypordb/go-first.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.actionFirst.setIcon(icon49)
        self.actionFirst.setObjectName("actionFirst")
        self.actionPrev = QtWidgets.QAction(MainWindow)
        self.actionPrev.setIcon(icon25)
        self.actionPrev.setObjectName("actionPrev")
        self.actionNext = QtWidgets.QAction(MainWindow)
        self.actionNext.setIcon(icon26)
        self.actionNext.setObjectName("actionNext")
        self.actionLast = QtWidgets.QAction(MainWindow)
        icon50 = QtGui.QIcon()
        icon50.addPixmap(QtGui.QPixmap("pypordb/go-last.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.actionLast.setIcon(icon50)
        self.actionLast.setObjectName("actionLast")
        self.actionAnzahlBilder = QtWidgets.QAction(MainWindow)
        self.actionAnzahlBilder.setObjectName("actionAnzahlBilder")
        self.actionUndo = QtWidgets.QAction(MainWindow)
        icon51 = QtGui.QIcon()
        icon51.addPixmap(QtGui.QPixmap("pypordb/undo.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.actionUndo.setIcon(icon51)
        self.actionUndo.setObjectName("actionUndo")
        self.actionDarstellerUebernehmen = QtWidgets.QAction(MainWindow)
        self.actionDarstellerUebernehmen.setObjectName("actionDarstellerUebernehmen")
        self.actionAnzeigenOriginal = QtWidgets.QAction(MainWindow)
        self.actionAnzeigenOriginal.setObjectName("actionAnzeigenOriginal")
        self.actionSortieren_nach_Darsteller = QtWidgets.QAction(MainWindow)
        self.actionSortieren_nach_Darsteller.setObjectName("actionSortieren_nach_Darsteller")
        self.actionSortieren_nach_CD = QtWidgets.QAction(MainWindow)
        self.actionSortieren_nach_CD.setObjectName("actionSortieren_nach_CD")
        self.actionSortieren_nach_Titel = QtWidgets.QAction(MainWindow)
        self.actionSortieren_nach_Titel.setObjectName("actionSortieren_nach_Titel")
        self.actionOriginal_umbenennen = QtWidgets.QAction(MainWindow)
        self.actionOriginal_umbenennen.setObjectName("actionOriginal_umbenennen")
        self.actionOriginal_weitere = QtWidgets.QAction(MainWindow)
        self.actionOriginal_weitere.setObjectName("actionOriginal_weitere")
        self.actionSortieren_nach_Original = QtWidgets.QAction(MainWindow)
        self.actionSortieren_nach_Original.setObjectName("actionSortieren_nach_Original")
        self.actionCovergross = QtWidgets.QAction(MainWindow)
        self.actionCovergross.setObjectName("actionCovergross")
        self.actionBildLoeschen = QtWidgets.QAction(MainWindow)
        self.actionBildLoeschen.setObjectName("actionBildLoeschen")
        self.actionAnzeigenPaar = QtWidgets.QAction(MainWindow)
        self.actionAnzeigenPaar.setObjectName("actionAnzeigenPaar")
        self.actionBildanzeigegross = QtWidgets.QAction(MainWindow)
        self.actionBildanzeigegross.setObjectName("actionBildanzeigegross")
        self.actionFilm_zeigen = QtWidgets.QAction(MainWindow)
        self.actionFilm_zeigen.setObjectName("actionFilm_zeigen")
        self.actionCSZeigen = QtWidgets.QAction(MainWindow)
        self.actionCSZeigen.setObjectName("actionCSZeigen")
        self.actionNeueingabe = QtWidgets.QAction(MainWindow)
        icon52 = QtGui.QIcon()
        icon52.addPixmap(QtGui.QPixmap("pypordb/document-new.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.actionNeueingabe.setIcon(icon52)
        self.actionNeueingabe.setObjectName("actionNeueingabe")
        self.actionOnHelp = QtWidgets.QAction(MainWindow)
        icon53 = QtGui.QIcon()
        icon53.addPixmap(QtGui.QPixmap("pypordb/dialog-information.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.actionOnHelp.setIcon(icon53)
        self.actionOnHelp.setObjectName("actionOnHelp")
        self.actionOriginalIntoClipboard = QtWidgets.QAction(MainWindow)
        self.actionOriginalIntoClipboard.setObjectName("actionOriginalIntoClipboard")
        self.actionRedoImageChange = QtWidgets.QAction(MainWindow)
        self.actionRedoImageChange.setObjectName("actionRedoImageChange")
        self.actionGetUrl = QtWidgets.QAction(MainWindow)
        self.actionGetUrl.setObjectName("actionGetUrl")
        self.actionGoToUrl = QtWidgets.QAction(MainWindow)
        self.actionGoToUrl.setObjectName("actionGoToUrl")
        self.actionAnzeigenTitle = QtWidgets.QAction(MainWindow)
        self.actionAnzeigenTitle.setObjectName("actionAnzeigenTitle")
        self.actionShowDetails = QtWidgets.QAction(MainWindow)
        self.actionShowDetails.setObjectName("actionShowDetails")
        self.actionMassChange = QtWidgets.QAction(MainWindow)
        self.actionMassChange.setObjectName("actionMassChange")
        self.actionAddInformationFromIAFD = QtWidgets.QAction(MainWindow)
        self.actionAddInformationFromIAFD.setObjectName("actionAddInformationFromIAFD")
        self.actionDeleteImageFromView = QtWidgets.QAction(MainWindow)
        self.actionDeleteImageFromView.setObjectName("actionDeleteImageFromView")
        self.toolBar.addAction(self.actionNeueingabe)
        self.toolBar.addAction(self.actionSuchfeld)
        self.toolBar.addSeparator()
        self.toolBar.addAction(self.actionDarsteller)
        self.toolBar.addAction(self.actionCd)
        self.toolBar.addAction(self.actionTitel)
        self.toolBar.addAction(self.actionOriginal)
        self.toolBar.addSeparator()
        self.toolBar.addAction(self.actionVid)
        self.toolBar.addAction(self.actionCheckBoxDVDCover)
        self.toolBar.addSeparator()
        self.toolBar.addAction(self.actionSuche)
        self.toolBar.addAction(self.actionDrucken)
        self.toolBar.addSeparator()
        self.toolBar.addAction(self.actionFirst)
        self.toolBar.addAction(self.actionPrev)
        self.toolBar.addAction(self.actionNext)
        self.toolBar.addAction(self.actionLast)
        self.toolBar.addSeparator()
        self.toolBar.addAction(self.actionAnzahlBilder)
        self.toolBar.addAction(self.actionUndo)
        self.toolBar.addAction(self.actionOnHelp)

        self.retranslateUi(MainWindow)
        self.tabWidget.setCurrentIndex(1)
        QtCore.QMetaObject.connectSlotsByName(MainWindow)
        MainWindow.setTabOrder(self.pushButtonRefresh, self.pushButtonDir)
        MainWindow.setTabOrder(self.pushButtonDir, self.tableWidgetBilderAktuell)
        MainWindow.setTabOrder(self.tableWidgetBilderAktuell, self.tableWidgetBilder)
        MainWindow.setTabOrder(self.tableWidgetBilder, self.bildAnzeige)
        MainWindow.setTabOrder(self.bildAnzeige, self.comboBoxSex)
        MainWindow.setTabOrder(self.comboBoxSex, self.pushButtonDarstellerSuchen)
        MainWindow.setTabOrder(self.pushButtonDarstellerSuchen, self.pushButtonUmbenennen)
        MainWindow.setTabOrder(self.pushButtonUmbenennen, self.comboBoxEthnicFilter)
        MainWindow.setTabOrder(self.comboBoxEthnicFilter, self.comboBoxCSFilter)
        MainWindow.setTabOrder(self.comboBoxCSFilter, self.pushButtonSortPartner)
        MainWindow.setTabOrder(self.pushButtonSortPartner, self.listWidgetDarsteller)
        MainWindow.setTabOrder(self.listWidgetDarsteller, self.pushButtonPartnerZeigen)
        MainWindow.setTabOrder(self.pushButtonPartnerZeigen, self.pushButtonPseudo)
        MainWindow.setTabOrder(self.pushButtonPseudo, self.listWidgetStatistik)
        MainWindow.setTabOrder(self.listWidgetStatistik, self.pushButtonSort)
        MainWindow.setTabOrder(self.pushButtonSort, self.listWidgetFilme)
        MainWindow.setTabOrder(self.listWidgetFilme, self.comboBoxGeschlecht)
        MainWindow.setTabOrder(self.comboBoxGeschlecht, self.lineEditAnzahl)
        MainWindow.setTabOrder(self.lineEditAnzahl, self.lineEditGeboren)
        MainWindow.setTabOrder(self.lineEditGeboren, self.comboBoxHaarfarbe)
        MainWindow.setTabOrder(self.comboBoxHaarfarbe, self.comboBoxNation)
        MainWindow.setTabOrder(self.comboBoxNation, self.lineEditTattoo)
        MainWindow.setTabOrder(self.lineEditTattoo, self.comboBoxEthnic)
        MainWindow.setTabOrder(self.comboBoxEthnic, self.pushButtonIAFDholen)
        MainWindow.setTabOrder(self.pushButtonIAFDholen, self.pushButtonDarstellerspeichern)
        MainWindow.setTabOrder(self.pushButtonDarstellerspeichern, self.pushButtonIAFDBackground)
        MainWindow.setTabOrder(self.pushButtonIAFDBackground, self.pushButtonClear)
        MainWindow.setTabOrder(self.pushButtonClear, self.lineEditSuchen)
        MainWindow.setTabOrder(self.lineEditSuchen, self.lineEditFilesizeFrom)
        MainWindow.setTabOrder(self.lineEditFilesizeFrom, self.lineEditFilesizeTo)
        MainWindow.setTabOrder(self.lineEditFilesizeTo, self.comboBoxFilesizeUnit)
        MainWindow.setTabOrder(self.comboBoxFilesizeUnit, self.pushButtonSuchen)
        MainWindow.setTabOrder(self.pushButtonSuchen, self.pushButtonUebernehmen)
        MainWindow.setTabOrder(self.pushButtonUebernehmen, self.lineEditSearchMpg)
        MainWindow.setTabOrder(self.lineEditSearchMpg, self.pushButtonSearchMpg)
        MainWindow.setTabOrder(self.pushButtonSearchMpg, self.pushButtonFilterMpgKatalog)
        MainWindow.setTabOrder(self.pushButtonFilterMpgKatalog, self.pushButtonDelete)
        MainWindow.setTabOrder(self.pushButtonDelete, self.lineEditSearchVid)
        MainWindow.setTabOrder(self.lineEditSearchVid, self.pushButtonSearchVid)
        MainWindow.setTabOrder(self.pushButtonSearchVid, self.pushButtonFilterVid)
        MainWindow.setTabOrder(self.pushButtonFilterVid, self.tableWidget)
        MainWindow.setTabOrder(self.tableWidget, self.tableWidget1)
        MainWindow.setTabOrder(self.tableWidget1, self.lineEditSearchWebsite)
        MainWindow.setTabOrder(self.lineEditSearchWebsite, self.pushButtonSearchWebsite)
        MainWindow.setTabOrder(self.pushButtonSearchWebsite, self.pushButtonVideo)
        MainWindow.setTabOrder(self.pushButtonVideo, self.pushButtonAbholen)
        MainWindow.setTabOrder(self.pushButtonAbholen, self.pushButtonMovie)
        MainWindow.setTabOrder(self.pushButtonMovie, self.lineEditURL)
        MainWindow.setTabOrder(self.lineEditURL, self.pushButtonClearURL)
        MainWindow.setTabOrder(self.pushButtonClearURL, self.pushButtonUrl)
        MainWindow.setTabOrder(self.pushButtonUrl, self.webView)
        MainWindow.setTabOrder(self.webView, self.tableWidgetStatistik)
        MainWindow.setTabOrder(self.tableWidgetStatistik, self.pushButtonCS)
        MainWindow.setTabOrder(self.pushButtonCS, self.pushButtonDarstellerW)
        MainWindow.setTabOrder(self.pushButtonDarstellerW, self.lineEditAnzahlW)
        MainWindow.setTabOrder(self.lineEditAnzahlW, self.pushButtonDarstellerM)
        MainWindow.setTabOrder(self.pushButtonDarstellerM, self.lineEditAnzahlM)
        MainWindow.setTabOrder(self.lineEditAnzahlM, self.pushButtonAnzahlClips)
        MainWindow.setTabOrder(self.pushButtonAnzahlClips, self.pushButtonClipsJahr)
        MainWindow.setTabOrder(self.pushButtonClipsJahr, self.pushButtonCheckNewVersion)
        MainWindow.setTabOrder(self.pushButtonCheckNewVersion, self.pushButtonSuchbegriffe)
        MainWindow.setTabOrder(self.pushButtonSuchbegriffe, self.pushButtonLand)
        MainWindow.setTabOrder(self.pushButtonLand, self.pushButtonBackup)
        MainWindow.setTabOrder(self.pushButtonBackup, self.checkBoxDatabase)
        MainWindow.setTabOrder(self.checkBoxDatabase, self.checkBoxPictures)
        MainWindow.setTabOrder(self.checkBoxPictures, self.pushButtonRestore)
        MainWindow.setTabOrder(self.pushButtonRestore, self.pushButtonWartung)
        MainWindow.setTabOrder(self.pushButtonWartung, self.pushButtonDateikatalog)
        MainWindow.setTabOrder(self.pushButtonDateikatalog, self.comboBoxDevice)
        MainWindow.setTabOrder(self.comboBoxDevice, self.pushButtonVerwalten)
        MainWindow.setTabOrder(self.pushButtonVerwalten, self.pushButtonStart)
        MainWindow.setTabOrder(self.pushButtonStart, self.tableWidgetDubletten)
        MainWindow.setTabOrder(self.tableWidgetDubletten, self.pushButtonDeleteDuplicates)
        MainWindow.setTabOrder(self.pushButtonDeleteDuplicates, self.pushButtonDeselect)
        MainWindow.setTabOrder(self.pushButtonDeselect, self.lineEditFilter)
        MainWindow.setTabOrder(self.lineEditFilter, self.pushButtonIAFD)
        MainWindow.setTabOrder(self.pushButtonIAFD, self.pushButtonForward)
        MainWindow.setTabOrder(self.pushButtonForward, self.pushButtonBack)

    def retranslateUi(self, MainWindow):
        _translate = QtCore.QCoreApplication.translate
        MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow"))
        self.label_akt_verzeichnis.setToolTip(_translate("MainWindow", "act. directory"))
        self.label_akt_verzeichnis.setWhatsThis(_translate("MainWindow", "Actual directory"))
        self.label_akt_verzeichnis.setText(_translate("MainWindow", "act. directory"))
        self.pushButtonRefresh.setToolTip(_translate("MainWindow", "Refresh view or working directory"))
        self.pushButtonRefresh.setWhatsThis(_translate("MainWindow", "Sometimes it happens that the automatically refresh does not work. With this button you can force a refresh."))
        self.pushButtonDir.setToolTip(_translate("MainWindow", "Change directory"))
        self.pushButtonDir.setWhatsThis(_translate("MainWindow", "Change actual directory."))
        self.tableWidgetBilderAktuell.setWhatsThis(_translate("MainWindow", "Actual image files in working directory. For adding the image file to the database, double click on it or mark it and press F5. If 2 image files are marked, the dialog for adding a cover will appear."))
        self.tableWidgetBilder.setWhatsThis(_translate("MainWindow", "<html><head/><body><p>Presentation of the search result. A contextual menu appears when you right click on any item. By double clicking on an item it can be changed or deleted in mode of viewing clips or the actors data will be shown in mode of viewing actors. In mode of viewing clips F12 toggles showing complete data (title and image file) or not.</p><p><br/></p><p>&gt;&gt;&gt;&gt;&gt; indicates that there are more original titles.</p><p>!!! indicates that there is a comment</p></body></html>"))
        self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_1), _translate("MainWindow", "Images"))
        self.labelBildanzeige.setToolTip(_translate("MainWindow", "<html><head/><body><p>Drag and drop image of an actor here</p></body></html>"))
        self.labelBildanzeige.setWhatsThis(_translate("MainWindow", "Image of the actor"))
        self.bildAnzeige.setToolTip(_translate("MainWindow", "Show actor and search for actors\n"
"Ctrl+B"))
        self.bildAnzeige.setWhatsThis(_translate("MainWindow", "The most significant button: shows all information of the actor"))
        self.comboBoxSex.setToolTip(_translate("MainWindow", "Gender"))
        self.comboBoxSex.setWhatsThis(_translate("MainWindow", "Filter selection for gender"))
        self.comboBoxSex.setItemText(0, _translate("MainWindow", "whatever"))
        self.comboBoxSex.setItemText(1, _translate("MainWindow", "Male"))
        self.comboBoxSex.setItemText(2, _translate("MainWindow", "Female"))
        self.pushButtonDarstellerSuchen.setToolTip(_translate("MainWindow", "Search actor, Ctrl+shift+F"))
        self.pushButtonDarstellerSuchen.setWhatsThis(_translate("MainWindow", "Search for actors"))
        self.pushButtonDarstellerSuchen.setShortcut(_translate("MainWindow", "Ctrl+Shift+F"))
        self.pushButtonUmbenennen.setToolTip(_translate("MainWindow", "<html><head/><body><p>Rename actor, Ctrl+Shift+U</p></body></html>"))
        self.pushButtonUmbenennen.setWhatsThis(_translate("MainWindow", "Rename actor"))
        self.pushButtonUmbenennen.setShortcut(_translate("MainWindow", "Ctrl+U"))
        self.labelAktiv.setToolTip(_translate("MainWindow", "<html><head/><body><p>Active from ... to according IAFD and last visit of IAFD with this actor</p></body></html>"))
        self.labelAktiv.setWhatsThis(_translate("MainWindow", "<html><head/><body><p><br/></p></body></html>"))
        self.label_9.setText(_translate("MainWindow", "Movies:"))
        self.labelFilme.setToolTip(_translate("MainWindow", "<html><head/><body><p>Films according to the IAFD</p></body></html>"))
        self.label_8.setText(_translate("MainWindow", "Age:"))
        self.comboBoxEthnicFilter.setToolTip(_translate("MainWindow", "Filter on ethnic"))
        self.comboBoxEthnicFilter.setWhatsThis(_translate("MainWindow", "Filter partners on ethnic"))
        self.comboBoxEthnicFilter.setItemText(1, _translate("MainWindow", "w"))
        self.comboBoxEthnicFilter.setItemText(2, _translate("MainWindow", "a"))
        self.comboBoxEthnicFilter.setItemText(3, _translate("MainWindow", "s"))
        self.comboBoxEthnicFilter.setItemText(4, _translate("MainWindow", "l"))
        self.comboBoxCSFilter.setToolTip(_translate("MainWindow", "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:\'Sans Serif\'; font-size:9pt; font-weight:400; font-style:normal;\">\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Filter on cumshot</p></body></html>"))
        self.comboBoxCSFilter.setWhatsThis(_translate("MainWindow", "Filter on cumshot"))
        self.comboBoxCSFilter.setItemText(1, _translate("MainWindow", "f Facial"))
        self.comboBoxCSFilter.setItemText(2, _translate("MainWindow", "h Handjob"))
        self.comboBoxCSFilter.setItemText(3, _translate("MainWindow", "t Tits"))
        self.comboBoxCSFilter.setItemText(4, _translate("MainWindow", "c Creampie"))
        self.comboBoxCSFilter.setItemText(5, _translate("MainWindow", "x Analcreampie"))
        self.comboBoxCSFilter.setItemText(6, _translate("MainWindow", "o Oralcreampie"))
        self.comboBoxCSFilter.setItemText(7, _translate("MainWindow", "v Cunt"))
        self.comboBoxCSFilter.setItemText(8, _translate("MainWindow", "b Belly"))
        self.comboBoxCSFilter.setItemText(9, _translate("MainWindow", "a Ass"))
        self.comboBoxCSFilter.setItemText(10, _translate("MainWindow", "s Others"))
        self.pushButtonSortPartner.setToolTip(_translate("MainWindow", "Sort on ..."))
        self.pushButtonSortPartner.setText(_translate("MainWindow", "Quantity"))
        self.listWidgetDarsteller.setWhatsThis(_translate("MainWindow", "Has acted with"))
        self.pushButtonPartnerZeigen.setToolTip(_translate("MainWindow", "<html><head/><body><p>Show actors</p></body></html>"))
        self.pushButtonPartnerZeigen.setWhatsThis(_translate("MainWindow", "Show actors in first tab"))
        self.pushButtonPseudo.setToolTip(_translate("MainWindow", "<html><head/><body><p>Maintain aliases</p></body></html>"))
        self.pushButtonPseudo.setWhatsThis(_translate("MainWindow", "Add alias"))
        self.label_16.setText(_translate("MainWindow", "Cumshots"))
        self.listWidgetStatistik.setWhatsThis(_translate("MainWindow", "Cumshot statistic"))
        self.label_17.setText(_translate("MainWindow", "Films"))
        self.lineEditFilter.setToolTip(_translate("MainWindow", "<html><head/><body><p>Filter ...</p></body></html>"))
        self.pushButtonSort.setToolTip(_translate("MainWindow", "Sort on ..."))
        self.pushButtonSort.setWhatsThis(_translate("MainWindow", "Sort alphabetically or on year"))
        self.pushButtonSort.setText(_translate("MainWindow", "Year"))
        self.listWidgetFilme.setWhatsThis(_translate("MainWindow", "Movies with this actor in the database"))
        self.label_4.setText(_translate("MainWindow", "Nation"))
        self.label.setText(_translate("MainWindow", "Gender"))
        self.comboBoxGeschlecht.setItemText(0, _translate("MainWindow", "w"))
        self.comboBoxGeschlecht.setItemText(1, _translate("MainWindow", "m"))
        self.label_2.setText(_translate("MainWindow", "Quantity"))
        self.lineEditAnzahl.setWhatsThis(_translate("MainWindow", "<html><head/><body><p>Quantity of films in the PorDB</p></body></html>"))
        self.label_7.setText(_translate("MainWindow", "Born"))
        self.label_3.setText(_translate("MainWindow", "Hair color"))
        self.comboBoxHaarfarbe.setItemText(0, _translate("MainWindow", "ba"))
        self.comboBoxHaarfarbe.setItemText(1, _translate("MainWindow", "bl"))
        self.comboBoxHaarfarbe.setItemText(2, _translate("MainWindow", "br"))
        self.comboBoxHaarfarbe.setItemText(3, _translate("MainWindow", "gr"))
        self.comboBoxHaarfarbe.setItemText(4, _translate("MainWindow", "r"))
        self.comboBoxHaarfarbe.setItemText(5, _translate("MainWindow", "s"))
        self.label_5.setText(_translate("MainWindow", "Tattoo"))
        self.label_6.setText(_translate("MainWindow", "Ethnic"))
        self.comboBoxEthnic.setItemText(0, _translate("MainWindow", "w"))
        self.comboBoxEthnic.setItemText(1, _translate("MainWindow", "a"))
        self.comboBoxEthnic.setItemText(2, _translate("MainWindow", "s"))
        self.comboBoxEthnic.setItemText(3, _translate("MainWindow", "l"))
        self.pushButtonIAFDholen.setToolTip(_translate("MainWindow", "Get actors information from the IAFD, Ctrl+I"))
        self.pushButtonIAFDholen.setShortcut(_translate("MainWindow", "Ctrl+I"))
        self.pushButtonDarstellerspeichern.setToolTip(_translate("MainWindow", "Save changes, Ctrl+S"))
        self.pushButtonDarstellerspeichern.setWhatsThis(_translate("MainWindow", "Save actor data"))
        self.pushButtonDarstellerspeichern.setShortcut(_translate("MainWindow", "Ctrl+S"))
        self.pushButtonIAFDBackground.setToolTip(_translate("MainWindow", "Update actors data from the IAFD, Ctrl+shift+A"))
        self.pushButtonIAFDBackground.setShortcut(_translate("MainWindow", "Ctrl+Shift+A"))
        self.pushButtonDarstellerLoeschen.setToolTip(_translate("MainWindow", "Delete all information from this actor inclusive the image, Ctrl+L"))
        self.pushButtonDarstellerLoeschen.setShortcut(_translate("MainWindow", "Ctrl+L"))
        self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_2), _translate("MainWindow", "Actors"))
        self.pushButtonClear.setToolTip(_translate("MainWindow", "Strg+L"))
        self.pushButtonClear.setText(_translate("MainWindow", "Clear search field"))
        self.pushButtonClear.setShortcut(_translate("MainWindow", "Ctrl+L"))
        self.lineEditSuchen.setWhatsThis(_translate("MainWindow", "Search field"))
        self.label_18.setText(_translate("MainWindow", "File size:"))
        self.lineEditFilesizeFrom.setWhatsThis(_translate("MainWindow", "<html><head/><body><p>Enter file size here. You can enter a single file size, or a range. Select the unit from the combobox in the right.</p><p><br/></p><p>When something is entered in the search field on the left, it is combined with the size field with &quot;and&quot;. </p></body></html>"))
        self.label_19.setText(_translate("MainWindow", "-"))
        self.lineEditFilesizeTo.setWhatsThis(_translate("MainWindow", "<html><head/><body><p>Enter file size here. You can enter a single file size, or a range. Select the unit from the combobox in the right.</p><p><br/>When something is entered in the search field on the left, it is combined with the size field with &quot;and&quot;. </p></body></html>"))
        self.comboBoxFilesizeUnit.setWhatsThis(_translate("MainWindow", "<html><head/><body><p>Select the unit for the file size.</p><p><br/></p><p>MB = Megabyte</p><p>GB = Gigabyte</p></body></html>"))
        self.comboBoxFilesizeUnit.setItemText(0, _translate("MainWindow", "MB"))
        self.comboBoxFilesizeUnit.setItemText(1, _translate("MainWindow", "GB"))
        self.comboBoxFilesizeUnit.setItemText(2, _translate("MainWindow", "Bytes"))
        self.pushButtonSuchen.setToolTip(_translate("MainWindow", "<html><head/><body><p>Search, enter</p></body></html>"))
        self.pushButtonSuchen.setWhatsThis(_translate("MainWindow", "<html><head/><body><p>Execute search, Enter</p></body></html>"))
        self.pushButtonSuchen.setShortcut(_translate("MainWindow", "Return"))
        self.pushButtonUebernehmen.setToolTip(_translate("MainWindow", "<html><head/><body><p>Copy content from this search field to the main search field, Ctrl+PageUp</p></body></html>"))
        self.pushButtonUebernehmen.setShortcut(_translate("MainWindow", "Ctrl+PgUp"))
        self.groupBox_2.setTitle(_translate("MainWindow", "mpg_katalog"))
        self.labelMpgGefunden.setText(_translate("MainWindow", "0 found"))
        self.pushButtonSearchMpg.setToolTip(_translate("MainWindow", "<html><head/><body><p>Search in results</p></body></html>"))
        self.pushButtonSearchMpg.setWhatsThis(_translate("MainWindow", "Search in results"))
        self.pushButtonFilterMpgKatalog.setToolTip(_translate("MainWindow", "<html><head/><body><p>Filter on search results</p></body></html>"))
        self.pushButtonDelete.setToolTip(_translate("MainWindow", "<html><head/><body><p>Delete selected lines in database, Ctrl+S</p></body></html>"))
        self.pushButtonDelete.setWhatsThis(_translate("MainWindow", "<html><head/><body><p>Delete selected lines in table mpg_katalog</p></body></html>"))
        self.pushButtonDelete.setShortcut(_translate("MainWindow", "Alt+L"))
        self.tableWidget.setWhatsThis(_translate("MainWindow", "<html><head/><body><p>Search result from file catalog</p></body></html>"))
        self.groupBox_3.setTitle(_translate("MainWindow", "Vid"))
        self.labelVidGefunden.setText(_translate("MainWindow", "0 found"))
        self.pushButtonSearchVid.setToolTip(_translate("MainWindow", "<html><head/><body><p>Search in results</p></body></html>"))
        self.pushButtonFilterVid.setToolTip(_translate("MainWindow", "<html><head/><body><p>Filter on search results</p></body></html>"))
        self.tableWidget1.setWhatsThis(_translate("MainWindow", "<html><head/><body><p>Search result from database</p></body></html>"))
        self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_3), _translate("MainWindow", "Search file"))
        self.pushButtonBack.setToolTip(_translate("MainWindow", "back"))
        self.pushButtonForward.setToolTip(_translate("MainWindow", "forward"))
        self.pushButtonIAFD.setToolTip(_translate("MainWindow", "Load IAFD site"))
        self.pushButtonIAFD.setWhatsThis(_translate("MainWindow", "Load IAFD site"))
        self.lineEditSearchWebsite.setWhatsThis(_translate("MainWindow", "Enter text to search in website"))
        self.pushButtonClearSearch.setToolTip(_translate("MainWindow", "<html><head/><body><p>Clear search field, ALT+L</p></body></html>"))
        self.pushButtonClearSearch.setShortcut(_translate("MainWindow", "Alt+L"))
        self.pushButtonSearchWebsite.setToolTip(_translate("MainWindow", "<html><head/><body><p>Search in website, Alt+S</p></body></html>"))
        self.pushButtonSearchWebsite.setShortcut(_translate("MainWindow", "Alt+S"))
        self.pushButtonVideo.setToolTip(_translate("MainWindow", "<html><head/><body><p>Movies available in PorDB?, Alt+F</p></body></html>"))
        self.pushButtonVideo.setWhatsThis(_translate("MainWindow", "Check which movies are in database."))
        self.pushButtonVideo.setShortcut(_translate("MainWindow", "Alt+F"))
        self.pushButtonAbholen.setToolTip(_translate("MainWindow", "<html><head/><body><p>Get actor data, Alt+D</p></body></html>"))
        self.pushButtonAbholen.setWhatsThis(_translate("MainWindow", "Adopt actors data from the IAFD."))
        self.pushButtonAbholen.setShortcut(_translate("MainWindow", "Alt+D"))
        self.pushButtonMovie.setToolTip(_translate("MainWindow", "<html><head/><body><p>Add clips for current video, Alt+F5</p></body></html>"))
        self.pushButtonMovie.setWhatsThis(_translate("MainWindow", "Adopt movie data from the IAFD.\n"
"\n"
"This is very useful for adding new scenes from the selected movie."))
        self.pushButtonMovie.setShortcut(_translate("MainWindow", "Alt+F5"))
        self.lineEditURL.setWhatsThis(_translate("MainWindow", "Adress bar"))
        self.pushButtonClearURL.setToolTip(_translate("MainWindow", "<html><head/><body><p>Clear the address bar, CTRL+L</p></body></html>"))
        self.pushButtonClearURL.setShortcut(_translate("MainWindow", "Ctrl+L"))
        self.pushButtonUrl.setToolTip(_translate("MainWindow", "Bookmarks"))
        self.pushButtonUrl.setWhatsThis(_translate("MainWindow", "Maintenance of bookmarks"))
        self.webView.setWhatsThis(_translate("MainWindow", "Web content, controls:\n"
"Back: Z\n"
"Forward: X\n"
"Stop: S"))
        self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_4), _translate("MainWindow", "Search on IAFD"))
        self.tableWidgetStatistik.setWhatsThis(_translate("MainWindow", "Statistics"))
        self.pushButtonCS.setToolTip(_translate("MainWindow", "Cumshot statistic"))
        self.pushButtonCS.setWhatsThis(_translate("MainWindow", "Cumshot statistic"))
        self.pushButtonCS.setText(_translate("MainWindow", "CumShots"))
        self.pushButtonDarstellerW.setWhatsThis(_translate("MainWindow", "Female actors statistics "))
        self.pushButtonDarstellerW.setText(_translate("MainWindow", "Actors female"))
        self.lineEditAnzahlW.setToolTip(_translate("MainWindow", "Filter on quantity partners"))
        self.lineEditAnzahlW.setWhatsThis(_translate("MainWindow", "Show female actors with more than ... partners"))
        self.pushButtonDarstellerM.setWhatsThis(_translate("MainWindow", "Male actors statistics "))
        self.pushButtonDarstellerM.setText(_translate("MainWindow", "Actors male"))
        self.lineEditAnzahlM.setToolTip(_translate("MainWindow", "Filter on quantity partners"))
        self.lineEditAnzahlM.setWhatsThis(_translate("MainWindow", "Show male actors with more than ... partners"))
        self.pushButtonAnzahlClips.setToolTip(_translate("MainWindow", "Show quantity of movies"))
        self.pushButtonAnzahlClips.setText(_translate("MainWindow", "Quantity of movies"))
        self.pushButtonClipsJahr.setWhatsThis(_translate("MainWindow", "Show quantity of movies per year"))
        self.pushButtonClipsJahr.setText(_translate("MainWindow", "Movies / year"))
        self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_5), _translate("MainWindow", "Statistics"))
        self.checkBoxPictures.setToolTip(_translate("MainWindow", "<html><head/><body><p>When checked: Backup of the picture directory</p></body></html>"))
        self.checkBoxPictures.setText(_translate("MainWindow", "Pictures"))
        self.pushButtonBackup.setToolTip(_translate("MainWindow", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:\'Sans Serif\'; font-size:9pt; font-weight:400; font-style:normal;\">\n"
"<p align=\"justify\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Database will be unloaded and saved in the working directory. This files can be saved on e. g. external devices. That is also helpful for moving on a new computer. With the reload button the database can be reloaded</p></body></html>"))
        self.pushButtonBackup.setText(_translate("MainWindow", "Backup"))
        self.pushButtonRestore.setToolTip(_translate("MainWindow", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:\'Sans Serif\'; font-size:9pt; font-weight:400; font-style:normal;\">\n"
"<p align=\"justify\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Restore database.</p></body></html>"))
        self.pushButtonRestore.setText(_translate("MainWindow", "Restore"))
        self.pushButtonWartung.setToolTip(_translate("MainWindow", "<html><head/><body><p>Maintenance of the database</p></body></html>"))
        self.pushButtonWartung.setText(_translate("MainWindow", "Maintenance"))
        self.pushButtonDateikatalog.setToolTip(_translate("MainWindow", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:\'Sans Serif\'; font-size:9pt; font-weight:400; font-style:normal;\">\n"
"<p align=\"justify\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Scan a file directory for video files. Filenames are entered in the database and can be searched (Tab &quot;Search files&quot;).</p></body></html>"))
        self.pushButtonDateikatalog.setText(_translate("MainWindow", "File catalogue"))
        self.checkBoxDatabase.setToolTip(_translate("MainWindow", "<html><head/><body><p>When checked: Backup of the database entries</p></body></html>"))
        self.checkBoxDatabase.setText(_translate("MainWindow", "Database"))
        self.pushButtonCheckNewVersion.setToolTip(_translate("MainWindow", "<html><head/><body><p>Check for new version, Alt+N</p></body></html>"))
        self.pushButtonCheckNewVersion.setText(_translate("MainWindow", "Check for new version"))
        self.pushButtonCheckNewVersion.setShortcut(_translate("MainWindow", "Alt+N"))
        self.pushButtonSuchbegriffe.setToolTip(_translate("MainWindow", "<html><head/><body><p>Edit search terms. Be very careful with this function to avoid too much search results, Alt+S</p></body></html>"))
        self.pushButtonSuchbegriffe.setText(_translate("MainWindow", "Edit search terms"))
        self.pushButtonSuchbegriffe.setShortcut(_translate("MainWindow", "Alt+S"))
        self.pushButtonLand.setToolTip(_translate("MainWindow", "<html><head/><body><p>Edit table of countries. Setting the active column will add the country to the combo box in the actor tab. Enter the nationality as named in the IAFD, so the correct country will be set when adding actors from the IAFD. Alt+L</p></body></html>"))
        self.pushButtonLand.setText(_translate("MainWindow", "Edit table of countries"))
        self.pushButtonLand.setShortcut(_translate("MainWindow", "Alt+L"))
        self.label_14.setText(_translate("MainWindow", "Devicename:"))
        self.comboBoxDevice.setToolTip(_translate("MainWindow", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:\'Sans Serif\'; font-size:9pt; font-weight:400; font-style:normal;\">\n"
"<p align=\"justify\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Select a device name. Device names must be unambiguous .</p></body></html>"))
        self.pushButtonVerwalten.setText(_translate("MainWindow", "Maintain device names"))
        self.checkBoxSubdirectories.setToolTip(_translate("MainWindow", "<html><head/><body><p>Also scanning all subdirectories</p></body></html>"))
        self.checkBoxSubdirectories.setText(_translate("MainWindow", "with subdirectories"))
        self.pushButtonStart.setText(_translate("MainWindow", "Start"))
        self.label_15.setText(_translate("MainWindow", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:\'Sans Serif\'; font-size:9pt; font-weight:400; font-style:normal;\">\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-weight:600; color:#800080;\">This table will show possible duplicates:</span></p></body></html>"))
        self.tableWidgetDubletten.setSortingEnabled(True)
        self.pushButtonDeleteDuplicates.setToolTip(_translate("MainWindow", "All checked files and entries in database will be deleted, Ctrl+L"))
        self.pushButtonDeleteDuplicates.setText(_translate("MainWindow", "Delete duplicates"))
        self.pushButtonDeleteDuplicates.setShortcut(_translate("MainWindow", "Ctrl+L"))
        self.pushButtonDeselect.setToolTip(_translate("MainWindow", "Deselect all marked lines, Ctrl+A"))
        self.pushButtonDeselect.setText(_translate("MainWindow", "Unselect all"))
        self.pushButtonDeselect.setShortcut(_translate("MainWindow", "Ctrl+A"))
        self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_6), _translate("MainWindow", "Tools"))
        self.toolBar.setWindowTitle(_translate("MainWindow", "toolBar"))
        self.actionDarsteller.setText(_translate("MainWindow", "Actor"))
        self.actionDarsteller.setToolTip(_translate("MainWindow", "Search for actor, Ctrl+D"))
        self.actionDarsteller.setShortcut(_translate("MainWindow", "Ctrl+D"))
        self.actionCd.setText(_translate("MainWindow", "cd"))
        self.actionCd.setToolTip(_translate("MainWindow", "Search for storage medium, Ctrl+M"))
        self.actionCd.setShortcut(_translate("MainWindow", "Ctrl+M"))
        self.actionTitel.setText(_translate("MainWindow", "title"))
        self.actionTitel.setToolTip(_translate("MainWindow", "Search for title, Ctrl+T"))
        self.actionTitel.setShortcut(_translate("MainWindow", "Ctrl+T"))
        self.actionOriginal.setText(_translate("MainWindow", "original"))
        self.actionOriginal.setToolTip(_translate("MainWindow", "Search for original, Ctrl+O"))
        self.actionOriginal.setShortcut(_translate("MainWindow", "Ctrl+O"))
        self.actionVid.setText(_translate("MainWindow", "vid"))
        self.actionVid.setToolTip(_translate("MainWindow", "Filter on movies available"))
        self.actionCheckBoxDVDCover.setText(_translate("MainWindow", "checkBoxDVDCover"))
        self.actionCheckBoxDVDCover.setToolTip(_translate("MainWindow", "Show only DVD covers"))
        self.actionSuche.setText(_translate("MainWindow", "search"))
        self.actionSuche.setToolTip(_translate("MainWindow", "Extended search, Ctrl+F"))
        self.actionSuche.setShortcut(_translate("MainWindow", "Ctrl+F"))
        self.actionDrucken.setText(_translate("MainWindow", "print"))
        self.actionDrucken.setToolTip(_translate("MainWindow", "Print, Ctrl+P"))
        self.actionDrucken.setShortcut(_translate("MainWindow", "Ctrl+P"))
        self.actionSuchfeld.setText(_translate("MainWindow", "search field"))
        self.actionFirst.setText(_translate("MainWindow", "first"))
        self.actionFirst.setToolTip(_translate("MainWindow", "go to first page, F6"))
        self.actionFirst.setShortcut(_translate("MainWindow", "F6"))
        self.actionPrev.setText(_translate("MainWindow", "Prev"))
        self.actionPrev.setToolTip(_translate("MainWindow", "1 page back, F7"))
        self.actionPrev.setShortcut(_translate("MainWindow", "F7"))
        self.actionNext.setText(_translate("MainWindow", "Next"))
        self.actionNext.setToolTip(_translate("MainWindow", "Next page, F8"))
        self.actionNext.setShortcut(_translate("MainWindow", "F8"))
        self.actionLast.setText(_translate("MainWindow", "Last"))
        self.actionLast.setToolTip(_translate("MainWindow", "Go to last page, F9"))
        self.actionLast.setShortcut(_translate("MainWindow", "F9"))
        self.actionAnzahlBilder.setText(_translate("MainWindow", "quantityofImages"))
        self.actionUndo.setText(_translate("MainWindow", "undo"))
        self.actionUndo.setToolTip(_translate("MainWindow", "recover, Ctrl+W"))
        self.actionUndo.setShortcut(_translate("MainWindow", "Ctrl+W"))
        self.actionDarstellerUebernehmen.setText(_translate("MainWindow", "Adopt actor"))
        self.actionDarstellerUebernehmen.setToolTip(_translate("MainWindow", "Adopt actor"))
        self.actionAnzeigenOriginal.setText(_translate("MainWindow", "Show all scenes of the movie"))
        self.actionAnzeigenOriginal.setToolTip(_translate("MainWindow", "Show all scenes of the movie"))
        self.actionSortieren_nach_Darsteller.setText(_translate("MainWindow", "Sort on actors"))
        self.actionSortieren_nach_Darsteller.setToolTip(_translate("MainWindow", "Sort on actors"))
        self.actionSortieren_nach_CD.setText(_translate("MainWindow", "Sort on CD"))
        self.actionSortieren_nach_CD.setToolTip(_translate("MainWindow", "Sort on CD"))
        self.actionSortieren_nach_Titel.setText(_translate("MainWindow", "Sort on title"))
        self.actionSortieren_nach_Titel.setToolTip(_translate("MainWindow", "Sort on title"))
        self.actionOriginal_umbenennen.setText(_translate("MainWindow", "Rename original title"))
        self.actionOriginal_umbenennen.setToolTip(_translate("MainWindow", "Rename original title"))
        self.actionOriginal_weitere.setText(_translate("MainWindow", "Add more titles"))
        self.actionOriginal_weitere.setToolTip(_translate("MainWindow", "Add more titles"))
        self.actionSortieren_nach_Original.setText(_translate("MainWindow", "Sort on original title"))
        self.actionSortieren_nach_Original.setToolTip(_translate("MainWindow", "Sort on original title"))
        self.actionCovergross.setText(_translate("MainWindow", "Show cover fullscale"))
        self.actionCovergross.setToolTip(_translate("MainWindow", "Show cover fullscale"))
        self.actionBildLoeschen.setText(_translate("MainWindow", "Delete image file(s)"))
        self.actionBildLoeschen.setToolTip(_translate("MainWindow", "Delete image file(s)"))
        self.actionAnzeigenPaar.setText(_translate("MainWindow", "Show pairing"))
        self.actionAnzeigenPaar.setToolTip(_translate("MainWindow", "Show pairing"))
        self.actionBildanzeigegross.setText(_translate("MainWindow", "Show image fullscale"))
        self.actionBildanzeigegross.setToolTip(_translate("MainWindow", "Show image fullscale"))
        self.actionFilm_zeigen.setText(_translate("MainWindow", "Show movie"))
        self.actionFilm_zeigen.setToolTip(_translate("MainWindow", "Show movie"))
        self.actionCSZeigen.setText(_translate("MainWindow", "show"))
        self.actionCSZeigen.setToolTip(_translate("MainWindow", "show"))
        self.actionNeueingabe.setText(_translate("MainWindow", "new"))
        self.actionNeueingabe.setToolTip(_translate("MainWindow", "Add new movie, F5"))
        self.actionNeueingabe.setShortcut(_translate("MainWindow", "F5"))
        self.actionOnHelp.setText(_translate("MainWindow", "Help"))
        self.actionOnHelp.setToolTip(_translate("MainWindow", "Help, F1"))
        self.actionOnHelp.setShortcut(_translate("MainWindow", "F1"))
        self.actionOriginalIntoClipboard.setText(_translate("MainWindow", "Put original title into clipboard"))
        self.actionOriginalIntoClipboard.setToolTip(_translate("MainWindow", "<html><head/><body><p>Put original title into clipboard of the PorDB</p></body></html>"))
        self.actionRedoImageChange.setText(_translate("MainWindow", "Redo image change"))
        self.actionRedoImageChange.setToolTip(_translate("MainWindow", "Redo image change"))
        self.actionGetUrl.setText(_translate("MainWindow", "Put actors URL into clipboard"))
        self.actionGetUrl.setToolTip(_translate("MainWindow", "<html><head/><body><p>Get URL form database and put it into clipboard</p></body></html>"))
        self.actionGoToUrl.setText(_translate("MainWindow", "Go to website of this actor"))
        self.actionGoToUrl.setToolTip(_translate("MainWindow", "<html><head/><body><p>Go to website of this actor</p></body></html>"))
        self.actionAnzeigenTitle.setText(_translate("MainWindow", "Show all scenes with similar title"))
        self.actionAnzeigenTitle.setToolTip(_translate("MainWindow", "Show all scenes with similar title"))
        self.actionShowDetails.setText(_translate("MainWindow", "Show actors details"))
        self.actionShowDetails.setToolTip(_translate("MainWindow", "<html><head/><body><p>Show actors details</p></body></html>"))
        self.actionMassChange.setText(_translate("MainWindow", "Make a mass change"))
        self.actionMassChange.setToolTip(_translate("MainWindow", "<html><head/><body><p>Make a mass change</p></body></html>"))
        self.actionAddInformationFromIAFD.setText(_translate("MainWindow", "Add data from IAFD"))
        self.actionAddInformationFromIAFD.setToolTip(_translate("MainWindow", "Add data from IAFD"))
        self.actionDeleteImageFromView.setText(_translate("MainWindow", "Delete Image From View"))
        self.actionDeleteImageFromView.setToolTip(_translate("MainWindow", "Delete Image From View")) class Suchen(QtWidgets.QDialog, pordb_suchen):
    def __init__(self, parent=None):
        QtWidgets.QDialog.__init__(self)
        self.setupUi(self)
        
        self.pushButtonStar1.clicked.connect(self.onStar1)
        self.pushButtonStar2.clicked.connect(self.onStar2)
        self.pushButtonStar3.clicked.connect(self.onStar3)
        self.pushButtonStar4.clicked.connect(self.onStar4)
        self.pushButtonStar5.clicked.connect(self.onStar5)
        self.pushButtonClear.clicked.connect(self.onClearStars)
        self.pushButtonSuchen.clicked.connect(self.accept)
        self.pushButtonCancel.clicked.connect(self.close)
        self.pushButtonRefresh.clicked.connect(self.onRefresh)
        
        self.set_stars = 0
        self.icon_starred = QtGui.QIcon()
        self.icon_starred.addPixmap(QtGui.QPixmap("pypordb/starred.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.icon_nonstarred = QtGui.QIcon()
        self.icon_nonstarred.addPixmap(QtGui.QPixmap("pypordb/non-starred.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        
    def onStar1(self):
        self.pushButtonStar1.setIcon(self.icon_starred)
        self.pushButtonStar2.setIcon(self.icon_nonstarred)
        self.pushButtonStar3.setIcon(self.icon_nonstarred)
        self.pushButtonStar4.setIcon(self.icon_nonstarred)
        self.pushButtonStar5.setIcon(self.icon_nonstarred)
        self.pushButtonSuchen.setFocus()
        self.set_stars = 1
        
    def onStar2(self):
        self.pushButtonStar1.setIcon(self.icon_starred)
        self.pushButtonStar2.setIcon(self.icon_starred)
        self.pushButtonStar3.setIcon(self.icon_nonstarred)
        self.pushButtonStar4.setIcon(self.icon_nonstarred)
        self.pushButtonStar5.setIcon(self.icon_nonstarred)
        self.pushButtonSuchen.setFocus()
        self.set_stars = 2
        
    def onStar3(self):
        self.pushButtonStar1.setIcon(self.icon_starred)
        self.pushButtonStar2.setIcon(self.icon_starred)
        self.pushButtonStar3.setIcon(self.icon_starred)
        self.pushButtonStar4.setIcon(self.icon_nonstarred)
        self.pushButtonStar5.setIcon(self.icon_nonstarred)
        self.pushButtonSuchen.setFocus()
        self.set_stars = 3
        
    def onStar4(self):
        self.pushButtonStar1.setIcon(self.icon_starred)
        self.pushButtonStar2.setIcon(self.icon_starred)
        self.pushButtonStar3.setIcon(self.icon_starred)
        self.pushButtonStar4.setIcon(self.icon_starred)
        self.pushButtonStar5.setIcon(self.icon_nonstarred)
        self.pushButtonSuchen.setFocus()
        self.set_stars = 4
        
    def onStar5(self):
        self.pushButtonStar1.setIcon(self.icon_starred)
        self.pushButtonStar2.setIcon(self.icon_starred)
        self.pushButtonStar3.setIcon(self.icon_starred)
        self.pushButtonStar4.setIcon(self.icon_starred)
        self.pushButtonStar5.setIcon(self.icon_starred)
        self.pushButtonSuchen.setFocus()
        self.set_stars = 5
        
    def onClearStars(self):
        self.pushButtonStar1.setIcon(self.icon_nonstarred)
        self.pushButtonStar2.setIcon(self.icon_nonstarred)
        self.pushButtonStar3.setIcon(self.icon_nonstarred)
        self.pushButtonStar4.setIcon(self.icon_nonstarred)
        self.pushButtonStar5.setIcon(self.icon_nonstarred)
        self.pushButtonSuchen.setFocus()
        self.set_stars = 0
        
    def onRefresh(self):
        self.lineEditDarsteller.clear()
        self.lineEditCD.clear()
        self.lineEditTitel.clear()
        self.lineEditOriginal.clear()
        self.checkBoxVid.setChecked(True)
        self.checkBoxWatched.setChecked(True)
        self.checkBoxNotVid.setChecked(True)
        self.checkBoxNotWatched.setChecked(True)
        self.comboBoxCS.setCurrentIndex(-1)
        self.pushButtonStar1.setIcon(self.icon_nonstarred)
        self.pushButtonStar2.setIcon(self.icon_nonstarred)
        self.pushButtonStar3.setIcon(self.icon_nonstarred)
        self.pushButtonStar4.setIcon(self.icon_nonstarred)
        self.pushButtonStar5.setIcon(self.icon_nonstarred)
        self.set_stars = 0
        self.lineEditRemarks.clear()
        self.lineEditDarsteller.setFocus() class Cover(QtWidgets.QDialog, pordb_cover):
    def __init__(self, cover, verzeichnis_original, original=None, parent=None):
        QtWidgets.QDialog.__init__(self)
        self.setupUi(self)
        self.cover = cover
        self.original = original
        self.verzeichnis_original = verzeichnis_original
        self.filename = None
        self.originaldatei = None
        
        self.pushButtonCoverOriginalAlt.clicked.connect(self.onCoverOriginalAlt)
        self.pushButtonCover.clicked.connect(self.accept)
        self.pushButtonCancel.clicked.connect(self.close)
        
        self.pushButtonCover.setFocus()
        width = 280
        height = 366
        self.bildQImage = QtGui.QImage(cover[0])
        self.labelBild1.setAlignment(QtCore.Qt.AlignTop)
        image = self.bildQImage.scaled(width, height, QtCore.Qt.KeepAspectRatio, QtCore.Qt.SmoothTransformation)
        self.labelBild1.setPixmap(QtGui.QPixmap.fromImage(image))
        self.labelBilddatei1.setText(cover[0])
        self.labelSize1.setText(str(self.bildQImage.width()) +"x" +str(self.bildQImage.height()))
        
        self.bildQImage = QtGui.QImage(cover[1])
        self.labelBild2.setAlignment(QtCore.Qt.AlignTop)
        image = self.bildQImage.scaled(width, height, QtCore.Qt.KeepAspectRatio, QtCore.Qt.SmoothTransformation)
        self.labelBild2.setPixmap(QtGui.QPixmap.fromImage(image))
        self.labelBilddatei2.setText(cover[1])
        self.labelSize2.setText(str(self.bildQImage.width()) +"x" +str(self.bildQImage.height()))
        
        zu_lesen = "SELECT * FROM pordb_vid_neu"
        self.lese_func = DBLesen(self, zu_lesen)
        self.res_vid_neu = DBLesen.get_data(self.lese_func)
        if self.res_vid_neu[0][3]:
            self.labelOriginal.setText(self.res_vid_neu[0][3])        
        
        self.radioButtonBild1.setChecked(True)
        self.lineEditDateiname.setFocus()
        
    def keyPressEvent(self, event):
        try:
            if event.modifiers() & QtCore.Qt.ControlModifier:
                if event.key() == QtCore.Qt.Key_Y:
                    self.onCoverOriginalAlt()
                    self.update()
            elif event.key() == QtCore.Qt.Key_Return or event.key() == QtCore.Qt.Key_Enter:
                self.accept()
            elif event.key() == QtCore.Qt.Key_Escape:
                self.close()
            else:
                self.keyPressEvent(self)
        except:
            pass
    
    def onCoverOriginalAlt(self):
        if self.res_vid_neu[0][3]:
            self.lineEditDateiname.setText(self.res_vid_neu[0][3])
        self.pushButtonCover.setFocus()
        
    def accept(self):
        if not self.radioButtonBild1.isChecked() and not self.radioButtonBild2.isChecked():
            message = QtWidgets.QMessageBox.critical(self, self.tr("Error "), self.tr("Please mark front side"))
            return
        
        if self.radioButtonBild2.isChecked():
            self.cover.reverse()
            
        bild1 = QtGui.QPixmap(self.cover[0])
        bild2 = QtGui.QPixmap(self.cover[1])
        w = bild1.width() + bild2.width()
        h = max(bild1.height(), bild2.height())
        bild = QtGui.QPixmap(w, h)
        bild.fill(QtGui.QColor("white"))
        
        p = QtGui.QPainter(bild)
        p.drawPixmap(0, 0, bild1)
        p.drawPixmap(bild1.width(), 0, bild2)
        p.end()
        if self.original:
            self.lineEditDateiname.setText(self.original)
            self.originaldatei = self.original
        else:
            self.originaldatei = str(self.lineEditDateiname.text())
        dateiname = str(self.lineEditDateiname.text()).strip()
        if not dateiname:
            message = QtWidgets.QMessageBox.critical(self, self.tr("Error "), self.tr("Please enter a file name"))
            return
        if dateiname.find("/") > -1:
            message = QtWidgets.QMessageBox.critical(self, self.tr("Error "), self.tr("Error: Original has a character /"))
            return
        if not dateiname.endswith(".jpg"):
            dateiname += ".jpg"
        original = os.path.join(self.verzeichnis_original, dateiname)
        bild.save(original)
        if original != self.cover[0]:
            os.remove(self.cover[0])
        if original != self.cover[1]:
            os.remove(self.cover[1])
        self.filename = original
        
        self.close()
        
    def datei(self):
        return self.filename, self.originaldatei class ShowTwoImages(QtWidgets.QDialog, pordb_show_two_images):
    def __init__(self, bilddatei1, bilddatei2):
        QtWidgets.QDialog.__init__(self)
        self.setupUi(self)
        self.bilddatei1 = bilddatei1
        self.bilddatei2 = bilddatei2
        self.filename = None
        self.wanted_file = None
        
        self.pushButtonOk.clicked.connect(self.accept)
        self.pushButtonCancel.clicked.connect(self.close)
        
        self.pushButtonOk.setFocus()
        width = 280
        height = 366
        self.bildQImage = QtGui.QImage(self.bilddatei1)
        self.labelBild1.setAlignment(QtCore.Qt.AlignTop)
        image = self.bildQImage.scaled(width, height, QtCore.Qt.KeepAspectRatio, QtCore.Qt.SmoothTransformation)
        self.labelBild1.setPixmap(QtGui.QPixmap.fromImage(image))
        self.labelBilddatei1.setText(self.bilddatei1)
        self.labelSize1.setText(str(QtGui.QPixmap(self.bilddatei1).width()) +"x" +str(QtGui.QPixmap(self.bilddatei1).height()))
        
        self.bildQImage = QtGui.QImage(self.bilddatei2)
        self.labelBild2.setAlignment(QtCore.Qt.AlignTop)
        image = self.bildQImage.scaled(width, height, QtCore.Qt.KeepAspectRatio, QtCore.Qt.SmoothTransformation)
        self.labelBild2.setPixmap(QtGui.QPixmap.fromImage(image))
        self.labelBilddatei2.setText(self.bilddatei2)
        self.labelSize2.setText(str(QtGui.QPixmap(self.bilddatei2).width()) +"x" +str(QtGui.QPixmap(self.bilddatei2).height()))
        
        self.radioButtonBild1.setChecked(True)
        
    def accept(self):
        if self.radioButtonBild1.isChecked():
            self.wanted_file = 1
        else:
            self.wanted_file = 2
            
        self.close()
        
    def datei(self):
        return self.wanted_file class Neueingabe(QtWidgets.QDialog, pordb_neu):
    def __init__(self, verzeichnis, verzeichnis_original, verzeichnis_thumbs, verzeichnis_trash, verzeichnis_cover, bilddatei, titel=None, darsteller=None, cd=None, bild=None, gesehen=None, original=None, cs=None, vorhanden=None, remarks=None, stars=None, cover=None, undo=None, cover_anlegen=None, original_weitere=None, original_cover = None, high_definition = None, access_from_iafd = None):
        
        QtWidgets.QDialog.__init__(self)
        self.setupUi(self)
        self.bilddatei = bilddatei
        self.titel = titel
        self.darsteller = darsteller
        self.cd = cd
        self.bild = bild
        self.gesehen = gesehen
        self.original = original
        self.cs = cs
        self.vorhanden = vorhanden
        self.stars = stars
        self.remarks = remarks
        self.undo = undo
        self.cover = cover
        self.cover_anlegen = cover_anlegen
        self.cover_austauschen = 0
        self.original_weitere = original_weitere
        self.verzeichnis = verzeichnis
        self.verzeichnis_original = verzeichnis_original 
        self.verzeichnis_thumbs = verzeichnis_thumbs 
        self.verzeichnis_trash = verzeichnis_trash 
        self.verzeichnis_cover = verzeichnis_cover
        self.original_cover = original_cover
        self.high_definition = high_definition
        self.access_from_iafd = access_from_iafd
        self.icon_starred = QtGui.QIcon()
        self.icon_starred.addPixmap(QtGui.QPixmap("pypordb/starred.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.icon_nonstarred = QtGui.QIcon()
        self.icon_nonstarred.addPixmap(QtGui.QPixmap("pypordb/non-starred.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.set_stars = stars
        
        self.pushButtonNeuOK.clicked.connect(self.accept)
        self.pushButtonNeuCancel.clicked.connect(self.close)
        self.pushButtonNeuDelete.clicked.connect(self.onDelete)
        self.pushButtonOriginal.clicked.connect(self.onOriginal)
        self.pushButtonOriginalAlt.clicked.connect(self.onOriginalAlt)
        self.pushButtonRepeat.clicked.connect(self.onRepeat)
        self.pushButtonAddYear.clicked.connect(self.onAddYear)
        self.pushButtonStar1.clicked.connect(self.onStar1)
        self.pushButtonStar2.clicked.connect(self.onStar2)
        self.pushButtonStar3.clicked.connect(self.onStar3)
        self.pushButtonStar4.clicked.connect(self.onStar4)
        self.pushButtonStar5.clicked.connect(self.onStar5)
        self.pushButtonClearRating.clicked.connect(self.onClearRating)
        self.listWidgetW.itemDoubleClicked.connect(self.onDarstelleruebernehmen)
        self.listWidgetM.itemDoubleClicked.connect(self.onDarstelleruebernehmen)
        self.pushButtonNeuDarstelleruebernehmen.clicked.connect(self.onDarstelleruebernehmen)
        self.pushButtonBildloeschen.clicked.connect(self.onBildloeschen)
        self.pushButtonVerz.clicked.connect(self.onVerzeichnisWechseln)
        self.pushButtonBildbeschneiden.clicked.connect(self.onBildbeschneiden)
        
        self.pushButtonNeuOK.setDefault(True)
        
        settings = QtCore.QSettings()
        window_size = settings.value("Neueingabe/Size", QtCore.QSize(600, 500))
        self.resize(window_size)
        window_position = settings.value("Neueingabe/Position", QtCore.QPoint(0, 0))
        self.move(window_position)
        
        # populate combobox for years
        today = datetime.date.today()
        self.comboBoxYear.clear()
        for i in range(today.year + 1, 1899, -1):
            self.comboBoxYear.addItem(str(i))
        self.comboBoxYear.setCurrentIndex(1)
        
        # set default position for cropping images
        self.positionX = 0
        self.positionY = 0
        
        zu_lesen = "SELECT * FROM pordb_vid_neu"
        self.lese_func = DBLesen(self, zu_lesen)
        self.res_vid_neu = DBLesen.get_data(self.lese_func)
        if self.res_vid_neu[0][3]:
            self.labelOriginal.setText(self.res_vid_neu[0][3])
        
        zu_lesen = "SELECT * FROM pordb_darsteller100 ORDER BY darsteller"
        self.lese_func = DBLesen(self, zu_lesen)
        res = DBLesen.get_data(self.lese_func)
        res.sort()
        res.reverse()
        darsteller_m = []
        darsteller_w = []
        for i in res:
            zu_lesen = "SELECT sex FROM pordb_darsteller WHERE darsteller = %s"
            self.lese_func = DBLesen(self, zu_lesen, tuple(i)[1].rstrip())
            res2 = DBLesen.get_data(self.lese_func)
            try:
                if res2 [0][0] == "w":
                    darsteller_w.append(tuple (i)[1].rstrip())
                else:
                    darsteller_m.append(tuple (i)[1].rstrip())
            except:
                pass
        darsteller_w.sort()
        darsteller_m.sort()
        self.listWidgetM.clear()
        self.listWidgetW.clear()
        initial = ' '
        for i in darsteller_w:
            newitem = QtWidgets.QListWidgetItem(i)
            if i[0] != initial:
                initial = i[0]
                newitem.setForeground(QtGui.QColor('red'))
            else:
                newitem.setForeground(QtGui.QColor('black'))
            self.listWidgetW.addItem(newitem)
        initial = ' '
        for i in darsteller_m:
            newitem = QtWidgets.QListWidgetItem(i)
            if i[0] != initial:
                initial = i[0]
                newitem.setForeground(QtGui.QColor('red'))
            else:
                newitem.setForeground(QtGui.QColor('black'))
            self.listWidgetM.addItem(newitem)
            
        self.bilddarstellen()
        
        if self.titel:
            self.korrektur = True
            self.lineEditNeuTitel.setText(self.titel.strip())
            self.lineEditNeuDarsteller.setText(self.darsteller.strip())
            self.lineEditNeuCD.setText(str(self.cd))
            self.cd_alt = str(self.cd)
            self.lineEditNeuBild.setText(self.bild.strip())
            if self.gesehen == "x":
                self.radioButtonGesehenJa.setChecked(True)
            else:
                self.radioButtonGesehenNein.setChecked(True)
            self.lineEditNeuOriginal.setText(self.original.strip())
            for i in cs:
                if i[-1] == "f":
                    anzahl = i[0:len(i) - 1]
                    self.spinBoxF.setValue(int(anzahl))
                elif i[-1] == "h":
                    anzahl = i[0:len(i) - 1]
                    self.spinBoxH.setValue(int(anzahl))
                elif i[-1] == "t":
                    anzahl = i[0:len(i) - 1]
                    self.spinBoxT.setValue(int(anzahl))
                elif i[-1] == "c":
                    anzahl = i[0:len(i) - 1]
                    self.spinBoxC.setValue(int(anzahl))
                elif i[-1] == "x":
                    anzahl = i[0:len(i) - 1]
                    self.spinBoxX.setValue(int(anzahl))
                elif i[-1] == "o":
                    anzahl = i[0:len(i) - 1]
                    self.spinBoxO.setValue(int(anzahl))
                elif i[-1] == "v":
                    anzahl = i[0:len(i) - 1]
                    self.spinBoxV.setValue(int(anzahl))
                elif i[-1] == "b":
                    anzahl = i[0:len(i) - 1]
                    self.spinBoxB.setValue(int(anzahl))
                elif i[-1] == "a":
                    anzahl = i[0:len(i) - 1]
                    self.spinBoxA.setValue(int(anzahl))
                elif i[-1] == "s":
                    anzahl = i[0:len(i) - 1]
                    self.spinBoxS.setValue(int(anzahl))
                elif i[-1] == "k":
                    anzahl = i[0:len(i) - 1]
                    self.spinBoxK.setValue(int(anzahl))
            if self.vorhanden == "x":
                self.radioButtonVorhandenJa.setChecked(True)
            else:
                self.radioButtonVorhandenNein.setChecked(True)
            self.plainTextEditRemarks.setPlainText(self.remarks)
            if self.stars == 1:
                self.pushButtonStar1.setIcon(self.icon_starred)
            elif self.stars == 2:
                self.pushButtonStar1.setIcon(self.icon_starred)
                self.pushButtonStar2.setIcon(self.icon_starred)
            elif self.stars == 3:
                self.pushButtonStar1.setIcon(self.icon_starred)
                self.pushButtonStar2.setIcon(self.icon_starred)
                self.pushButtonStar3.setIcon(self.icon_starred)
            elif self.stars == 4:
                self.pushButtonStar1.setIcon(self.icon_starred)
                self.pushButtonStar2.setIcon(self.icon_starred)
                self.pushButtonStar3.setIcon(self.icon_starred)
                self.pushButtonStar4.setIcon(self.icon_starred)
            elif self.stars == 5:
                self.pushButtonStar1.setIcon(self.icon_starred)
                self.pushButtonStar2.setIcon(self.icon_starred)
                self.pushButtonStar3.setIcon(self.icon_starred)
                self.pushButtonStar4.setIcon(self.icon_starred)
                self.pushButtonStar5.setIcon(self.icon_starred)                 
            self.pushButtonBildloeschen.setEnabled(False)
            self.pushButtonBildbeschneiden.setEnabled(False)
            if self.undo:
                self.pushButtonNeuDelete.setEnabled(False)
            self.pushButtonVerz.setEnabled(False)
            if self.cover or self.original_cover:
                self.radioButtonCoverJa.setChecked(True)
                self.radioButtonCoverNein.setChecked(False)
            else:
                self.radioButtonCoverNein.setChecked(True)
                self.radioButtonCoverJa.setChecked(False)
            if self.high_definition == "0":
                self.comboBoxDefinition.setCurrentIndex(1)
            elif self.high_definition == "1":
                self.comboBoxDefinition.setCurrentIndex(2)
            elif self.high_definition == "2":
                self.comboBoxDefinition.setCurrentIndex(3)
            elif self.high_definition == "3":
                self.comboBoxDefinition.setCurrentIndex(4)
            elif self.high_definition == "9":
                self.comboBoxDefinition.setCurrentIndex(5)
            else:
                self.comboBoxDefinition.setCurrentIndex(0)
        else:
            self.korrektur = False
            if self.darsteller:
                self.lineEditNeuDarsteller.setText(self.darsteller)
            if self.original:
                self.lineEditNeuOriginal.setText(self.original.strip())
            if self.cover_anlegen:
                self.radioButtonCoverJa.setChecked(True)
                self.radioButtonCoverNein.setChecked(False)
                anfang = os.path.basename(self.bilddatei).rfind('.')
                if self.original:
                    self.lineEditNeuOriginal.setText(self.original)
                else:
                    self.lineEditNeuOriginal.setText((os.path.basename(str(self.bilddatei)))[0:anfang])
            else:
                self.radioButtonCoverJa.setChecked(False)
                self.radioButtonCoverNein.setChecked(True)
            anfang = os.path.basename(str(self.bilddatei)).rfind('.')
            self.lineEditNeuTitel.setText((os.path.basename(str(self.bilddatei)))[0:anfang])
            dateiliste = os.listdir(self.verzeichnis)
            videodatei = os.path.splitext(os.path.basename(str(self.bilddatei)))[0]
            self.lineEditNeuTitel.setFocus()
            for i in dateiliste:
                datei = os.path.splitext(i)[0]
                ext = os.path.splitext(i)[1].lower()
                if ext in videodateien: 
                    if videodatei == datei or videodatei[0:len(videodatei) - 1] == datei or videodatei[0:len(videodatei) - 2] == datei or videodatei[0:len(videodatei) - 3] == datei: 
                        self.lineEditNeuTitel.setText(os.path.basename(i))
                        self.lineEditNeuDarsteller.setFocus()
                        break
            self.lineEditNeuCD.setText(str(self.res_vid_neu[0][2]))
            self.lineEditNeuBild.setText(os.path.basename(str(self.bilddatei)))
            if self.access_from_iafd:
                self.pushButtonBildloeschen.setEnabled(False)
                self.pushButtonBildbeschneiden.setEnabled(False)
                self.pushButtonVerz.setEnabled(False)
            else:
                self.pushButtonBildloeschen.setEnabled(True)
                self.pushButtonBildbeschneiden.setEnabled(True)
                self.pushButtonVerz.setEnabled(True)
            self.pushButtonNeuDelete.setEnabled(False)
                
    def keyPressEvent(self, event):
        try:
            if event.modifiers() & QtCore.Qt.ControlModifier:
                if event.key() == QtCore.Qt.Key_Y:
                    self.onOriginalAlt()
                    self.update()
                elif event.key() == QtCore.Qt.Key_B:
                    self.onBildbeschneiden()
                elif event.key() == QtCore.Qt.Key_D:
                    self.onVerzeichnisWechseln()
            elif event.modifiers() & QtCore.Qt.ShiftModifier and event.key() == QtCore.Qt.Key_Minus:
                self.onDelete()
            elif event.modifiers() & QtCore.Qt.ControlModifier and event.key() == QtCore.Qt.Key_Minus:
                self.onBildloeschen()
            elif event.key() == QtCore.Qt.Key_Return or event.key() == QtCore.Qt.Key_Enter:
                self.accept()
            elif event.key() == QtCore.Qt.Key_Escape:
                self.close()
            else:
                self.keyPressEvent(self)
        except:
            pass
            
    def onOriginal(self):
        originaldialog = OriginalErfassen(self.original_weitere)
        originaldialog.exec_()
        try:
            self.original_weitere = originaldialog.original
        except:
            pass
        self.pushButtonNeuOK.setFocus()
              
    def onOriginalAlt(self):
        if self.res_vid_neu[0][3]:
            self.lineEditNeuOriginal.setText(self.res_vid_neu[0][3])
        self.pushButtonNeuOK.setFocus()
        
    def onRepeat(self):
        if self.res_vid_neu[0][0]:
            self.lineEditNeuTitel.setText(self.res_vid_neu[0][0])
        if self.res_vid_neu[0][1]:
            self.lineEditNeuDarsteller.setText(self.res_vid_neu[0][1])
        if self.res_vid_neu[0][2]:
            self.lineEditNeuCD.setText(str(self.res_vid_neu[0][2]))
        if self.res_vid_neu[0][3]:
            self.lineEditNeuOriginal.setText(self.res_vid_neu[0][3])
        self.pushButtonNeuOK.setFocus()  
        
    def onAddYear(self):
        year = self.comboBoxYear.currentText()
        self.lineEditNeuOriginal.setText(self.lineEditNeuOriginal.text().strip() + " (" + str(year) + ")")
        self.pushButtonNeuOK.setFocus()
        
    def onStar1(self):
        self.pushButtonStar1.setIcon(self.icon_starred)
        self.pushButtonStar2.setIcon(self.icon_nonstarred)
        self.pushButtonStar3.setIcon(self.icon_nonstarred)
        self.pushButtonStar4.setIcon(self.icon_nonstarred)
        self.pushButtonStar5.setIcon(self.icon_nonstarred)
        self.pushButtonNeuOK.setFocus()
        self.set_stars = 1
        
    def onStar2(self):
        self.pushButtonStar1.setIcon(self.icon_starred)
        self.pushButtonStar2.setIcon(self.icon_starred)
        self.pushButtonStar3.setIcon(self.icon_nonstarred)
        self.pushButtonStar4.setIcon(self.icon_nonstarred)
        self.pushButtonStar5.setIcon(self.icon_nonstarred)
        self.pushButtonNeuOK.setFocus()
        self.set_stars = 2
        
    def onStar3(self):
        self.pushButtonStar1.setIcon(self.icon_starred)
        self.pushButtonStar2.setIcon(self.icon_starred)
        self.pushButtonStar3.setIcon(self.icon_starred)
        self.pushButtonStar4.setIcon(self.icon_nonstarred)
        self.pushButtonStar5.setIcon(self.icon_nonstarred)
        self.pushButtonNeuOK.setFocus()
        self.set_stars = 3
        
    def onStar4(self):
        self.pushButtonStar1.setIcon(self.icon_starred)
        self.pushButtonStar2.setIcon(self.icon_starred)
        self.pushButtonStar3.setIcon(self.icon_starred)
        self.pushButtonStar4.setIcon(self.icon_starred)
        self.pushButtonStar5.setIcon(self.icon_nonstarred)
        self.pushButtonNeuOK.setFocus()
        self.set_stars = 4
        
    def onStar5(self):
        self.pushButtonStar1.setIcon(self.icon_starred)
        self.pushButtonStar2.setIcon(self.icon_starred)
        self.pushButtonStar3.setIcon(self.icon_starred)
        self.pushButtonStar4.setIcon(self.icon_starred)
        self.pushButtonStar5.setIcon(self.icon_starred)
        self.pushButtonNeuOK.setFocus()
        self.set_stars = 5
        
    def onClearRating(self):
        self.pushButtonStar1.setIcon(self.icon_nonstarred)
        self.pushButtonStar2.setIcon(self.icon_nonstarred)
        self.pushButtonStar3.setIcon(self.icon_nonstarred)
        self.pushButtonStar4.setIcon(self.icon_nonstarred)
        self.pushButtonStar5.setIcon(self.icon_nonstarred)
        self.pushButtonNeuOK.setFocus()
        self.set_stars = 0
    
    def onDarstelleruebernehmen(self):
        selected = self.listWidgetW.selectedItems()
        selected.extend(self.listWidgetM.selectedItems())
        selected_str = []
        for i in selected:
            selected_str.append(str(i.text()))
        text = ", ".join(selected_str)
        self.lineEditNeuDarsteller.setText(text)
        self.lineEditNeuDarsteller.setFocus()
        self.lineEditNeuDarsteller.setCursorPosition(len(text))
        
    def onBildloeschen(self):
        os.remove(self.bilddatei)
        self.close()
            
    def onVerzeichnisWechseln(self):
        self.file, _ = QtWidgets.QFileDialog.getOpenFileName(self, self.tr("Image files"), os.path.dirname(str(self.bilddatei)), self.tr("Image files (*.jpg *.jpeg *.png);;all files (*.*)"))
        if not self.file:
            return
        self.bilddatei = str(self.file)
        self.bilddarstellen()
        anfang = (os.path.basename(str(self.bilddatei))).rfind('.')
        self.lineEditNeuTitel.setText((os.path.basename(str(self.file)))[0:anfang])
        self.lineEditNeuBild.setText(os.path.basename(str(self.file)))
        self.verzeichnis = os.path.dirname(str(self.file))
        
    def onBildbeschneiden(self):
        bilddialog = Bildbeschneiden(self.bilddatei, self.positionX, self.positionY)
        bilddialog.exec_()
        self.positionX = bilddialog.positionX
        self.positionY = bilddialog.positionY
        self.bilddarstellen()
        
    def bilddarstellen(self):
        bild = QtGui.QPixmap(self.bilddatei).scaled(sizeneu, QtCore.Qt.KeepAspectRatio)
        self.labelNeuBildanzeige.setPixmap(bild)
        text = str(QtGui.QPixmap(self.bilddatei).width()) +"x" +str(QtGui.QPixmap(self.bilddatei).height())
        self.groupBox_2.setTitle(text)
        
    def accept(self):
        fehler = 1
        actor_added = False
        actor_adding_asked = False
        while fehler:
            darsteller, fehler, fehler_index = self.darsteller_pruefen(str(self.lineEditNeuDarsteller.text()).title())
            if fehler:
                if fehler == 1:
                    zu_lesen = "SELECT darsteller FROM pordb_pseudo WHERE pseudo = %s"
                    self.lese_func = DBLesen(self, zu_lesen, darsteller[fehler_index].title().strip())
                    res = DBLesen.get_data(self.lese_func)
                    if res:
                        messageBox = QtWidgets.QMessageBox()
                        messageBox.addButton(self.tr("Yes"), QtWidgets.QMessageBox.AcceptRole)
                        messageBox.addButton(self.tr("No, correct entry"), QtWidgets.QMessageBox.RejectRole)
                        messageBox.addButton(self.tr("No, add new actor"), QtWidgets.QMessageBox.ActionRole)
                        messageBox.setWindowTitle(darsteller[fehler_index] +self.tr(" does not exist") +self.tr(", but I have found ") +res[0][0].strip() +self.tr(" as alias."))
                        messageBox.setIcon(QtWidgets.QMessageBox.Question)
                        messageBox.setText(self.tr("Do you want to take this actor instead?"))
                        messageBox.setDetailedText(darsteller[fehler_index] +self.tr(" does not exist") +self.tr(", but I have found ") +res[0][0].strip() +self.tr(" as alias. If you want to take this actor, click on yes, else change your entry or add a new actor to the database."))
                        message = messageBox.exec_()
                        if message == 0:
                            darsteller_alt = str(self.lineEditNeuDarsteller.text()).title().strip()
                            darsteller_neu = darsteller_alt.replace(darsteller[fehler_index].strip(), str(res[0][0]).strip())
                            try:
                                self.lineEditNeuDarsteller.setText(darsteller_neu)
                            except:
                                pass
                            return
                        elif message == 2:
                            self.darsteller_addieren(darsteller, fehler_index)
                            actor_added = True
                elif fehler == 2:
                    message = QtWidgets.QMessageBox.critical(self, self.tr("Error "), self.tr("You have entered some actors twice, please correct"))
                    return
                if actor_adding_asked:
                    return
                if not actor_added:
                    self.darsteller_addieren(darsteller, fehler_index)
                    actor_adding_asked = True
        titel = self.lineEditNeuTitel.text()
        if darsteller:
            darsteller = self.darsteller_sortieren(darsteller)
        if self.checkBoxUninteressant.isChecked():
            darsteller.append("(Uninteressant)")
        try:
            cd = int(self.lineEditNeuCD.text())
        except:
            message = QtWidgets.QMessageBox.critical(self, self.tr("Error "), self.tr("CD is not a number"))
            return
        bild = self.lineEditNeuBild.text()

        if not self.radioButtonVorhandenJa.isChecked() and not self.radioButtonVorhandenNein.isChecked():
            message = QtWidgets.QMessageBox.critical(self, self.tr("Error "), self.tr("Please mark whether movie is available"))
            return
        if self.radioButtonVorhandenJa.isChecked():
            vorhanden = "x"
        else:
            vorhanden = ""

        if not self.radioButtonGesehenNein.isChecked() and not self.radioButtonGesehenJa.isChecked():
            message = QtWidgets.QMessageBox.critical(self, self.tr("Error "), self.tr("Please mark whether movie has been watched"))
            return
        if self.radioButtonGesehenNein.isChecked():
            gesehen = " "
        else:
            gesehen = "x"
            
        try:
            original = str(self.lineEditNeuOriginal.text()).title().split()
        except:
            message = QtWidgets.QMessageBox.critical(self, self.tr("Error "), self.tr("Error: original title has invalid characters"))
            return
        
        # get rid of double spaces
        original = " ".join(original)

        if len(original) > 256:
            message = QtWidgets.QMessageBox.critical(self, self.tr("Error "), self.tr("Error, original title is longer than 256 characters."))
            return
        if not self.radioButtonCoverJa.isChecked() and not self.radioButtonCoverNein.isChecked():
            message = QtWidgets.QMessageBox.critical(self, self.tr("Error "), self.tr("Please check if image file is a cover"))
            return
        if self.radioButtonVorhandenJa.isChecked() and self.comboBoxDefinition.currentIndex() == 0 and not self.cover_austauschen:
            message = QtWidgets.QMessageBox.critical(self, self.tr("Error "), self.tr("Please select a resolution"))
            return
        if self.radioButtonVorhandenNein.isChecked() and self.comboBoxDefinition.currentIndex() != 0:
            message = QtWidgets.QMessageBox.critical(self, self.tr("Error "), self.tr("Video is not in stock: resolution deleted"))
            self.comboBoxDefinition.setCurrentIndex(0)
        zu_erfassen = []
        if self.korrektur and not self.undo:
            darsteller_liste = self.darsteller.strip().split(", ")
            if not darsteller_liste[0]:
                darsteller_liste = []
            for i in darsteller_liste:
                werte = []
                werte.append(i)
                zu_erfassen.append(["UPDATE pordb_darsteller SET anzahl = anzahl - 1 WHERE darsteller = %s", werte])
            if not self.radioButtonCoverJa.isChecked():
                bilddatei_alt = os.path.join(self.verzeichnis_thumbs, "cd" + str(self.cd_alt), str(bild).rstrip())
                if str(cd) != self.cd_alt:
                    bilddatei_neu = os.path.join(self.verzeichnis_thumbs, "cd" + str(cd), str(bild).rstrip())
                    os.renames(bilddatei_alt, bilddatei_neu)
                else:
                    if self.bilddatei != bilddatei_alt:
                        bilddatei = QtGui.QImage(self.bilddatei).scaled(size, QtCore.Qt.KeepAspectRatio)
                        if bilddatei.save(bilddatei_alt):
                            os.remove(self.bilddatei)
                        else:
                            message = QtWidgets.QMessageBox.critical(self, self.tr("Error "), self.tr("Error saving image file"))
                            return
            werte = []
            werte.append(self.cd_alt)
            werte.append(bild)
            zu_erfassen.append(["DELETE FROM pordb_partner WHERE cd = %s AND bild = %s", werte])
            werte = []
            werte.append(titel)
            werte.append(", ".join(darsteller))
            werte.append(cd)
            werte.append(bild)
            werte.append(gesehen)
            werte.append(original)
            zu_erfassen_zw = "UPDATE pordb_vid SET titel = %s, darsteller = %s, cd = %s, bild = %s, gesehen = %s, original = %s, csf = %s, csh = %s, cst = %s, csc = %s, csx = %s, cso = %s, csv = %s, csb = %s, csa = %s, css = %s, csk = %s, hd = %s, vorhanden = %s, remarks = %s, stars = %s WHERE cd = %s AND bild = %s"
            if self.spinBoxF.value() > 0:
                werte.append(self.spinBoxF.value())
                self.spinBoxK.setValue(0)
            else:
                werte.append(0)
            if self.spinBoxH.value() > 0:
                werte.append(self.spinBoxH.value())
                self.spinBoxK.setValue(0)
            else:
                werte.append(0)
            if self.spinBoxT.value() > 0:
                werte.append(self.spinBoxT.value())
                self.spinBoxK.setValue(0)
            else:
                werte.append(0)
            if self.spinBoxC.value() > 0:
                werte.append(self.spinBoxC.value())
                self.spinBoxK.setValue(0)
            else:
                werte.append(0)
            if self.spinBoxX.value() > 0:
                werte.append(self.spinBoxX.value())
                self.spinBoxK.setValue(0)
            else:
                werte.append(0)
            if self.spinBoxO.value() > 0:
                werte.append(self.spinBoxO.value())
                self.spinBoxK.setValue(0)
            else:
                werte.append(0)
            if self.spinBoxV.value() > 0:
                werte.append(self.spinBoxV.value())
                self.spinBoxK.setValue(0)
            else:
                werte.append(0)
            if self.spinBoxB.value() > 0:
                werte.append(self.spinBoxB.value())
                self.spinBoxK.setValue(0)
            else:
                werte.append(0)
            if self.spinBoxA.value() > 0:
                werte.append(self.spinBoxA.value())
                self.spinBoxK.setValue(0)
            else:
                werte.append(0)
            if self.spinBoxS.value() > 0:
                werte.append(self.spinBoxS.value())
                self.spinBoxK.setValue(0)
            else:
                werte.append(0)
            if self.spinBoxK.value() > 0:
                werte.append(self.spinBoxK.value())
            else:
                werte.append(0)
            if self.comboBoxDefinition.currentIndex() == 0:
                werte.append(None)
            elif self.comboBoxDefinition.currentIndex() == 1:
                werte.append("0")
            elif self.comboBoxDefinition.currentIndex() == 2:
                werte.append("1")
            elif self.comboBoxDefinition.currentIndex() == 3:
                werte.append("2")
            elif self.comboBoxDefinition.currentIndex() == 4:
                werte.append("3")
            elif self.comboBoxDefinition.currentIndex() == 5:
                werte.append("9")
            werte.append(vorhanden)
            werte.append(self.plainTextEditRemarks.toPlainText())
            werte.append(self.set_stars)
            werte.append(self.cd_alt)
            werte.append(bild)
            if self.radioButtonCoverJa.isChecked() and self.cover_austauschen:
                if os.path.exists(os.path.join(self.verzeichnis_thumbs, "cd" + str(self.cd_alt), bild.rstrip())):
                    # Bild war Thumbnail im CD Verzeichnis -> dieses löschen und neues im Cover Verzeichnis anlegen
                    os.remove(os.path.join(self.verzeichnis_thumbs, "cd" + str(self.cd_alt), bild.rstrip()))
                    os.rename(self.bilddatei, os.path.join(self.verzeichnis_cover, self.bild.strip()))
                else:
                    os.rename(self.bilddatei, os.path.join(self.verzeichnis_cover, self.bild.strip()))
        else:
            if self.radioButtonCoverJa.isChecked() and not original:
                message = QtWidgets.QMessageBox.critical(self, self.tr("Error "), self.tr("When adding a cover you must also enter a movie title"))
                return
            if self.undo:
                bilddatei = QtGui.QImage(os.path.join(self.verzeichnis_trash, bild))
            else:
                if self.radioButtonCoverJa.isChecked():
                    bilddatei = QtGui.QImage(os.path.join(self.verzeichnis, bild))
                else:
                    bilddatei = QtGui.QImage(os.path.join(self.verzeichnis, bild)).scaled(size, QtCore.Qt.KeepAspectRatio)
            if self.radioButtonCoverJa.isChecked():
                newfilename = os.path.join(self.verzeichnis_cover, bild)
            else:
                newfilename = os.path.join(self.verzeichnis_thumbs, "cd" +str(cd), bild)
            # hier klappt noch etwas nicht richtig mit den Partnern, wenn len>256
            if len(bild) > 256 or os.path.exists(newfilename):
                neue_bilddatei = BilddateiUmbenennen(newfilename)
                if neue_bilddatei.exec_():
                    try:
                        bild_alt = os.path.join(self.verzeichnis, bild)
                        bild_neu = os.path.join(self.verzeichnis, neue_bilddatei.lineEditDateiname.text())
                        os.rename(bild_alt, bild_neu)
                        newfilename = os.path.join(os.path.dirname(newfilename), neue_bilddatei.lineEditDateiname.text())
                        bild = neue_bilddatei.lineEditDateiname.text()
                        titel = str(bild.split('.')[0])
                    except:
                        message = QtWidgets.QMessageBox.critical(self, self.tr("Error "), self.tr("Error on renaming image file"))
                        return
                else:
                    return
            else:
                if not os.path.exists(os.path.dirname(newfilename)):
                    os.mkdir(os.path.dirname(newfilename))
            if bilddatei.save(newfilename):
                if not self.undo:
                    os.remove(os.path.join(self.verzeichnis, str(bild)))
            else:
                message = QtWidgets.QMessageBox.critical(self, self.tr("Error "), self.tr("Error saving image file"))
                return
            werte = []
            werte.append("pordb_vid_primkey_seq")
            zu_lesen = "SELECT nextval(%s)"
            self.lese_func = DBLesen(self, zu_lesen, werte)
            res = DBLesen.get_data(self.lese_func)
            werte = []
            werte.append(titel)
            werte.append(", ".join(darsteller))
            werte.append(cd)
            werte.append(bild)
            werte.append(gesehen)
            werte.append(original)
            werte.append("")
            werte.append(vorhanden)
            werte.append(res[0][0])
            zu_erfassen_zw = "INSERT INTO pordb_vid VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)"
            if self.spinBoxF.value() > 0:
                cs = self.spinBoxF.value()
            else:
                cs = 0
            werte.append(cs)
            
            if self.spinBoxH.value() > 0:
                cs = self.spinBoxH.value()
            else:
                cs = 0
            werte.append(cs)
            
            if self.spinBoxT.value() > 0:
                cs = self.spinBoxT.value()
            else:
                cs = 0
            werte.append(cs)
            
            if self.spinBoxC.value() > 0:
                cs = self.spinBoxC.value()
            else:
                cs = 0
            werte.append(cs)
            
            if self.spinBoxX.value() > 0:
                cs = self.spinBoxX.value()
            else:
                cs = 0
            werte.append(cs)
            
            if self.spinBoxO.value() > 0:
                cs = self.spinBoxO.value()
            else:
                cs = 0
            werte.append(cs)
            
            if self.spinBoxV.value() > 0:
                cs = self.spinBoxV.value()
            else:
                cs = 0
            werte.append(cs)
            
            if self.spinBoxB.value() > 0:
                cs = self.spinBoxB.value()
            else:
                cs = 0
            werte.append(cs)
            
            if self.spinBoxA.value() > 0:
                cs = self.spinBoxA.value()
            else:
                cs = 0
            werte.append(cs)
            
            if self.spinBoxS.value() > 0:
                cs = self.spinBoxS.value()
            else:
                cs = 0
            werte.append(cs)
            
            if self.spinBoxK.value() > 0:
                cs = self.spinBoxK.value()
            else:
                cs = 0
            werte.append(cs)
                
            if self.comboBoxDefinition.currentIndex() == 0:
                werte.append(None)
            elif self.comboBoxDefinition.currentIndex() == 1:
                werte.append("0")
            elif self.comboBoxDefinition.currentIndex() == 2:
                werte.append("1")
            elif self.comboBoxDefinition.currentIndex() == 3:
                werte.append("2")
            elif self.comboBoxDefinition.currentIndex() == 4:
                werte.append("3")
            elif self.comboBoxDefinition.currentIndex() == 5:
                werte.append("9")
                
            werte.append(self.plainTextEditRemarks.toPlainText())
            werte.append(self.set_stars)
            
        zu_erfassen.append([zu_erfassen_zw, werte])
            
        for i in darsteller:
            if i.lstrip() == "" or i.lstrip() == "?":
                continue
            werte = []
            werte.append(i)
            zu_erfassen.append(["UPDATE pordb_darsteller SET anzahl = anzahl + 1 WHERE darsteller = %s", werte])
            if i == "" or i == "?" or i == "(Uninteressant)" or i == "(Komplett)" or i == "(Schlechte Qualitaet)":
                continue
            zu_erfassen.append(["DELETE FROM pordb_darsteller100 WHERE darsteller = %s", werte])
            zu_erfassen.append(["INSERT INTO pordb_darsteller100 (darsteller) VALUES (%s)", werte])
            
            partner_zaehler = 0
            if i.strip() != "(Uninteressant)" and i.strip() != "Defekt":
                zu_lesen = "SELECT sex FROM pordb_darsteller WHERE darsteller = %s"
                self.lese_func = DBLesen(self, zu_lesen, i)
                res = DBLesen.get_data(self.lese_func)
                geschlecht = res[0][0]
                for j in darsteller:
                    if j.strip() != "(Uninteressant)" and j.strip() != "Defekt" and i != j:
                        zu_lesen = "SELECT sex FROM pordb_darsteller WHERE darsteller = %s"
                        self.lese_func = DBLesen(self, zu_lesen, j)
                        res2 = DBLesen.get_data(self.lese_func)
                        geschlecht2 = res2[0][0]
                        if geschlecht != geschlecht2:
                            werte = []
                            werte.append(i)
                            werte.append(j)
                            werte.append(cd)
                            werte.append(bild)
                            zu_erfassen.append(["INSERT INTO pordb_partner VALUES (%s, %s, %s, %s)", werte])
                            zu_lesen = "SELECT darsteller FROM pordb_partner WHERE darsteller = %s AND partner = %s"
                            self.lese_func = DBLesen(self, zu_lesen, (i, j))
                            res3 = DBLesen.get_data(self.lese_func)
                            if not res3:
                                partner_zaehler += 1
                            
            if partner_zaehler > 0:
                werte = []
                werte.append(partner_zaehler)
                werte.append(i)
                zu_erfassen.append(["UPDATE pordb_darsteller SET partner = partner + %s WHERE darsteller = %s", werte])
                
        zu_lesen = "SELECT * FROM pordb_darsteller100"
        self.lese_func = DBLesen(self, zu_lesen)
        res1 = DBLesen.get_data(self.lese_func)
        anzahl_loeschen = len(res1) - 200
        if anzahl_loeschen > 0:
            res1.sort()
            for zaehler in range(anzahl_loeschen):
                werte = []
                werte.append(str(res1[zaehler][0]))
                zu_erfassen.append(["DELETE FROM pordb_darsteller100 WHERE nr = %s", werte])
        if not self.korrektur:
            werte = []
            werte.append(titel)
            werte.append(", ".join(darsteller))
            werte.append(cd)
            if original:
                werte.append(original)
                zu_erfassen.append(["UPDATE pordb_vid_neu SET titel = %s, darsteller = %s, cd = %s, original = %s", werte])
            else:
                zu_erfassen.append(["UPDATE pordb_vid_neu SET titel = %s, darsteller = %s, cd = %s", werte])
        
        update_func = DBUpdate(self, zu_erfassen)
        DBUpdate.update_data(update_func)
        
        if self.original_weitere:
            zu_erfassen = []
            if self.korrektur:
                zu_lesen = "SELECT primkey FROM pordb_vid WHERE cd = %s AND bild = %s"
                self.lese_func = DBLesen(self, zu_lesen, (str(self.cd_alt), str(bild)))
                curr_key = DBLesen.get_data(self.lese_func)
                werte = []
                werte.append(str(curr_key[0][0]))
                zu_erfassen.append(["DELETE FROM pordb_original WHERE foreign_key_pordb_vid = %s", werte])
            else:
                zu_lesen = "SELECT primkey FROM pordb_vid WHERE cd = %s AND bild = %s"
                self.lese_func = DBLesen(self, zu_lesen, (str(cd), bild))
                curr_key = DBLesen.get_data(self.lese_func)
            for i in self.original_weitere:
                if i:
                    if type(i) == str:
                        werte = []
                        werte.append(i.title())
                        werte.append(str(curr_key[0][0]))
                        zu_erfassen.append(["INSERT INTO pordb_original (original, foreign_key_pordb_vid) VALUES (%s, %s)", werte])
                    else:
                        werte = []
                        werte.append(i.decode().title())
                        werte.append(str(curr_key[0][0]))
                        zu_erfassen.append(["INSERT INTO pordb_original (original, foreign_key_pordb_vid) VALUES (%s, %s)", werte])
                    
            update_func = DBUpdate(self, zu_erfassen)
            DBUpdate.update_data(update_func)
        
        self.close()
        QtWidgets.QDialog.accept(self)
    # end of accept
    
    def darsteller_addieren (self, darsteller, fehler_index):
        messageBox = QtWidgets.QMessageBox()
        messageBox.addButton(self.tr("Yes, image exists"), QtWidgets.QMessageBox.AcceptRole)
        messageBox.addButton(self.tr("Yes, no image"), QtWidgets.QMessageBox.YesRole)
        messageBox.addButton(self.tr("No, correct entry"), QtWidgets.QMessageBox.RejectRole)
        messageBox.setWindowTitle(darsteller[fehler_index] +self.tr(" does not exist"))
        messageBox.setIcon(QtWidgets.QMessageBox.Question)
        messageBox.setText(self.tr("Do you want to add this actor?"))
        message = messageBox.exec_()
        if message == 2:
            korrekt = DarstellerKorrigieren(self.lineEditNeuDarsteller.text())
            korrekt.exec_()
            try:
                self.lineEditNeuDarsteller.setText(korrekt.darsteller)
            except:
                pass
            return

        neuer_darsteller = NeueingabeDarsteller(darsteller[fehler_index])
        neuer_darsteller.exec_()
        if message == 0:
            actor_file = False
            while not actor_file:
                self.file, _ = QtWidgets.QFileDialog.getOpenFileName(self, self.tr("Image of the actor ") +darsteller[fehler_index] +": " +self.tr("please select one"), self.verzeichnis, self.tr("Image files (*.jpg *.jpeg *.png);;all files (*.*)"))
                if self.file:
                    if self.file == self.bilddatei:
                        message = QtWidgets.QMessageBox.critical(self, self.tr("Error "), self.tr("Selected image is the one which should be added to the database. Please select another one."))
                        continue
                    else:
                        bild = QtGui.QImage(self.file)
                        if bild.width() > size_darsteller.width() or bild.height() > size_darsteller.height():
                            message = QtWidgets.QMessageBox.warning(self, self.tr("Caution! "), self.tr("Image of the actor is very big"))
                        zu_lesen = "SELECT sex FROM pordb_darsteller WHERE darsteller = %s"
                        self.lese_func = DBLesen(self, zu_lesen, darsteller[fehler_index].strip())
                        res = DBLesen.get_data(self.lese_func)
                        extension = os.path.splitext(str(self.file))[-1].lower()
                        if extension == '.jpeg':
                            extension = '.jpg'
                        try:
                            sex = res[0][0]
                            newfilename = os.path.join(self.verzeichnis_thumbs, "darsteller_" + sex, darsteller[fehler_index].strip().replace(" ", "_").replace("'", "_apostroph_").lower() + extension.strip())
                            os.rename(self.file, newfilename)
                        except:
                            pass
                        actor_file = True
                        
    # end of darsteller_addieren

    def darsteller_pruefen(self, darsteller_liste):
        darstellerliste = darsteller_liste.split(",")
        darsteller = []
        for i in darstellerliste:
            darsteller.append(i.strip())
        fehler = 0
        k = -1
        for i in darsteller:
            k += 1
            if i and i != "Defekt":
                zu_lesen = "SELECT sex FROM pordb_darsteller WHERE darsteller = %s"
                self.lese_func = DBLesen(self, zu_lesen, i.strip().title())
                res = DBLesen.get_data(self.lese_func)
                if not res:
                    fehler = 1
                for j in range(0, k):
                    if i == darsteller[j]:
                        fehler = 2
                        break
                if fehler:
                    break
        return (darsteller, fehler, k)
    
    def darsteller_sortieren(self, darsteller):
        darsteller_m = []
        darsteller_w = []
        defekt_schalter = False
        for i in darsteller:
            if i:
                if i == "Defekt":
                    defekt_schalter = True
                zu_lesen = "SELECT sex FROM pordb_darsteller WHERE darsteller = %s"
                self.lese_func = DBLesen(self, zu_lesen, i.strip().replace("''''", "''").title()) # 2nd replace when coming from actor renaming function
                res = DBLesen.get_data(self.lese_func)
                try:
                    sex = res[0][0]
                    try:
                        if sex == "w":
                            darsteller_w.append(i.strip().title())
                        else:
                            darsteller_m.append(i.strip().title())
                    except:
                        pass
                except:
                    pass
        darsteller_w.sort()
        darsteller_m.sort()
        darsteller_liste = darsteller_w + darsteller_m
        if defekt_schalter:
            darsteller_liste.append("Defekt")
        return darsteller_liste
                    
    def onDelete(self):
        if self.undo:
            self.close()
            return
        darsteller_liste = self.darsteller.strip().split(", ")
        zu_erfassen = []
        for i in darsteller_liste:
            if i:
                werte = []
                werte.append(i)
                zu_erfassen.append(["UPDATE pordb_darsteller SET anzahl = anzahl - 1 WHERE darsteller = %s", werte])
        # Daten für undo sichern
        zu_lesen = "SELECT * FROM pordb_vid WHERE cd = %s AND bild = %s"
        self.lese_func = DBLesen(self, zu_lesen, (str(self.cd), self.bild))
        res = DBLesen.get_data(self.lese_func)

        # Dateien in Trash Verzeichnis löschen
        dateiliste = os.listdir(self.verzeichnis_trash)
        for datei in dateiliste:
            if datei.find("pypordb_bildalt") == -1:
                os.remove(self.verzeichnis_trash + '/' + datei)

        # Bild in Trash Verzeichnis verschieben
        if not os.path.exists(self.verzeichnis_trash):
            os.mkdir(self.verzeichnis_trash)
        filename = os.path.join(self.verzeichnis_thumbs, "cd" + str(self.cd), self.bild.strip())
        cover = None
        if not os.path.exists(filename):
            filename = os.path.join(self.verzeichnis_cover, self.bild.strip())
            cover = "x"
        newfilename = os.path.join(self.verzeichnis_trash, self.bild.strip())
        if os.path.exists(filename):
            os.rename(filename, newfilename)

        # Textdatei erstellen mit alten Daten
        textdatei = open(os.path.join(self.verzeichnis_trash, self.bild[-2] + ".txt"), "w")
        for i in res:
            for j in i:
                try:
                    textdatei.write(j.encode("utf-8").rstrip() +"\n")
                except:
                    textdatei.write(str(j).rstrip() +"\n")
        if cover:
            textdatei.write("COVER" +"\n")
        textdatei.close()

        werte = []
        werte.append(str(self.cd))
        werte.append(self.bild.strip())
        zu_erfassen.append(["DELETE FROM pordb_vid WHERE cd = %s AND bild = %s", werte])
        werte = []
        werte.append(str(self.cd))
        werte.append(self.bild.strip())
        zu_erfassen.append(["DELETE FROM pordb_partner WHERE cd = %s AND bild = %s", werte])
        
        update_func = DBUpdate(self, zu_erfassen)
        DBUpdate.update_data(update_func)
        
        zu_erfassen = []
        for i in darsteller_liste:
            if i:
                zu_lesen = "SELECT DISTINCT ON (partner) partner FROM pordb_partner WHERE darsteller = %s"
                self.lese_func = DBLesen(self, zu_lesen, i)
                res1 = DBLesen.get_data(self.lese_func)
                werte = []
                werte.append(len(res1))
                werte.append(i)
                zu_erfassen.append(["UPDATE pordb_darsteller SET partner = %s WHERE darsteller = %s", werte])
        if zu_erfassen:
            update_func = DBUpdate(self, zu_erfassen)
            DBUpdate.update_data(update_func)
        
        self.close()
        
    def closeEvent(self, event):
        settings = QtCore.QSettings()
        settings.setValue("Neueingabe/Size", self.size())
        settings.setValue("Neueingabe/Position", self.pos()) class DBLesen():
    def __init__(self, fenster, zu_lesen, werte = None):
        self.fenster = fenster
        self.zu_lesen = str(zu_lesen)
        if werte:
            if type(werte) == str:
                self.werte = []
                self.werte.append(werte)
            elif type(werte) == tuple or type(werte) == list:
                self.werte = werte
        else:
            self.werte = None
        self.res = []
        self.conn = None
        self.cur = None
        
    def get_data(self):
        db_host="localhost"
        try:
            self.conn = psycopg2.connect(database="por", host=db_host)
        except Exception as e:
            print(e)
            QtWidgets.QMessageBox.critical(self.fenster, self.fenster.tr("Error "), str(e))
            self.cur.close()
            return 
        self.cur = self.conn.cursor()
        try:
            if self.werte:
                self.cur.execute(self.zu_lesen, self.werte)
                #print (self.zu_lesen, self.werte)
            else:
                self.cur.execute(self.zu_lesen)
                #print (self.zu_lesen)
        except Exception as e:
            print(self.zu_lesen, type(self.zu_lesen))
            print(e)
            QtWidgets.QMessageBox.critical(self.fenster, self.fenster.tr("Error "), str(e))
            self.cur.close()
            return 
        self.res = self.cur.fetchall()
        self.cur.close()
        return self.res class DBUpdate():
    def __init__(self, fenster, update):
        self.fenster = fenster
        self.update = update
        self.conn = None
        self.cur = None
        db_host = "localhost"
        try:
            self.conn = psycopg2.connect(database="por", host=db_host)
        except Exception as e:
            print(e)
            QtWidgets.QMessageBox.critical(self.fenster, self.fenster.tr("Error "), str(e))
            return 
        self.cur = self.conn.cursor()
        
    def update_data(self):
        update_db = []
        if type(self.update) == str:
            update_db.append([self.update, None])
        elif type(self.update) == bytes:
            update_db.append([self.update.decode(), None])
        else:
            for i in self.update:
                werte = None
                if type(i) == str:
                    befehl = i
                elif type(i) == bytes:
                    befehl = i.decode()
                else:
                    befehl = i[0]
                    werte = i[1]
                update_db.append([befehl, werte])
        for i in update_db:
            #print (i)
            try:
                self.cur.execute(i[0], i[1])
            except Exception as e:
                print("Error:", e)
                print(i)
                QtWidgets.QMessageBox.critical(self.fenster, self.fenster.tr("Error "), str(e))
                self.cur.close()
                return 
        self.commit()
        
    def commit(self):
        self.conn.commit()
        self.cur.close()
        self.conn.close() class OriginalErfassen(QtWidgets.QDialog, pordb_original):
    def __init__(self, original_weitere=None, parent=None):
        QtWidgets.QDialog.__init__(self)
        self.setupUi(self)

        self.original_weitere = original_weitere
        row = 0
        if self.original_weitere:
            self.original_weitere.sort()
            self.tableWidget.clearContents()
            for i in self.original_weitere:
                if type(i) == str:
                    titel = i
                else:
                    titel = i.decode()
                newitem = QtWidgets.QTableWidgetItem(titel.title().strip())
                self.tableWidget.setItem(row, 0, newitem)
                row += 1
        newitem = QtWidgets.QTableWidgetItem("")
        self.tableWidget.setItem(row, 0, newitem)
        self.tableWidget.setCurrentItem(newitem)
        self.tableWidget.setFocus()
        self.tableWidget.editItem(self.tableWidget.currentItem())
        
        self.pushButtonSpeichern.clicked.connect(self.onSpeichern)
        self.pushButtonAbbrechen.clicked.connect(self.close)
        
    def onSpeichern(self):
        self.original = []
        for i in range(20):
            tableItem = self.tableWidget.item(i, 0)
            if tableItem:
                cellItem = str(QtWidgets.QTableWidgetItem(tableItem).text()).encode("utf-8")
                self.original.append(cellItem)
        self.close() class DarstellerSuchen(QtWidgets.QDialog, pordb_darsteller_suchen):
    def __init__(self, parent=None):
        QtWidgets.QDialog.__init__(self)
        self.setupUi(self)
        
        self.maximum = QtCore.QDate.currentDate()
        self.minimum = QtCore.QDate.fromString("20000101", "yyyyMMdd")
        self.dateEditDarstellerSucheAb.setDateRange(self.minimum, self.maximum)
        self.dateEditDarstellerSucheBis.setDateRange(self.minimum, self.maximum)
        self.dateEditDarstellerSucheBis.setDate(self.maximum)
        
        self.pushButtonSuchen.clicked.connect(self.accept)
        self.pushButtonCancel.clicked.connect(self.close)
        self.pushButtonRefresh.clicked.connect(self.onRefresh)
        
        # Fill comboboxes nation
        zu_lesen = "SELECT * FROM pordb_iso_land WHERE aktiv = %s ORDER BY land"
        lese_func = DBLesen(self, zu_lesen, "x")
        res = DBLesen.get_data(lese_func)
        self.comboBoxDarstellerSucheNation1.addItem("")
        self.comboBoxDarstellerSucheNation2.addItem("")
        self.comboBoxDarstellerSucheNation3.addItem("")
        for i in res:
            text = '%2s %-50s' % (i[0], i[1])
            bild = os.path.join(os.curdir, "pypordb", i[0] + ".svg")
            icon = QtGui.QIcon()
            icon.addFile(bild, QtCore.QSize(16, 16), QtGui.QIcon.Normal, QtGui.QIcon.Off)
            self.comboBoxDarstellerSucheNation1.addItem(icon, text)
            self.comboBoxDarstellerSucheNation2.addItem(icon, text)
            self.comboBoxDarstellerSucheNation3.addItem(icon, text)
        
    def onRefresh(self):
        self.lineEditDarstellerSuche.setText("")
        self.comboBoxDarstellerSucheGeschlecht.setCurrentIndex(-1)
        self.lineEditActor1.setText("")
        self.lineEditActor2.setText("")
        self.lineEditActor3.setText("")
        self.dateEditDarstellerSucheAb.setDate(self.minimum)
        self.dateEditDarstellerSucheBis.setDate(self.maximum)
        self.comboBoxDarstellerSucheHaar.setCurrentIndex(-1)
        self.comboBoxDarstellerSucheNation1.setCurrentIndex(0)
        self.comboBoxDarstellerSucheNation2.setCurrentIndex(0)
        self.comboBoxDarstellerSucheNation3.setCurrentIndex(0)
        self.comboBoxDarstellerSucheTattoo.setCurrentIndex(-1)
        self.lineEditDarstellerSucheTattoo.setText("")
        self.comboBoxDarstellerSucheEthnic.setCurrentIndex(-1)
        self.lineEditDarstellerSuche.setFocus() class DarstellerAnzeigeGross(QtWidgets.QDialog, pordb_bildgross):
    def __init__(self, bild, parent=None):
        QtWidgets.QDialog.__init__(self)
        self.setupUi(self)
        
        self.bild = bild
        
        # Workaround, weil keine Scrollarea in Qt Designer
        self.sa = QtWidgets.QScrollArea()
        self.labelBildgross.setParent(None)
        self.sa.setWidget(self.labelBildgross)
        self.hboxlayout.insertWidget(0, self.sa)
        self.bildQImage = QtGui.QImage(self.bild)
        self.showImage()
        
    def showImage(self):
        width = self.bildQImage.width()
        height = self.bildQImage.height()
        #self.resize(QtCore.QSize(QtCore.QRect(0,0,width+30,height+30).size()).expandedTo(self.minimumSizeHint()))
        #self.labelBildgross.setBaseSize(QtCore.QSize(width, height))
        self.labelBildgross.setGeometry(QtCore.QRect(0,0,width,height))
        #self.labelBildgross.setAlignment(QtCore.Qt.AlignCenter)
        image = self.bildQImage.scaled(width, height, QtCore.Qt.KeepAspectRatio, QtCore.Qt.SmoothTransformation)
        self.labelBildgross.setPixmap(QtGui.QPixmap.fromImage(image))
        self.sa.ensureVisible(0, 0)
        self.showFullScreen() class ActorDetails(QtWidgets.QDialog, pordb_actor_details):
    def __init__(self, darsteller, verzeichnis):
        QtWidgets.QDialog.__init__(self)
        self.setupUi(self)
        self.pushButtonOk.clicked.connect(self.close)
        
        self.darsteller = darsteller
        self.verzeichnis = verzeichnis
        
        settings = QtCore.QSettings()
        window_size = settings.value("ActorDetails/Size", QtCore.QSize(600, 500))
        self.resize(window_size)
        window_position = settings.value("ActorDetails/Position", QtCore.QPoint(0, 0))
        self.move(window_position)
        
        self.pushButtonOk.setFocus()
        width = 400
        height = 600
        
        zu_lesen = "SELECT * FROM pordb_darsteller WHERE darsteller = %s"
        lese_func = DBLesen(self, zu_lesen, self.darsteller)
        res = DBLesen.get_data(lese_func)
        
        bildname = darsteller.lower().strip().replace(" ", "_").replace("'", "_apostroph_")
        bilddarsteller = os.path.join(verzeichnis, "darsteller_" + res[0][1], bildname +".jpg")
        if not os.path.isfile(bilddarsteller):
            bilddarsteller = os.path.join(verzeichnis, "darsteller_" + res[0][1], bildname + ".png")
            if not os.path.isfile(bilddarsteller):
                bilddarsteller = os.path.join(verzeichnis, "nichtvorhanden", "nicht_vorhanden.jpg")
        
        self.bildQImage = QtGui.QImage(bilddarsteller)
        self.labelBild1.setAlignment(QtCore.Qt.AlignCenter)
        image = self.bildQImage.scaled(width, height, QtCore.Qt.KeepAspectRatio, QtCore.Qt.SmoothTransformation)
        self.labelBild1.setPixmap(QtGui.QPixmap.fromImage(image))

        self.labelName.setText(self.darsteller)
        
        self.tattoo = res[0][6]
        self.plainTextEditTattoos.setPlainText(self.tattoo)
        
        if res[0][11]:
            self.url = res[0][11]
            self.lineEditUrl.setText(self.url)
        else:
            self.url = ""
        
        self.lineEditDate.setText(str(res[0][3]))
        
    def closeEvent(self, event):
        if self.tattoo != self.plainTextEditTattoos.toPlainText() or self.url != self.lineEditUrl.text():
            zu_erfassen = []
            werte = []
            werte.append(self.plainTextEditTattoos.toPlainText())
            werte.append(self.lineEditUrl.text())
            werte.append(self.darsteller)
            zu_erfassen.append(["UPDATE pordb_darsteller SET tattoo = %s, url = %s WHERE darsteller = %s", werte])
            update_func = DBUpdate(self, zu_erfassen)
            DBUpdate.update_data(update_func)
        settings = QtCore.QSettings()
        settings.setValue("ActorDetails/Size", self.size())
        settings.setValue("ActorDetails/Position", self.pos()) class DarstellerUmbenennen(QtWidgets.QDialog, pordb_darsteller_umbenennen):
    def __init__(self, alter_name, parent=None):
        QtWidgets.QDialog.__init__(self)
        self.setupUi(self)
        
        self.pushButtonUmbenennen.clicked.connect(self.accept)
        self.pushButtonCancel.clicked.connect(self.close)
        
        self.lineEditNeuerName.setText(alter_name.strip("=").replace("''", "'")) class LandBearbeiten(QtWidgets.QDialog, pordb_land):
    def __init__(self, comboBoxNation, nation_fuellen, parent=None):
        QtWidgets.QDialog.__init__(self)
        self.setupUi(self)
        
        self.pushButtonLandSpeichern.clicked.connect(self.onSpeichern)
        self.pushButtonLandAbbrechen.clicked.connect(self.close)
        
        self.nation_fuellen = nation_fuellen
        
        zu_lesen = "SELECT * FROM pordb_iso_land ORDER BY land"
        lese_func = DBLesen(self, zu_lesen)
        res = DBLesen.get_data(lese_func)
        row = 0
        self.tableWidgetLaender.clear()
        self.tableWidgetLaender.setRowCount(len(res) + 1)
        for i in res:
            column = 0
            for j in i:
                if j:
                    if column == 0:
                        bild = os.path.join(os.curdir, "pypordb", i[0] + ".svg")
                        icon = QtGui.QIcon()
                        icon.addFile(bild, QtCore.QSize(24, 24), QtGui.QIcon.Normal, QtGui.QIcon.Off)
                        newitem = QtWidgets.QTableWidgetItem(icon, "")
                        self.tableWidgetLaender.setItem(row, column, newitem)
                        column += 1
                        newitem = QtWidgets.QTableWidgetItem(j.strip())
                    else:
                        newitem = QtWidgets.QTableWidgetItem(j.strip())
                else:
                    newitem = QtWidgets.QTableWidgetItem(" ")
                self.tableWidgetLaender.setItem(row, column, newitem)
                column += 1
            row += 1
        newitem = QtWidgets.QTableWidgetItem("")
        self.tableWidgetLaender.setItem(row, 1, newitem)
        self.tableWidgetLaender.setCurrentItem(newitem)
        self.tableWidgetLaender.setFocus()
        self.tableWidgetLaender.editItem(self.tableWidgetLaender.currentItem())          
        self.tableWidgetLaender.setHorizontalHeaderLabels([self.tr("Flag"), "ISO Code", self.tr("Country"), self.tr("active"), self.tr("Nationality")])
        self.tableWidgetLaender.setAlternatingRowColors(True)
        self.tableWidgetLaender.resizeColumnsToContents()
        self.tableWidgetLaender.resizeRowsToContents()
        
    def onSpeichern(self):
        zu_erfassen = []
        zu_erfassen.append("DELETE FROM pordb_iso_land")
        for i in range(self.tableWidgetLaender.rowCount()):
            cell = []
            for j in range(self.tableWidgetLaender.columnCount()):
                if j == 0: # column 0 is only flag icon
                    continue
                tableItem = self.tableWidgetLaender.item(i, j)
                try:
                    cellItem = str(QtWidgets.QTableWidgetItem(tableItem).text())
                    cell.append(cellItem)
                except:
                    pass
            try:
                if cell[0]:
                    werte = []
                    werte.append(cell[0])
                    werte.append(cell[1])
                    werte.append(cell[2])
                    werte.append(cell[3])
                    zu_erfassen.append(["INSERT INTO pordb_iso_land (iso, land, aktiv, national) VALUES (%s, %s, %s, %s)", werte])
            except:
                pass
        
        update_func = DBUpdate(self, zu_erfassen)
        DBUpdate.update_data(update_func)
        
        self.nation_fuellen()
        self.close() class SuchbegriffeBearbeiten(QtWidgets.QDialog, pordb_suchbegriffe):
    def __init__(self, parent=None):
        QtWidgets.QDialog.__init__(self)
        self.setupUi(self)
        
        self.pushButtonLandSpeichern.clicked.connect(self.onSpeichern)
        self.pushButtonLandAbbrechen.clicked.connect(self.close)
        
        zu_lesen = "SELECT * FROM pordb_suchbegriffe ORDER BY suchbegriff"
        lese_func = DBLesen(self, zu_lesen)
        res = DBLesen.get_data(lese_func)
        row = 0
        self.tableWidgetSuche.clear()
        self.tableWidgetSuche.setRowCount(len(res) + 2)
        self.tableWidgetSuche.setSortingEnabled(False)
        for i in res:
            column = 0
            for j in i:
                if j:
                    newitem = QtWidgets.QTableWidgetItem(j.strip())
                else:
                    newitem = QtWidgets.QTableWidgetItem(" ")
                self.tableWidgetSuche.setItem(row, column, newitem)
                column += 1
            row += 1
        newitem = QtWidgets.QTableWidgetItem("")
        self.tableWidgetSuche.setItem(row, 0, newitem)
        self.tableWidgetSuche.setCurrentItem(newitem)
        self.tableWidgetSuche.setFocus()
        self.tableWidgetSuche.editItem(self.tableWidgetSuche.currentItem())            
        self.tableWidgetSuche.setHorizontalHeaderLabels([self.tr("Search terms"), self.tr("Alternative")])
        self.tableWidgetSuche.setAlternatingRowColors(True)
        self.tableWidgetSuche.resizeColumnsToContents()
        self.tableWidgetSuche.resizeRowsToContents()
        #self.tableWidgetSuche.setSortingEnabled(True)
        
    def onSpeichern(self):
        position = 0
        zu_erfassen = []
        zu_erfassen.append("DELETE FROM pordb_suchbegriffe")
        for i in range(self.tableWidgetSuche.rowCount()):
            cell = []
            position += 1
            for j in range(self.tableWidgetSuche.columnCount()):
                tableItem = self.tableWidgetSuche.item(i, j)
                try:
                    cellItem = str(QtWidgets.QTableWidgetItem(tableItem).text())
                    cell.append(cellItem)
                except:
                    pass
            try:
                if cell[0]:
                    werte = []
                    werte.append(cell[0])
                    werte.append(cell[1])
                    zu_erfassen.append(["INSERT INTO pordb_suchbegriffe (suchbegriff, alternative) VALUES (%s, %s)", werte])
            except:
                pass
        
        update_func = DBUpdate(self, zu_erfassen)
        DBUpdate.update_data(update_func)
        
        self.close() class SucheVideo(QtWidgets.QDialog, pordb_suche_video):
    def __init__(self, app, titel=None, parent=None):
        QtWidgets.QDialog.__init__(self)
        self.setupUi(self)
        
        self.pushButtonSuchen.clicked.connect(self.onSuchen)
        self.pushButtonAnzeigen.clicked.connect(self.onAnzeigen)
        self.pushButtonAbbrechen.clicked.connect(self.close)
        self.listWidgetVideo.verticalScrollBar().valueChanged.connect(self.listWidgetTitle.verticalScrollBar().setValue)
        self.listWidgetTitle.verticalScrollBar().valueChanged.connect(self.listWidgetVideo.verticalScrollBar().setValue)
        
        self.app = app
        
        self.zu_lesen = ""
        self.listWidgetTitle.setFocus()
        self.res_alle = []
        self.titel = titel
        self.werte = []
        if self.titel:
            self.pushButtonSuchen.setEnabled(False)
            self.listWidgetTitle.addItems(self.titel)
            self.onSuchen()
        else:
            self.pushButtonSuchen.setEnabled(True)
        
    def onSuchen(self):
        self.listWidgetVideo.clear()
        vorhanden = []
        self.res_alle = []
        self.app.setOverrideCursor(QtGui.QCursor(QtCore.Qt.WaitCursor))
        for i in self.titel:
            if i:
                zu_lesen = "SELECT DISTINCT ON (original) * FROM pordb_vid WHERE original LIKE %s OR original LIKE %s"
                lese_func = DBLesen(self, zu_lesen, (i.title() + "  % ", i.title() + " (%"))
                res = DBLesen.get_data(lese_func)
                if res:
                    vorhanden.append("x")
                    self.res_alle.extend(res)
                else:
                    vorhanden.append(" ")
        self.label_insgesamt.setText(str(len(self.titel)))
        self.label_vorhanden.setText(str(len(self.res_alle)))
        #self.listWidgetVideo.setMinimumHeight(len(self.titel))
        self.listWidgetVideo.addItems(vorhanden)
        self.app.restoreOverrideCursor()
        
    def onAnzeigen(self):
        self.zu_lesen = ""
        if self.res_alle:
            self.zu_lesen = "SELECT * FROM pordb_vid WHERE original = %s"
            for i in self.res_alle:
                if i[5].strip() not in self.werte: # This can happen, when an actor is also director
                    self.werte.append(i[5].strip())
                    if i != self.res_alle[len(self.res_alle) -1]:
                        self.zu_lesen += " OR original = %s"
            self.zu_lesen += " ORDER BY original"
        self.close() class Historie(QtWidgets.QDialog, pordb_historie):
    def __init__(self, parent=None):
        QtWidgets.QDialog.__init__(self)
        self.setupUi(self)
        
        self.pushButtonSearch.clicked.connect(self.onSearch)
        self.pushButtonGo.clicked.connect(self.onGo)
        self.pushButtonAbbrechen.clicked.connect(self.close)
        self.pushButtonClear.clicked.connect(self.onClear)
        
        self.row = 0
        self.column = 0
        self.zu_lesen = None
        self.werte = None
        self.tableWidgetHistory.setAlternatingRowColors(True)
        self.tableWidgetHistory.clearContents()
        self.lineEditSearch.setFocus()
        
        self.zu_lesen = "SELECT * FROM pordb_history ORDER BY time DESC"
        self.lese_func = DBLesen(self, self.zu_lesen)
        self.res = DBLesen.get_data(self.lese_func)
        self.tableWidgetHistory.setRowCount(len(self.res))
        for i in self.res:
            # Checkbox
            newitem = QtWidgets.QTableWidgetItem()
            newitem.setFlags(QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled | QtCore.Qt.ItemIsUserCheckable)
            newitem.setCheckState(QtCore.Qt.Unchecked)
            self.tableWidgetHistory.setItem(self.row, self.column, newitem)
            # Befehl
            self.column += 1
            newitem = QtWidgets.QTableWidgetItem(i[0])
            self.tableWidgetHistory.setItem(self.row, self.column, newitem)
            # Time
            self.column += 1
            newitem = QtWidgets.QTableWidgetItem(str(i[1]))
            self.tableWidgetHistory.setItem(self.row, self.column, newitem)
            self.column = 0
            self.row += 1
        self.tableWidgetHistory.resizeColumnsToContents()
        
        self.labelLines.setText(str(len(self.res)))
        
    def onSearch(self):
        self.tableWidgetHistory.clearSelection()
        self.tableWidgetHistory.setSelectionMode(QtWidgets.QAbstractItemView.MultiSelection)
        suchbegriff = str(self.lineEditSearch.text()).lower()
        item_scroll = None
        if suchbegriff:
            zaehler = 0
            item_scroll = None
            for i in range(len(self.res)):
                item = self.tableWidgetHistory.item(i, 1)
                text = str(item.text()).lower()
                if suchbegriff in text:
                    zaehler += 1
                    if zaehler == 1:
                        item_scroll = item
                    self.tableWidgetHistory.selectRow(i)
            if item_scroll:
                self.tableWidgetHistory.scrollToItem(item_scroll)
            self.tableWidgetHistory.setFocus()
    
    def onGo(self):
        text = None
        for i in range(len(self.res)):
            if self.tableWidgetHistory.item(i, 0).checkState():
                text = str(self.tableWidgetHistory.item(i, 1).text())
                index = text.find("ORDER BY")
                if index == -1:
                    index = 0
                index += text[index : ].find(" (")
                self.werte = str(text)[index :].lstrip(" (")
                if self.werte.endswith(")"):
                    self.werte = self.werte[:-1]
                self.zu_lesen = str(text)[0 : index]
                break
        if not text:
            QtWidgets.QMessageBox.critical(self, self.tr("Error "), self.tr("Please check one history entry"))
            return
        else:
            self.close()
        
    def onClear(self):
        zu_lesen = "SELECT * FROM pordb_history ORDER BY time DESC LIMIT 50"
        lese_func = DBLesen(self, zu_lesen)
        res = DBLesen.get_data(lese_func)
        if res:
            werte = []
            zu_erfassen = []
            werte.append(str(res[-1][-1]))
            zu_erfassen.append(["DELETE FROM pordb_history WHERE time < %s", werte])
            update_func = DBUpdate(self, zu_erfassen)
            DBUpdate.update_data(update_func)
            
        self.close() class PseudonymeBearbeiten(QtWidgets.QDialog, pordb_pseudo):
    def __init__(self, darsteller, pseudonyme):
        QtWidgets.QDialog.__init__(self)
        self.setupUi(self)
        
        self.pushButtonPseudo.clicked.connect(self.onPseudo)
        self.pushButtonSpeichern.clicked.connect(self.onSpeichern)
        self.pushButtonAbbrechen.clicked.connect(self.close)
        
        self.pseudonyme = pseudonyme
        self.pushButtonSpeichern.setDefault(True)
        
        self.darsteller = darsteller.lstrip('=')
        self.setWindowTitle(self.tr("Edit aliases for ") +self.darsteller)
        row = 0
        column = 0
        self.lineEditPseudo.setFocus()
        self.tableWidgetPseudo.clearContents()
        for i in self.pseudonyme:
            newitem = QtWidgets.QTableWidgetItem(i.strip())
            self.tableWidgetPseudo.setItem(row, column, newitem)
            row += 1
        newitem = QtWidgets.QTableWidgetItem("")
        self.tableWidgetPseudo.setItem(row, 0, newitem)
        self.tableWidgetPseudo.setCurrentItem(newitem)
        self.tableWidgetPseudo.setFocus()
        self.tableWidgetPseudo.editItem(self.tableWidgetPseudo.currentItem())            
        self.tableWidgetPseudo.setAlternatingRowColors(True)
        self.tableWidgetPseudo.resizeColumnsToContents()
        self.tableWidgetPseudo.resizeRowsToContents()
        
    def onPseudo(self):
        pseudos = str(self.lineEditPseudo.text()).strip().split(",")
        pseudos.extend(self.pseudonyme)
        row = 0
        column = 0
        for i in pseudos:
            if len(i) > 0:
                newitem = QtWidgets.QTableWidgetItem(i.strip())
                self.tableWidgetPseudo.setItem(row, column, newitem)
                row += 1
    
    def onSpeichern(self):
        zu_erfassen = []
        werte = []
        position = 0
        werte.append(self.darsteller)
        zu_erfassen.append(["DELETE FROM pordb_pseudo WHERE darsteller = %s", werte])
        update_func = DBUpdate(self, zu_erfassen)
        DBUpdate.update_data(update_func)
        for i in range(self.tableWidgetPseudo.rowCount()):
            cell = []
            position += 1
            for j in range(self.tableWidgetPseudo.columnCount()):
                tableItem = self.tableWidgetPseudo.item(i, j)
                if tableItem:
                    cellItem = str(QtWidgets.QTableWidgetItem(tableItem).text())
                    cell.append(cellItem)
            if cell and cell[0] and cell[0].title().replace("'", "''") != self.darsteller:
                checkpseudo = CheckPseudos(cell[0].title().replace("'", "''"), self.darsteller)
                check = CheckPseudos.check(checkpseudo)
                if check:
                    zu_erfassen = []
                    werte = []
                    werte.append(cell[0].title())
                    werte.append(self.darsteller)
                    zu_erfassen.append(["INSERT INTO pordb_pseudo (pseudo, darsteller) VALUES (%s, %s)", werte])
                    update_func = DBUpdate(self, zu_erfassen)
                    DBUpdate.update_data(update_func)
        
        self.close() class Bookmarks(QtWidgets.QDialog, pordb_bookmarks):
    def __init__(self, url, parent=None):
        QtWidgets.QDialog.__init__(self)
        self.setupUi(self)
        
        self.pushButtonSpeichern.clicked.connect(self.accept)
        self.pushButtonAnzeigen.clicked.connect(self.anzeigen)
        self.pushButtonLoeschen.clicked.connect(self.loeschen)
        
        self.url = url
        
        zu_lesen = "SELECT * FROM pordb_bookmarks ORDER BY z"
        lese_func = DBLesen(self, zu_lesen)
        res = DBLesen.get_data(lese_func)
        row = 0
        self.tableWidgetBookmarks.clearContents()
        self.tableWidgetBookmarks.setRowCount(len(res))
        self.tableWidgetBookmarks.setColumnCount(2)
        for i in res:
            column = 0
            for j in i:
                newitem = QtWidgets.QTableWidgetItem(str(j))
                self.tableWidgetBookmarks.setItem(row, column, newitem)
                column += 1
            row += 1
        self.tableWidgetBookmarks.setAlternatingRowColors(True)
        self.tableWidgetBookmarks.resizeColumnsToContents()
        self.tableWidgetBookmarks.resizeRowsToContents()
        
    def accept(self):
        werte = []
        zu_erfassen = []
        werte.append(self.url)
        zu_erfassen.append(["INSERT INTO pordb_bookmarks (url) VALUES (%s)", werte])
        update_func = DBUpdate(self, zu_erfassen)
        DBUpdate.update_data(update_func)
        
        self.close()
        
    def anzeigen(self):
        items = self.tableWidgetBookmarks.selectedItems()
        self.neue_url = str(items[0].text())
        self.close()
        return self.neue_url
        
    def loeschen(self):
        row = self.tableWidgetBookmarks.currentRow()
        item = self.tableWidgetBookmarks.item(row, 1)
        a = item.text()
        try:
            werte = []
            zu_erfassen = []
            werte.append(str(item.text()))
            zu_erfassen.append(["DELETE FROM pordb_bookmarks WHERE z = %s", werte])
            update_func = DBUpdate(self, zu_erfassen)
            DBUpdate.update_data(update_func)
            self.close()
        except:
            pass class DarstellerdatenAnzeigen(QtWidgets.QDialog, pordb_iafd):
    def __init__(self, app, url, darstellerseite, verzeichnis_thumbs, name = None):
        QtWidgets.QDialog.__init__(self)
        self.setupUi(self)
        
        self.pushButtonUebernehmen.clicked.connect(self.onUebernehmen)
        self.pushButtonRemoveBrackets.clicked.connect(self.onRemoveBrackets)
        self.pushButtonCancel.clicked.connect(self.onClose)
        
        self.darstellerseite = str(darstellerseite)
        self.app = app
        self.url = url
        self.verzeichnis_thumbs = verzeichnis_thumbs
        if name:
            self.name = name.strip()
        else:
            self.name = None
            
        # Combobox für Nation füllen
        zu_lesen = "SELECT * FROM pordb_iso_land WHERE aktiv = %s ORDER BY land"
        lese_func = DBLesen(self, zu_lesen, "x")
        res_iso_land = DBLesen.get_data(lese_func)
        self.comboBoxNation.clear()
        for i in res_iso_land:
            text = '%2s %-50s' % (i[0], i[1])
            bild = os.path.join(os.curdir, "pypordb", i[0] + ".svg")
            icon = QtGui.QIcon()
            icon.addFile(bild, QtCore.QSize(16, 16), QtGui.QIcon.Normal, QtGui.QIcon.Off)
            self.comboBoxNation.addItem(icon, text)
        
        self.app.setOverrideCursor(QtGui.QCursor(QtCore.Qt.WaitCursor))
        
        monate = {"January":"01", "February":"02", "March":"03", "April":"04", "May":"05", "June":"06", "July":"07", "August":"08", "September":"09", "October":"10", "November":"11", "December":"12", }
        haarfarben = {"Brown":"br", "Brown/Light Brown":"br", "Dark Brown":"br", "Light Brown":"br", "Black":"s", "Red":"r", "Blond":"bl", "Honey Blond":"bl", "Dark Blond":"bl", "Dirty Blond":"bl", "Sandy Blond":"bl", "Strawberry Blond":"bl", "Auburn":"r", "Grey":"gr", "Bald":"ba"}
        ethniticies = {"Caucasian": "w", "Black": "s", "Asian": "a", "Latin": "l"}
        
        actordata = ActorData(self.darstellerseite)
        
        # Darsteller Name
        self.name_iafd = ActorData.actor_name(actordata)
        if not self.name_iafd:
            self.app.restoreOverrideCursor()
            QtWidgets.QMessageBox.critical(self, self.tr("Error "), self.tr("This site seams not to be an actor site of the IAFD"))
            return
        if self.name and self.name.lower() != self.name_iafd.lower():
            self.app.restoreOverrideCursor()
            QtWidgets.QMessageBox.warning(self, self.tr("Warning "), self.tr("Actors name in \nPorDB --> ({0}) \ndiffers from actors name in the \nIAFD --> ({1}).\nMaybe you should rename the actor in PorDB.").format(self.name, self.name_iafd))
        if not self.name:
            self.name = self.name_iafd
        self.labelName.setText(self.name)
        self.lineEditName.setText(self.name)
            
        # Darsteller Bild
        self.bild = ActorData.actor_image(actordata)
        if not self.bild:
            self.app.restoreOverrideCursor()
            QtWidgets.QMessageBox.critical(self, self.tr("Error "), self.tr("This site seams not to be an actor site of the IAFD"))
            return
        url = self.bild
        self.verz = self.verzeichnis_thumbs
        try:
            opener=urllib.request.build_opener()
            opener.addheaders=[('User-Agent','Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1941.0 Safari/537.36')]
            urllib.request.install_opener(opener)
            urllib.request.urlretrieve(url, os.path.join(self.verz, os.path.basename(self.bild)))
        except:
            pass
        bild = QtGui.QPixmap(os.path.join(self.verz, os.path.basename(self.bild)))
        self.labelBild.setPixmap(bild)
            
        # Darsteller Geschlecht
        self.geschlecht = ActorData.actor_sex(actordata)
        if not self.bild:
            self.app.restoreOverrideCursor()
            QtWidgets.QMessageBox.critical(self, self.tr("Error "), self.tr("This site seams not to be an actor site of the IAFD"))
            return
        if self.geschlecht:
            self.lineEditGeschlecht.setText(self.geschlecht)
        
        # Darsteller Pseudonyme
        self.pseudonyme = ActorData.actor_alias(actordata)
        self.lineEditPseudo.setText(self.pseudonyme)
    
        # Darsteller Land
        self.land = ActorData.actor_country(actordata)
        if self.land == "No data":
            self.checkBoxLand.setCheckState(QtCore.Qt.Unchecked)
            self.comboBoxNation.setCurrentIndex(-1)
        else:
            gefunden = False
            for i, wert in enumerate(res_iso_land):
                if wert[3].strip() == self.land:
                    gefunden = True
                    break
            if not gefunden:
                i = -1
            self.comboBoxNation.setCurrentIndex(i)
            self.checkBoxLand.setCheckState(QtCore.Qt.Checked)
                
        # Actor birthplace
        self.birthplace = ActorData.actor_birthplace(actordata)
        if self.birthplace == "No data":
            self.birthplace = ""
        self.labelBirthplace.setText(self.birthplace)
        
        # Darsteller Ethnic
        self.ethnic = ActorData.actor_ethnic(actordata)
        self.labelEthnic.setText(self.ethnic)
        if self.ethnic == "No data":
            self.ethnic = ""
            self.checkBoxEthnic.setCheckState(QtCore.Qt.Unchecked)
        else:
            ethnic = ethniticies.get(self.ethnic, self.tr("not available"))
            if ethnic != self.tr("not available"):
                self.ethnic = ethnic
                self.checkBoxEthnic.setCheckState(QtCore.Qt.Checked)
        self.comboBoxEthnic.setCurrentIndex(self.comboBoxEthnic.findText(self.ethnic))
        
        # Darsteller Haarfarbe
        self.haare = ActorData.actor_hair(actordata)
        self.labelHaare.setText(self.haare)
        if self.haare == "No data":
            self.haare = ""
            self.checkBoxHaare.setCheckState(QtCore.Qt.Unchecked)
        else:
            haarfarbe = haarfarben.get(self.haare, self.tr("not available"))
            if haarfarbe != self.tr("not available"):
                self.haare = haarfarbe
                self.checkBoxHaare.setCheckState(QtCore.Qt.Checked)
        self.comboBoxHaare.setCurrentIndex(self.comboBoxHaare.findText(self.haare))
        
        # Darsteller Tattoos
        self.tattoos = ActorData.actor_tattoos(actordata)
        if self.tattoos.lower() == "none":
            self.lineEditTattos.setText("-")
            self.checkBoxTattos.setCheckState(QtCore.Qt.Checked)
        elif self.tattoos.lower() == "no data":
            self.lineEditTattos.setText("")
            self.checkBoxTattos.setCheckState(QtCore.Qt.Unchecked)
        else:
            self.lineEditTattos.setText(self.tattoos)
            self.checkBoxTattos.setCheckState(QtCore.Qt.Checked)
            
        # Darsteller Geboren
        self.geboren = ActorData.actor_born(actordata)
        monat = monate.get(self.geboren[0:self.geboren.find(" ")], self.tr("not available"))
        if monat != self.tr("not available"):
            tag = self.geboren[self.geboren.find(" ")+1:self.geboren.find(",")]
            jahr = self.geboren[self.geboren.find(", ")+2:]
            self.geboren = jahr +"-" + monat + "-" + tag
            self.labelGeboren.setText(self.geboren)
        else:
            self.geboren = 0
            self.labelGeboren.setText("-")
        
        # Darsteller Anzahl Filme
        self.filme = ActorData.actor_movies(actordata)
        
        # Darsteller aktiv von / bis
        self.aktiv_von, self.aktiv_bis = ActorData.actor_activ(actordata)
        
        self.checkBoxPseudo.setCheckState(QtCore.Qt.Checked)
        self.checkBoxGeboren.setCheckState(QtCore.Qt.Checked)
        
        self.app.restoreOverrideCursor()
        
    def keyPressEvent(self, event):
        try:
            if event.modifiers() & QtCore.Qt.ControlModifier:
                if event.key() == QtCore.Qt.Key_L:
                    self.onRemoveBrackets()
                    self.update()
            elif event.key() == QtCore.Qt.Key_Return or event.key() == QtCore.Qt.Key_Enter:
                self.onUebernehmen()
            elif event.key() == QtCore.Qt.Key_Escape:
                self.onClose()
            else:
                self.keyPressEvent(self)
        except:
            pass
        
    def onUebernehmen(self):
        if self.lineEditGeschlecht.text() != 'm' and self.lineEditGeschlecht.text() != 'w':
            QtWidgets.QMessageBox.critical(self, self.tr("Error "), self.tr("Invalid gender"))
            self.app.restoreOverrideCursor()
            self.lineEditGeschlecht.setReadOnly(False)
            self.lineEditGeschlecht.setFocus()
            return
        zu_lesen = "SELECT * FROM pordb_darsteller WHERE darsteller = %s"
        if self.checkBoxName.isChecked():
            self.name = str(self.lineEditName.text())
        wert = self.name.strip().title()
        self.lese_func = DBLesen(self, zu_lesen, wert)
        res = DBLesen.get_data(self.lese_func)
        zu_erfassen = []
        
        # Darsteller existiert noch nicht
        if not res:
            messageBox = QtWidgets.QMessageBox()
            messageBox.addButton(self.tr("Yes"), QtWidgets.QMessageBox.AcceptRole)
            messageBox.addButton(self.tr("No"), QtWidgets.QMessageBox.RejectRole)
            messageBox.setWindowTitle(self.tr("Actor ") +self.name.strip() +self.tr(" not yet in database"))
            messageBox.setIcon(QtWidgets.QMessageBox.Question)
            messageBox.setText(self.tr("Should the actor be created?"))
            message = messageBox.exec_()
            if message == 0:
                if str(self.labelGeboren.text()).strip() == "-":
                    geboren = "0001-01-01"
                else:
                    geboren = str(self.labelGeboren.text())
                datum = str(time.localtime()[0]) + '-' + str(time.localtime()[1]) + '-' + str(time.localtime()[2])
                name = str(self.lineEditName.text())
                werte = []
                werte.append(name.title())
                werte.append(str(self.lineEditGeschlecht.text()))
                werte.append(str(0))
                werte.append(datum)
                werte.append(str(self.comboBoxHaare.currentText()))
                werte.append(str(self.comboBoxNation.currentText())[0:2])
                werte.append(str(self.lineEditTattos.text()))
                werte.append(str(self.comboBoxEthnic.currentText()))
                werte.append(str(0))
                werte.append(geboren)
                werte.append(str(self.filme))
                werte.append(str(self.url))
                werte.append(str(self.aktiv_von))
                werte.append(str(self.aktiv_bis))
                werte.append(datum)
                zu_erfassen.append(["INSERT INTO pordb_darsteller VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)", werte])
                action = None
                if self.checkBoxPseudo.isChecked():
                    action = self.pseudo_uebernehmen(name, zu_erfassen)
                    if not action: 
                        return
                extension = os.path.splitext(os.path.join(self.verz, self.bild))[-1].lower()
                if extension == ".jpeg":
                    extension = ".jpg"
                if extension != ".gif":
                    newfilename = os.path.join(self.verzeichnis_thumbs, "darsteller_" + str(self.lineEditGeschlecht.text()), name.strip().replace("'", "_apostroph_").replace(" ", "_").lower() + extension)
                    try:
                        os.rename(os.path.join(self.verz, os.path.basename(self.bild)), newfilename)
                    except FileNotFoundError:
                        QtWidgets.QMessageBox.critical(self, self.tr("Error "), self.tr("Download of image of actor not possible"))
            else:
                self.onClose()
        # Darsteller existiert bereits
        else:
            if self.checkBoxBild.isChecked():
                extension = os.path.splitext(os.path.join(self.verz + self.bild))[-1].lower()
                if extension == ".jpeg":
                    extension = ".jpg"
                if extension != ".gif":
                    if self.checkBoxName.isChecked():
                        newfilename = os.path.join(self.verzeichnis_thumbs, "darsteller_" + self.lineEditGeschlecht.text(), str(self.lineEditName.text()).strip().replace("'", "_apostroph_").replace(" ", "_").lower() + extension)
                    else:
                        newfilename = os.path.join(self.verzeichnis_thumbs, "darsteller_" + self.lineEditGeschlecht.text(), str(self.name).strip().replace("'", "_apostroph_").replace(" ", "_").lower() + extension)
                    os.rename(os.path.join(self.verz, os.path.basename(self.bild)), newfilename)
            else:
                try:
                    os.remove(os.path.join(self.verz, os.path.basename(self.bild)))
                except:
                    pass
            if self.checkBoxGeboren.isChecked():
                if str(self.labelGeboren.text()).strip() == "-":
                    if res[0][9] and res[0][9] != '0001-01-01':
                        pass
                    else:
                        werte = []
                        werte.append(res[0][0])
                        zu_erfassen.append(["UPDATE pordb_darsteller SET geboren = '0001-01-01' WHERE darsteller = %s", werte])
                else:
                    werte = []
                    werte.append(str(self.labelGeboren.text()))
                    werte.append(res[0][0])
                    zu_erfassen.append(["UPDATE pordb_darsteller SET geboren = %s WHERE darsteller = %s", werte])
            if self.checkBoxLand.isChecked() and str(self.comboBoxNation.currentText()):
                werte = []
                werte.append(str(self.comboBoxNation.currentText())[0:2])
                werte.append(res[0][0])
                zu_erfassen.append(["UPDATE pordb_darsteller SET nation = %s WHERE darsteller = %s", werte])
            if self.checkBoxEthnic.isChecked():
                werte = []
                werte.append(str(self.comboBoxEthnic.currentText()))
                werte.append(res[0][0])
                zu_erfassen.append(["UPDATE pordb_darsteller SET ethnic = %s WHERE darsteller = %s", werte])
            if self.checkBoxHaare.isChecked():
                werte = []
                werte.append(str(self.comboBoxHaare.currentText()))
                werte.append(res[0][0])
                zu_erfassen.append(["UPDATE pordb_darsteller SET haarfarbe = %s WHERE darsteller = %s", werte])
            if self.checkBoxTattos.isChecked() and str(self.lineEditTattos.text()):
                if len((self.lineEditTattos.text())) > 500:
                    QtWidgets.QMessageBox.critical(self, self.tr("Error "), self.tr("Too many characters in tattos (") +str(len((self.lineEditTattos.text()))) +")")
                    return
                werte = []
                werte.append(str(self.lineEditTattos.text()))
                werte.append(res[0][0])
                zu_erfassen.append(["UPDATE pordb_darsteller SET tattoo = %s WHERE darsteller = %s", werte])
            werte = []
            werte.append(str(self.filme))
            werte.append(res[0][0])
            zu_erfassen.append(["UPDATE pordb_darsteller SET filme = %s WHERE darsteller = %s", werte])
            werte = []
            werte.append(self.url)
            werte.append(res[0][0])
            zu_erfassen.append(["UPDATE pordb_darsteller SET url = %s WHERE darsteller = %s", werte])
            werte = []
            werte.append(str(self.aktiv_von))
            werte.append(res[0][0])
            zu_erfassen.append(["UPDATE pordb_darsteller SET aktivvon = %s WHERE darsteller = %s", werte])
            werte = []
            werte.append(str(self.aktiv_bis))
            werte.append(res[0][0])
            zu_erfassen.append(["UPDATE pordb_darsteller SET aktivbis = %s WHERE darsteller = %s", werte])
            if self.checkBoxPseudo.isChecked():
                action = self.pseudo_uebernehmen(res[0][0], zu_erfassen)
                if not action: 
                    return
                
            datum = str(time.localtime()[0]) + '-' + str(time.localtime()[1]) + '-' + str(time.localtime()[2])
            werte = []
            werte.append(datum)
            werte.append(res[0][0])
            zu_erfassen.append(["UPDATE pordb_darsteller SET besuch = %s WHERE darsteller = %s", werte])
                
        if zu_erfassen:
            update_func = DBUpdate(self, zu_erfassen)
            DBUpdate.update_data(update_func)
        self.onClose()
    # end of onUebernehmen
    
    def onRemoveBrackets(self):
        pseudos = str(self.lineEditPseudo.text()).title().split(", ")
        pseudos_neu = []
        for i in pseudos:
            klammer_auf = i.find("(")
            klammer_zu = i.find(")")
            if klammer_auf > -1 and klammer_zu > -1:
                pseudo = i[0:klammer_auf] + i[klammer_zu + 1 :].strip()
            elif klammer_auf > -1 and klammer_zu == -1:
                pseudo = i[0:klammer_auf].strip()
            elif klammer_auf == -1 and klammer_zu > -1:
                pseudo = i[klammer_zu + 1 :].strip()
            else:
                pseudo = i.strip()
            if pseudo:
                pseudos_neu.append(pseudo)
        self.lineEditPseudo.setText(", ".join(pseudos_neu))
        
    def pseudo_uebernehmen(self, name, zu_erfassen):
        pseudos = str(self.lineEditPseudo.text()).title().split(", ")
        pseudos = set(pseudos)
        for i in pseudos:
            if i and i.strip() != name.title().strip():
                res = []
                zu_lesen = "SELECT darsteller FROM pordb_darsteller WHERE darsteller = %s"
                self.lese_func = DBLesen(self, zu_lesen, i.strip().title())
                res = DBLesen.get_data(self.lese_func)
                if res:
                    messageBox = QtWidgets.QMessageBox()
                    messageBox.addButton(self.tr("Yes"), QtWidgets.QMessageBox.AcceptRole)
                    messageBox.addButton(self.tr("No"), QtWidgets.QMessageBox.RejectRole)
                    messageBox.setWindowTitle(i.strip().replace("'", "''").title() +self.tr(": There is another actor in the database with this name."))
                    messageBox.setIcon(QtWidgets.QMessageBox.Question)
                    messageBox.setText(self.tr("Do you want to add/change the actor anyway?"))
                    message = messageBox.exec_()
                    if message != 0:
                        return False
                checkpseudo = CheckPseudos(i.strip().title(), name.strip().title())
                check = CheckPseudos.check(checkpseudo)
                werte = []
                werte.append(i.strip().title())
                werte.append(name.strip().title())
                befehl = "INSERT INTO pordb_pseudo (pseudo, darsteller) VALUES (%s, %s)"
                if check and befehl not in zu_erfassen:
                    zu_erfassen.append([befehl, werte])
        return True
                    
    def onClose(self):
        try:
            os.remove(os.path.join(self.verz, os.path.basename(self.bild)))
        except:
            pass
        self.close() class SaveMovieData(QtWidgets.QDialog):
    def __init__(self, app, url, text):
        QtWidgets.QDialog.__init__(self)
        self.app = app
        self.url = url
        self.text = text
        
    def get_data(self):
        # get movie title
        anfang = self.text.find("<h1>")
        if anfang < 0:
            self.app.restoreOverrideCursor()
            message = QtWidgets.QMessageBox.critical(self, self.tr("Error "), self.tr("This site seams not to be a movie site of the IAFD"))
            return
        ende = self.text.find("</h1>", anfang)
        movie = str(self.text[anfang + 4:ende].strip())
        
        # get alternative titles
        alternatives = []
        anfang = self.text.find("Also Known As", ende)
        if anfang > 0:
            anfang = self.text.find("<dd>", anfang)
            ende = self.text.find("</dd></dl>", anfang)
            alternatives = self.text[anfang + 4 : ende].strip().replace("&amp;", "&").split("</dd><dd>")
        
        # get actors and scenes
        scenes = []
        anfang = self.text.find("Scene Breakdowns")
        if anfang < 0:
            scenes = self.get_actors()
        else:
            anfang_scene = self.text.find("Scene ", anfang + 1)
            if anfang_scene < 0:
                self.app.restoreOverrideCursor()
                message = QtWidgets.QMessageBox.critical(self, self.tr("Error "), self.tr("Seems there are no scenes on the IAFD"))
                return
            while True:
                anfang_scene = self.text.find("Scene ", anfang + 1)
                try:
                    zahl = int(self.text[anfang_scene + 6])
                except:
                    break
                ende_scene = self.text.find(". ", anfang_scene + 1)
                if anfang_scene < 0:
                    break
                scene = self.text[anfang_scene : ende_scene].strip()
                anfang = self.text.find(". ", anfang_scene + 1)
                ende = self.text.find("</li>", anfang)
                darsteller = self.text[anfang + 2 : ende].strip()
                scenes.append((scene, darsteller))
            
        return movie, alternatives, scenes
    
    def get_actors(self):
        anfang_actors = self.text.find("<h3>Performers</h3>")
        if anfang_actors < 0:
            self.app.restoreOverrideCursor()
            message = QtWidgets.QMessageBox.critical(self, self.tr("Error "), self.tr("Seems there are no scenes/actors on the IAFD"))
            return
        scenes = []
        # get the actors
        anfang = anfang_actors
        scene = "Scene 0"
        darsteller = ""
        last_anfang_actor = 0
        while True:
            anfang_actor = self.text.find('class="headshot"', anfang + 1)
            if anfang_actor < 0:
                break
            anfang_actor = self.text.find('><br>', anfang + 1)
            if anfang_actor < 0 or anfang_actor < last_anfang_actor:
                break
            last_anfang_actor = anfang_actor
            ende_actor = self.text.find("</a><br>", anfang_actor + 1)
            if darsteller:
                darsteller += ", "
            darsteller += self.text[anfang_actor + 5: ende_actor].strip()
            alias = darsteller.find("(as ")
            if alias > 0:
                darsteller = darsteller[0 : alias].strip()
            anfang = ende_actor + 12
        scenes.append((scene, darsteller))
            
        return scenes class ShowIafdData(QtWidgets.QDialog, pordb_show_iafd_data):
    def __init__(self, verzeichnis, verzeichnis_original, verzeichnis_thumbs, verzeichnis_trash, verzeichnis_cover, video, titel=None, cd=None, bild=None, darsteller=None, gesehen=None, original=None, cs=None, vorhanden=None, definition=None, remarks=None, stars=None, cover=None, high_definition=None):
        
        QtWidgets.QDialog.__init__(self)
        self.setupUi(self)
        
        self.verzeichnis = verzeichnis
        self.verzeichnis_original = verzeichnis_original
        self.verzeichnis_thumbs = verzeichnis_thumbs
        self.verzeichnis_trash = verzeichnis_trash
        self.verzeichnis_cover = verzeichnis_cover
        self.video = video
        self.titel = titel
        self.cd = cd
        self.bild = bild
        self.darsteller = darsteller
        self.gesehen = gesehen
        self.original = original
        self.cs = cs
        self.vorhanden = vorhanden
        self.definition = definition
        self.remarks = remarks
        self.stars = stars
        self.cover = cover
        self.high_definition = high_definition
        
        self.pushButtonOK.clicked.connect(self.accept)
        self.pushButtonSelectAll.clicked.connect(self.selectAll)
        self.pushButtonCancel.clicked.connect(self.close)
        
        self.imagesize = 200
        self.complete_size = QtCore.QSize(self.imagesize, self.imagesize)
        
        settings = QtCore.QSettings()
        window_size = settings.value("ShowIafdData/Size", QtCore.QSize(600, 500))
        self.resize(window_size)
        window_position = settings.value("ShowIafdData/Position", QtCore.QPoint(0, 0))
        self.move(window_position)
        
        self.graphicsView.setAlignment(QtCore.Qt.AlignLeft)
        self.scene = QtWidgets.QGraphicsScene()
        self.left_margin = 20
        
        self.font = QtGui.QFont()
        
        if self.titel:
            self.selection = True
        else:
            self.selection = False
        
        # set imagefiles from working directory
        self.populate_from_working_directory()
        
        # set the scene from IAFD
        self.populate_scene()
        
    def populate_from_working_directory(self):
        self.x_pos = self.left_margin
        self.y_pos = 0
        if self.selection:
            # get imagefile from thumbs directory
            dateiliste = []
            try:
                dateiliste.append(os.path.join("cd" + str(self.cd), self.bild.rstrip()))
            except AttributeError:
                pass
        else:
            # get imagefiles from working directory
            dateiliste = [f for f in os.listdir(self.verzeichnis) if f.lower().endswith(".jpeg") or f.lower().endswith(".jpg") or f.lower().endswith(".png")]
        if dateiliste:
            dateiliste.sort()
            textitem = QtWidgets.QGraphicsTextItem(self.tr("Clips to add:"))
            self.font.setPointSize(16)
            self.font.setWeight(75)
            self.font.setBold(True)
            textitem.setFont(self.font)
            textitem.setPos(0, self.y_pos)
            self.scene.addItem(textitem)
            self.y_pos += 30
            max_height = 0
            for i in dateiliste:
                if self.selection:
                    bilddatei = os.path.join(self.verzeichnis_thumbs, i)
                else:
                    bilddatei = os.path.join(self.verzeichnis, i)
                pixmap = QtGui.QPixmap(bilddatei).scaled(QtCore.QSize(self.complete_size),QtCore.Qt.KeepAspectRatio)
                if pixmap.height() > max_height:
                    max_height = pixmap.height()
                self.pixmapitem_scene = QtWidgets.QGraphicsPixmapItem(pixmap)
                self.pixmapitem_scene.setPos(0, 20)
                datei = i[0:24]
                if len(i) > 25:
                    datei += "..."
                self.textitem_scene = QtWidgets.QGraphicsTextItem(datei)
                itemgroup = self.scene.createItemGroup([self.textitem_scene, self.pixmapitem_scene])
                itemgroup.setPos(self.x_pos, self.y_pos)
                itemgroup.setData(0, i)
                itemgroup.setFlag(QtWidgets.QGraphicsItem.ItemIsSelectable)
                if self.selection: # imagefile is from thumbs directory
                    itemgroup.setSelected(True)
                self.y_pos += pixmap.height() + 20
            self.x_pos = self.left_margin
        else:
            self.close()
        #self.scene.clearSelection()
        self.scene.update()        
        
    def populate_scene(self):
        # set original title
        self.y_pos = 0
        self.x_pos = self.imagesize + 30
        self.font.setBold(True)
        textitem = QtWidgets.QGraphicsTextItem(self.video[0])
        textitem.setPos(self.x_pos, self.y_pos)
        textitem.setFont(self.font)
        self.scene.addItem(textitem)
        self.y_pos += 40
        self.start_y_pos = self.y_pos
        
        # set alternate titles
        for i, wert in enumerate(self.video[1]):
            alt_title = wert
            textitem = QtWidgets.QGraphicsSimpleTextItem(alt_title)
            textitem.setPos(self.x_pos, self.y_pos)
            textitem.setFlag(QtWidgets.QGraphicsItem.ItemIsSelectable)
            textitem.setSelected(True)
            self.scene.addItem(textitem)
            self.y_pos += 30
            self.start_y_pos += self.y_pos
            
        # set scene and actors
        for i, wert in enumerate(self.video[2]): 
            for j, wert1 in enumerate(wert):
                darsteller_liste = wert1.split(", ")
                max_height = 0
                for k, wert2 in enumerate(darsteller_liste):
                    textitem = QtWidgets.QGraphicsTextItem(wert2)
                    if wert1.startswith("Scene "):
                        self.font.setBold(True)
                        textitem.setFont(self.font)
                        textitem.setPos(self.x_pos, self.y_pos)
                        self.scene.addItem(textitem)
                        self.y_pos += 30
                    elif wert2:
                        zu_lesen = "SELECT * from pordb_darsteller WHERE darsteller = %s"
                        lese_func = DBLesen(self, zu_lesen, wert2.title())
                        res = DBLesen.get_data(lese_func)
                        if res:
                            bilddatei = self.getBilddatei(res[0][0], res[0][1])
                        else:
                            bilddatei = self.getBilddatei(wert2.replace("'", "_apostroph_").title())
                        pixmap = QtGui.QPixmap(bilddatei).scaled(QtCore.QSize(self.complete_size),QtCore.Qt.KeepAspectRatio)
                        if pixmap.height() > max_height:
                            max_height = pixmap.height()
                        pixmapitem = QtWidgets.QGraphicsPixmapItem(pixmap)
                        pixmapitem.setPos(0, 20)        
                        itemgroup = self.scene.createItemGroup([textitem, pixmapitem])
                        itemgroup.setPos(self.x_pos, self.y_pos)
                        itemgroup.setData(1, wert2)
                        itemgroup.setFlag(QtWidgets.QGraphicsItem.ItemIsSelectable)
                        if self.selection: # imagefile is from thumbs directory
                            itemgroup.setSelected(True)
                        self.y_pos += pixmap.height() + 20
            self.x_pos += self.imagesize + 30
            self.y_pos = self.start_y_pos
            
        self.graphicsView.setScene(self.scene)
        self.graphicsView.centerOn(0, 0)
        
    def accept(self):
        scene_to_add = None
        actor_to_add = []
        title_to_add = []
        for i in self.scene.selectedItems():
            # Add alternate titles
            if isinstance(i, QtWidgets.QGraphicsSimpleTextItem):
                title_to_add.append(i.text())
            # Add scene
            if i.data(0):        
                if scene_to_add:
                    QtWidgets.QMessageBox.critical(self, self.tr("Error "), self.tr("Please select only one scene"))
                    return
                else:
                    scene_to_add = str(i.data(0))
            # Add actors
            if i.data(1):
                actor_to_add.append(str(i.data(1)))
                
        if not scene_to_add:
            QtWidgets.QMessageBox.critical(self, self.tr("Error "), self.tr("No scene selected"))
            return
        if not actor_to_add:
            QtWidgets.QMessageBox.critical(self, self.tr("Error "), self.tr("No actors selected"))
            return
        darsteller = ", ".join(actor_to_add)
        if self.selection:
            verzeichnis = self.verzeichnis_thumbs
        else: 
            verzeichnis = self.verzeichnis
        eingabedialog = Neueingabe(self.verzeichnis, self.verzeichnis_original, self.verzeichnis_thumbs, self.verzeichnis_trash, self.verzeichnis_cover, os.path.join(verzeichnis, scene_to_add), titel=self.titel, darsteller=darsteller, cd=self.cd, bild=self.bild, gesehen=self.gesehen, original=self.video[0], cs=self.cs, vorhanden=self.vorhanden, cover=self.cover, undo=None, cover_anlegen=None, original_weitere=title_to_add, access_from_iafd=True, high_definition=self.high_definition)
        if eingabedialog.exec_():
            for i in list(self.scene.items()):
                if i.data(0):
                    self.scene.removeItem(i)
            if not self.selection:
                self.populate_from_working_directory()
            else:
                self.close()
        
    def getBilddatei(self, actor, sex=None):
        bilddatei = None
        if actor:
            if sex:
                bilddatei = os.path.join(self.verzeichnis_thumbs, "darsteller_" + sex, actor.lower().strip().replace(" ", "_").replace("'", "_apostroph_") + ".jpg")
            else:
                bilddatei = os.path.join(self.verzeichnis_thumbs, "darsteller_" + "w", actor.lower().strip().replace(" ", "_").replace("'", "_apostroph_") + ".jpg")
                if not os.path.exists(bilddatei):
                    bilddatei = os.path.join(self.verzeichnis_thumbs, "darsteller_" + "m", actor.lower().strip().replace(" ", "_").replace("'", "_apostroph_") + ".jpg")
        if not bilddatei or not os.path.exists(bilddatei):
            bilddatei = os.path.join(self.verzeichnis_thumbs, "nichtvorhanden", "nicht_vorhanden.jpg")
        return bilddatei
    
    def selectAll(self):
        for item in self.scene.items():
            if isinstance(item, QtWidgets.QGraphicsItemGroup):
                item.setSelected(True)
    
    def closeEvent(self, event):
        settings = QtCore.QSettings()
        settings.setValue("ShowIafdData/Size", self.size())
        settings.setValue("ShowIafdData/Position", self.pos()) class Devices(QtWidgets.QDialog, pordb_devices):
    def __init__(self, device_fuellen, parent=None):
        QtWidgets.QDialog.__init__(self)
        self.setupUi(self)
        
        self.pushButtonSpeichern.clicked.connect(self.accept)
        self.pushButtonAbbrechen.clicked.connect(self.close)
        
        self.device_fuellen = device_fuellen
        
        zu_lesen = "SELECT * FROM pordb_mpg_verzeichnisse ORDER BY dir"
        lese_func = DBLesen(self, zu_lesen)
        res = DBLesen.get_data(lese_func)
        row = 0
        self.tableWidget.clear()
        self.tableWidget.setRowCount(len(res) + 1)
        for i in res:
            column = 0
            for j in i:
                if j:
                    newitem = QtWidgets.QTableWidgetItem(j.strip())
                else:
                    newitem = QtWidgets.QTableWidgetItem(" ")
                self.tableWidget.setItem(row, column, newitem)
            row += 1
        newitem = QtWidgets.QTableWidgetItem("")
        self.tableWidget.setItem(row, 0, newitem)
        self.tableWidget.setCurrentItem(newitem)
        self.tableWidget.setFocus()
        self.tableWidget.editItem(self.tableWidget.currentItem())            
        self.tableWidget.setHorizontalHeaderLabels([self.tr("Device")])
        self.tableWidget.setAlternatingRowColors(True)
        self.tableWidget.resizeColumnsToContents()
        self.tableWidget.resizeRowsToContents()
        
    def accept(self):
        position = 0
        zu_erfassen = []
        zu_erfassen.append("DELETE FROM pordb_mpg_verzeichnisse")
        for i in range(self.tableWidget.rowCount()):
            cell = []
            position += 1
            for j in range(self.tableWidget.columnCount()):
                tableItem = self.tableWidget.item(i, j)
                try:
                    cellItem = str(QtWidgets.QTableWidgetItem(tableItem).text())
                    cell.append(cellItem)
                except:
                    pass
            try:
                if cell[0]:
                    werte = []
                    werte.append(cell[0])
                    zu_erfassen.append(["INSERT INTO pordb_mpg_verzeichnisse (dir) VALUES (%s)", werte])
            except:
                pass
        
        update_func = DBUpdate(self, zu_erfassen)
        DBUpdate.update_data(update_func)
        
        self.device_fuellen()
        self.close() class UpdateVersion(QtWidgets.QDialog, pordb_update_version):
    def __init__(self, version, whatsnew):
        QtWidgets.QDialog.__init__(self)
        self.setupUi(self)
        
        self.pushButtonYes.clicked.connect(self.accept)
        self.pushButtonNo.clicked.connect(self.close)
        
        self.version = version
        self.whatsnew = whatsnew
        
        settings = QtCore.QSettings()
        window_size = settings.value("UpdateVersion/Size", QtCore.QSize(600, 500))
        self.resize(window_size)
        window_position = settings.value("UpdateVersion/Position", QtCore.QPoint(0, 0))
        self.move(window_position)
        
        self.pushButtonYes.setFocus()
        
        self.plainTextEditWhatsnew.setPlainText("Version: " + self.version + "\n" + "\n")
        
        whatsnew_list = self.whatsnew.split("\\")
        for i in whatsnew_list:
            self.plainTextEditWhatsnew.appendPlainText(i)
        
    def accept(self):
        self.setCursor(QtGui.QCursor(QtCore.Qt.WaitCursor))
        zaehler = 0
        seite = None
        while True:
            zaehler += 1
            try:
                seite = urllib.request.urlopen(FILE_DOWNLOAD)
                if seite:
                    break
                else:
                    pass
            except:
                pass
            if zaehler > 1:
                break
            
        if seite:
            tmp = tempfile.TemporaryFile()
            tmp.write(seite.read())
            datei = zipfile.ZipFile(tmp, "r")
            tmp_zip = tempfile.TemporaryFile()
            liste = zipfile.ZipFile.namelist(datei)
            for i in liste:
                data = datei.read(i)
                df = i.replace("pordb3-master/", "")
                if df:
                    if df != "pypordb/":
                        writefile = open(df, "wb")
                        writefile.write(data)
                        writefile.close()
            
        self.unsetCursor()
        self.close
        QtWidgets.QDialog.accept(self)
    
    def closeEvent(self, event):
        settings = QtCore.QSettings()
        settings.setValue("UpdateVersion/Size", self.size())
        settings.setValue("UpdateVersion/Position", self.pos()) class MassChange(QtWidgets.QDialog, pordb_mass_change):
    def __init__(self):
        QtWidgets.QDialog.__init__(self)
        self.setupUi(self)
        
        self.buttonBox.accepted.connect(self.accept)
        self.buttonBox.rejected.connect(self.close)
        
        self.vorhanden = False
        self.watched = False
        self.resolution = False
        
    def accept(self):
        if not self.radioButtonVorhandenJa.isChecked() and not self.radioButtonVorhandenNein.isChecked():
            message = QtWidgets.QMessageBox.critical(self, self.tr("Error "), self.tr("Please mark whether movie is available"))
            return
        if not self.radioButtonWatchedJa.isChecked() and not self.radioButtonWatchedNein.isChecked():
            message = QtWidgets.QMessageBox.critical(self, self.tr("Error "), self.tr("Please mark whether movie has been watched"))
            return
        if self.radioButtonVorhandenNein.isChecked() and self.comboBoxResolution.currentIndex() != 0:
            message = QtWidgets.QMessageBox.critical(self, self.tr("Error "), self.tr("Video is not in stock: resolution is set to unknown"))
            self.comboBoxResolution.setCurrentIndex(0)
        if self.radioButtonVorhandenJa.isChecked() and self.comboBoxResolution.currentIndex() == 0:
            message = QtWidgets.QMessageBox.critical(self, self.tr("Error "), self.tr("Please select a resolution"))
            return
            
        if self.radioButtonVorhandenJa.isChecked():
            self.vorhanden = True
        else:
            self.vorhanden = False
        
        if self.radioButtonWatchedJa.isChecked():
            self.watched = True
        else:
            self.watched = False            
            
        if self.comboBoxResolution.currentIndex() == 1:
            self.resolution = "0"
        elif self.comboBoxResolution.currentIndex() == 2:
            self.resolution = "1"
        elif self.comboBoxResolution.currentIndex() == 3:
            self.resolution = "2"
        elif self.comboBoxResolution.currentIndex() == 4:
            self.resolution = "3"
        elif self.comboBoxResolution.currentIndex() == 5:
            self.resolution = "9"
            
        self.close() class ActorData():
    def __init__(self, seite):
        self.seite = seite
        
    def actor_name(self):
        # Darsteller Name
        anfang = self.seite.find("Vital Stats")
        if anfang < 0:
            return False
        anfang = self.seite.find('<h1>')
        ende = self.seite.find('</h1>')
        return self.seite[anfang+4:ende].strip()
    
    def actor_image(self):
        anfang = self.seite.find('id="headshot"')
        if anfang < 0:
            return False
        anfang = self.seite.find('src="', anfang)
        ende = self.seite.find('"></div>', anfang)
        return self.seite[anfang+5:ende].replace(" ", "%20")
    
    def actor_sex(self):
        anfang = self.seite.find('name="Gender" value="')
        ende = self.seite.find('">', anfang)
        geschlecht = self.seite[anfang+21:ende]
        if geschlecht == "f":
            geschlecht = "w"
        elif geschlecht != "m":
            return False
        return geschlecht
    
    def actor_alias(self):
        anfang = self.seite.find('AKA</p><div class="biodata">')
        ende = self.seite.find('</div>', anfang)
        pseudonyme = self.seite[anfang+28:ende]
        if pseudonyme == "No known aliases":
            return ""
        else:
            return pseudonyme
    
    def actor_country(self):
        anfang = self.seite.find('Nationality</p><p class="biodata">')
        ende = self.seite.find('</p><p', anfang+15)
        return self.seite[anfang+34:ende]
    
    def actor_birthplace(self):
        anfang = self.seite.find('Birthplace</p><p class="biodata">')
        if anfang < 0:
            return False
        ende = self.seite.find(';</p><p', anfang)
        return self.seite[anfang+33:ende].strip("&nbsp;")
    
    def actor_ethnic(self):
        anfang = self.seite.find('Ethnicity</p><p class="biodata">')
        ende = self.seite.find('</p><p', anfang+15)
        return self.seite[anfang+32:ende]
    
    def actor_hair(self):
        anfang = self.seite.find('Hair Colors</p><p class="biodata">')
        offset = 34
        if anfang < 0:
            anfang = self.seite.find('Hair Color</p><p class="biodata">')
            offset = 33
        ende = self.seite.find('</p>', anfang+15)
        return self.seite[anfang+offset:ende]
    
    def actor_tattoos(self):
        anfang = self.seite.find('Tattoos</p><p class="biodata">')
        ende = self.seite.find('</p><p', anfang+30)
        if ende - anfang > 500:
            ende = anfang + 500
        return self.seite[anfang+30:ende]
    
    def actor_born(self):
        anfang = self.seite.find('Birthday</p><p class="biodata">')
        ende = self.seite.find('</a>', anfang+15)
        born = self.seite[anfang+31:ende]
        if born.startswith('<a href'):
            anfang = self.seite.find('">', anfang+31)
            return self.seite[anfang+2:ende]
        else:
            return self.seite[anfang+31:ende]
    
    def actor_movies(self):
        anfang = self.seite.find('Performer Credits (')
        if anfang > 0:
            ende = self.seite.find(')', anfang)
            return self.seite[anfang+19:ende]
        else:
            return 0
        
    def actor_activ(self):
        anfang = self.seite.find('Years Active</p><p class="biodata">')
        if anfang == -1:
            anfang = self.seite.find('Years Active as Performer') 
            if anfang == -1:
                anfang = self.seite.find('Year Active</p><p class="biodata">') + 34
            else:
                anfang = self.seite.find('"biodata">', anfang)
                if anfang > -1:
                    anfang += 10
        else:
            anfang += 35
        aktiv_von = self.seite[anfang:anfang+4]
        try:
            aktiv_von = int(aktiv_von)
        except:
            aktiv_von = 0
        aktiv_bis = self.seite[anfang + 5:anfang + 9]
        try:
            aktiv_bis = int(aktiv_bis)
        except:
            aktiv_bis = 0
        return (aktiv_von, aktiv_bis)
    
    def actor_list_of_movies(self):
        titel = []
        anfang = 0
        while True:
            anfang = self.seite.find('Info on the movie', anfang)
            if anfang > -1:
                anfang = self.seite.find('.htm">', anfang)
                if anfang > -1:
                    ende = self.seite.find('</a></td><td>', anfang)
                    titel.append(self.seite[anfang+6:ende].strip())
            else:
                break
        return titel
import sys
import os
import time
import datetime
import platform
import urllib.request, urllib.error, urllib.parse
import socket
import psycopg2
import subprocess
        import locale
        import tarfile
        import tarfile
from operator import itemgetter
from PyQt5 import QtGui, QtCore, QtWidgets, QtPrintSupport
from pordb_hauptdialog import Ui_MainWindow as MainWindow
from pypordb_suchen import Suchen
from pypordb_cover import Cover
from pypordb_show_two_images import ShowTwoImages
from pypordb_neu import Neueingabe
from pypordb_dblesen import DBLesen
from pypordb_dbupdate import DBUpdate
from pypordb_original import OriginalErfassen
from pypordb_darsteller_suchen import DarstellerSuchen
from pypordb_darsteller_anzeige_gross import DarstellerAnzeigeGross
from pypordb_actor_details import ActorDetails
from pypordb_darsteller_umbenennen import DarstellerUmbenennen
from pypordb_land import LandBearbeiten
from pypordb_suchbegriffe import SuchbegriffeBearbeiten
from pypordb_suche_video import SucheVideo
from pypordb_historie import Historie
from pypordb_pseudo import PseudonymeBearbeiten
from pypordb_bookmarks import Bookmarks
from pypordb_darstellerdaten_anzeigen import DarstellerdatenAnzeigen
from pypordb_save_movie_data import SaveMovieData
from pypordb_show_iafd_data import ShowIafdData
from pypordb_devices import Devices
from pypordb_update_version import UpdateVersion
from pypordb_mass_change import MassChange
from pypordb_actordata import ActorData
            self.labelVidGefunden.clear()
            self.tableWidget1.setColumnCount(0)
            self.tableWidget1.setRowCount(0)
        self.labelVidFound.clear()
        app.restoreOverrideCursor()
        self.suchfeld.setFocus()
    # end of onSuchen
    
    def onSearchMpg(self):
        if self.searchResultsMpg:
            anzahl = self.searchResults(self.lineEditSearchMpg, self.tableWidget, self.searchResultsMpg, (2,))
            self.labelMpgFound.setText(self.tr("found: ") + str(anzahl))
        
    def onSearchVid(self):
        if self.searchResultsVid:
            anzahl = self.searchResults(self.lineEditSearchVid, self.tableWidget1, self.searchResultsVid, (0, 5))
            self.labelVidFound.setText(self.tr("found: ") + str(anzahl))
            
    def onFilterMpg(self):
        self.onSuchen(str(self.lineEditSearchMpg.text()).lower(), str(self.lineEditSearchVid.text()).lower())
        
    def onFilterVid(self):
        self.onSuchen(str(self.lineEditSearchMpg.text()).lower(), str(self.lineEditSearchVid.text()).lower())
            
    def onDeleteMpgKatalog(self):
        items = self.tableWidget.selectedItems()
        zu_erfassen = []
        anzahl_werte = int(len(items) / len(self.fieldnames_mpg))
        for i in range(anzahl_werte):
            werte = []
            werte.append(items[i * len(self.fieldnames_mpg)].text().strip())
            werte.append(items[i * len(self.fieldnames_mpg) + 1].text().strip())
            werte.append(items[i * len(self.fieldnames_mpg) + 2].text().strip())
            zu_erfassen.append(["DELETE FROM pordb_mpg_katalog WHERE device = %s and dir = %s and file = %s", werte])
        if zu_erfassen:
            update_func = DBUpdate(self, zu_erfassen)
            DBUpdate.update_data(update_func)
            QtWidgets.QMessageBox.critical(self, self.tr("Information "), str(anzahl_werte) + self.tr(" line(s) deleted"))
        app.setOverrideCursor(QtGui.QCursor(QtCore.Qt.WaitCursor))
        self.onSuchen()
        app.restoreOverrideCursor()
        
    def searchResults(self, lineEdit, tableWidget, rows, column):
        tableWidget.clearSelection()
        tableWidget.setSelectionMode(QtWidgets.QAbstractItemView.MultiSelection)
        suchbegriff = str(lineEdit.text()).lower()
        item_scroll = None
        row_scroll = 0
        selected_items = []
        zaehler = 0
        for j in column:
            row_zaehler = 0
            for i in range(len(rows)):
                row_zaehler += 1
                item = tableWidget.item(i, j)
                text = str(item.text()).lower()
                if suchbegriff in text:
                    zaehler += 1
                    if zaehler == 1:
                        if row_scroll == 0 or row_zaehler < row_scroll:
                            item_scroll = item
                            row_scroll = row_zaehler
                    if not i in selected_items:
                        tableWidget.selectRow(i)
                        selected_items.append(i)
        if item_scroll:
            tableWidget.scrollToItem(item_scroll)
        tableWidget.setFocus()
        return zaehler
    
    def onClear(self):
        self.lineEditSuchen.clear()
        self.lineEditFilesizeFrom.clear()
        self.lineEditFilesizeTo.clear()
        self.lineEditSuchen.setFocus()
        self.comboBoxFilesizeUnit.setCurrentIndex(0)
        self.lineEditSearchMpg.clear()
        self.lineEditSearchVid.clear()
        
    def onDateinamenUebernehmen(self):
        self.suchfeld.insertItem(0, self.lineEditSuchen.text())
        self.suchfeld.setCurrentIndex(0)
        self.suchfeld.setFocus()
        
    def onClearURL(self):
        self.lineEditURL.clear()
        self.lineEditURL.setFocus()
        
    def onClearSearch(self):
        self.lineEditSearchWebsite.clear()
        self.lineEditSearchWebsite.setFocus()        
        
    def onLoadStarted(self):
        app.setOverrideCursor(QtGui.QCursor(QtCore.Qt.WaitCursor))
        
    def onLoadFinished(self, arg):
        self.webView.page().toHtml(self.callBackToHtml)
        app.restoreOverrideCursor()
        self.webView.setFocus()
        
    def callBackToHtml(self, html):
        self.html = html
        
    def onVideoSuchen(self):
        actordata = ActorData(self.html)
        titel = ActorData.actor_list_of_movies(actordata)
        if titel:
            self.video_anzeigen(titel)
            
    def onIAFDSeite(self):
        self.webView.load(QtCore.QUrl("http://www.iafd.com/"))
        
    def onSearchWebsite(self):
        searchstring = self.lineEditSearchWebsite.text()
        self.webView.page().findText(searchstring)
        
    def onDarstellerdatenAbholen(self):
        url = self.webView.url().toString()
        ende = url.find("gender=") + 8
        url = url[0:ende]

        bilddialog = DarstellerdatenAnzeigen(app, url, self.html, self.verzeichnis_thumbs)