Skip to content

Commit

Permalink
Upgrade version 3.0.1 - 2022/03/24
Browse files Browse the repository at this point in the history
  • Loading branch information
mxnt10 committed Mar 25, 2022
1 parent fb4b162 commit 7db50ed
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
6 changes: 4 additions & 2 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from threading import Thread

# Módulos do PyQt5
from PyQt5.QtCore import QUrl, QFileInfo, pyqtSlot, QMargins, Qt, QEvent, QTimer, pyqtSignal, QTranslator
from PyQt5.QtCore import QUrl, QFileInfo, pyqtSlot, QMargins, Qt, QEvent, QTimer, pyqtSignal, QTranslator, qDebug
from PyQt5.QtGui import QIcon, QDesktopServices, QKeySequence
from PyQt5.QtMultimedia import QMediaPlayer
from PyQt5.QtWebEngineWidgets import (QWebEngineView, QWebEnginePage, QWebEngineDownloadItem, QWebEngineSettings,
Expand Down Expand Up @@ -172,6 +172,8 @@ def bs(self, htm, parser):
try:
if not __err__ in res.title and res.findAll('div', {'class': '_26lC3'}):
verifyNotify(self, res)
else:
self.soma = 0
if __err__ in res.title: # Em caso de erro de conexão o título inicial não se altera
if self.changeTray != 1:
self.tray.setIcon(QIcon(setIcon('error')))
Expand All @@ -185,7 +187,7 @@ def bs(self, htm, parser):
self.tray.setIcon(QIcon(setIcon('original')))
self.changeTray = 3
except Exception as err:
warning('\033[33m %s.\033[m', err)
qDebug('\033[31m[DEBUG]\033[33m: ' + str(err) + '.\033[m')


# Função que manipula o código-fonte do webapp para a checagem das mensagens não lidas, emitindo sons,
Expand Down
9 changes: 5 additions & 4 deletions src/notify.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@
from os.path import realpath
from subprocess import run

# Modulos integrados (src)
from PyQt5.QtCore import QUrl
# Módulos do PyQt5
from PyQt5.QtCore import QUrl, qDebug
from PyQt5.QtMultimedia import QMediaContent

# Modulos integrados (src)
from jsonTools import set_json
from utils import setIcon, setSound
from version import __pagename__
Expand Down Expand Up @@ -43,7 +44,7 @@ def verifyNotify(self, res):
self.notify_sound.play()
if set_json('NotifyMessage') and not self.sysLogin:
notifyMessage(self)
except Exception:
pass
except Exception as err:
qDebug('\033[31m[DEBUG]\033[33m: ' + str(err) + '.\033[m')

self.sysLogin = False # Redefinição após a primeira verificação

0 comments on commit 7db50ed

Please sign in to comment.