diff --git a/ArtNet/artnet_manager.py b/ArtNet/artnet_manager.py index 2785cb1..ff36380 100644 --- a/ArtNet/artnet_manager.py +++ b/ArtNet/artnet_manager.py @@ -129,7 +129,15 @@ class ArtNetManager: result = self.db_connection.get_tag_impliers(tag) if len(result) != 0: # tag is implied by some other tag - continue + skip = False + for implier_tag_id in result: + implier_tag_id, implier_tag_name, _, _ = self.db_connection.get_tag_by_ID(implier_tag_id)[0] + + if implier_tag_name.strip() in scraped_tags: + skip = True + break + if skip: # skipping the current tag as it is implied by another tag + continue result = self.db_connection.get_tag_aliases_by_name(tag) if len(result) != 0: # tag is already tagged by an alias diff --git a/ArtNet/gui/window.py b/ArtNet/gui/window.py index 4937a88..2085906 100644 --- a/ArtNet/gui/window.py +++ b/ArtNet/gui/window.py @@ -72,7 +72,9 @@ class Window(QtWidgets.QMainWindow): self.ui.prev_unknown_image_button.clicked.connect(self.on_prev_unknown_image_clicked) self.ui.next_unknown_image_button.clicked.connect(self.on_next_unknown_image_clicked) self.ui.delete_button.clicked.connect(self.on_delete_image_clicked) + self.ui.link_label.linkActivated.connect(self.on_link_label_activated) + self.ui.image_author_label.linkActivated.connect(self.on_image_author_label_activated) self.ui.presence_docker_button.clicked.connect(self.toggle_presence_docker) @@ -1045,4 +1047,8 @@ class Window(QtWidgets.QMainWindow): def on_link_label_activated(self, link: str): print("Source link activated!", link) + QDesktopServices.openUrl(QUrl(link)) + + def on_image_author_label_activated(self, link: str): + print("Image author link activated!", link) QDesktopServices.openUrl(QUrl(link)) \ No newline at end of file