From 9c4ebcb7424d188aef0dd2cd75ec5d17baf68916 Mon Sep 17 00:00:00 2001 From: Dummerle Date: Mon, 15 Mar 2021 12:03:03 +0100 Subject: [PATCH] Notification fix, legendary not required as dependency --- .idea/misc.xml | 2 +- README.md | 1 - Rare/Components/Tabs/Downloads/DownloadTab.py | 15 ++++++++++----- requirements.txt | 1 - 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/.idea/misc.xml b/.idea/misc.xml index 72ce5172..d56657ad 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,4 +1,4 @@ - + \ No newline at end of file diff --git a/README.md b/README.md index 4be4fec8..e62d04ae 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,6 @@ Rare is currently considered beta software and in no way feature-complete. You w - requests, - pillow - pyqt5 -- legendary-gl - notify-py - QtAwesome diff --git a/Rare/Components/Tabs/Downloads/DownloadTab.py b/Rare/Components/Tabs/Downloads/DownloadTab.py index c99be7a3..51e09935 100644 --- a/Rare/Components/Tabs/Downloads/DownloadTab.py +++ b/Rare/Components/Tabs/Downloads/DownloadTab.py @@ -7,7 +7,7 @@ from multiprocessing import Queue as MPQueue from PyQt5.QtCore import QThread, pyqtSignal, Qt, QVariant from PyQt5.QtWidgets import QWidget, QMessageBox, QVBoxLayout, QLabel, QGridLayout, QProgressBar, QPushButton, QDialog, QListWidget -from notifypy import Notify + from legendary.core import LegendaryCore from legendary.models.game import Game from legendary.models.downloading import UIUpdate @@ -245,10 +245,15 @@ class DownloadTab(QWidget): if text == "dl_finished": pass elif text == "finish": - notification = Notify() - notification.title = self.tr("Installation finished") - notification.message = self.tr("Download of game ") + self.active_game.app_title - notification.send() + try: + from notifypy import Notify + except ModuleNotFoundError: + logger.warning("No Notification Module found") + else: + notification = Notify() + notification.title = self.tr("Installation finished") + notification.message = self.tr("Download of game ") + self.active_game.app_title + notification.send() # QMessageBox.information(self, "Info", "Download finished") self.finished.emit() self.installing_game.setText(self.tr("Installing Game: No active download")) diff --git a/requirements.txt b/requirements.txt index 11e0ebc0..ca0c11d7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,3 @@ -git+https://github.com/ChemicalXandco/legendary.git@c1db2b9#egg=legendary-gl requests Pillow PyQt5