Fixed a Bug with URL prediction

Fixed an issue where the already set URL was incorrectly read and therefore not taken into account for tag importing.
dev
Peery 3 years ago
parent 8568123194
commit c1371a41f4

@ -1,5 +1,6 @@
import validators, os import validators, os
import logging import logging
import re
from PyQt5 import QtWidgets from PyQt5 import QtWidgets
from PyQt5.QtCore import Qt, QSize, QUrl from PyQt5.QtCore import Qt, QSize, QUrl
@ -328,7 +329,13 @@ class ImporterWindow(ArtnetMainWindow):
Otherwise an empty string Otherwise an empty string
:return: :return:
""" """
return self.ui.link_label.text() result = re.match('[ a-zA-Z<=>"]*((https|http)://[a-zA-Z0-9]+\.[a-zA-Z0-9]+/[a-zA-Z0-9/]+)',
self.ui.link_label.text()).groups()
if result is not None:
result = result[0]
else:
result = ""
return result
def set_presence_label_text(self, presences: list): def set_presence_label_text(self, presences: list):
""" """
@ -1004,7 +1011,7 @@ class ImporterWindow(ArtnetMainWindow):
logging.info("SpinBox change detected!") logging.info("SpinBox change detected!")
result = QtWidgets.QMessageBox.question(self, "Switch Image?", result = QtWidgets.QMessageBox.question(self, "Switch Image?",
"Do you really want to skip to image #{1} \"{0}\"?" "Do you really want to skip to image #{1} \"{0}\"?"
.format(self.__main.all_images[v], .format(self.main.all_images[v],
v)) v))
if result == QtWidgets.QMessageBox.Yes: if result == QtWidgets.QMessageBox.Yes:
self.main.curr_image_index = v self.main.curr_image_index = v

Loading…
Cancel
Save