From c091c3b699f006dc28580bef075f9bd59f8274c4 Mon Sep 17 00:00:00 2001 From: Bernd Date: Sat, 26 Jul 2025 14:15:01 +0500 Subject: [PATCH] creating hyperlinks for seasons --- frontend.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/frontend.py b/frontend.py index 129a4e8..a0cd294 100644 --- a/frontend.py +++ b/frontend.py @@ -413,11 +413,19 @@ class AnimeTracker(QMainWindow): if entries: # Season title s_name = season.capitalize() if season else 'Other' - label = QLabel(s_name) + label = QLabel() season_font = QFont() season_font.setPointSize(int(12 * self.table_scale)) season_font.setBold(True) label.setFont(season_font) + if season: # Only create links for actual seasons, not 'Other' + mal_url = f"https://myanimelist.net/anime/season/{year}/{season}" + label.setText(f'{s_name}') + label.setTextFormat(Qt.RichText) + label.setOpenExternalLinks(True) # This makes the link clickable and open in browser + else: + label.setText(s_name) # No link for 'Other' section + layout.addWidget(label) # Season's stats @@ -716,6 +724,9 @@ class AnimeTracker(QMainWindow): self.tab_widget.setCurrentIndex(current - 1) elif key == Qt.Key_R: self.random_pick() + elif key == Qt.Key_Q: + self.close() + elif modifiers == Qt.ControlModifier: if key == Qt.Key_Plus or key == Qt.Key_Equal: current_id = self.get_current_tab_identifier()