Skip to content

Commit

Permalink
some bugs are fixed.
Browse files Browse the repository at this point in the history
	modified:   persepolis/scripts/download.py
	modified:   persepolis/scripts/mainwindow.py
	modified:   persepolis/scripts/progress.py
	modified:   persepolis/scripts/shutdown.py
  • Loading branch information
alireza-amirsamimi committed Nov 24, 2019
1 parent 1bc272d commit 2414998
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 8 deletions.
6 changes: 2 additions & 4 deletions persepolis/scripts/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,15 +320,13 @@ def downloadAria(gid, parent):
error_message = str(traceback.format_exc())
logger.sendToLog(error_message, "ERROR")

# return None!
return None
# return False!
return False
else:
# if start_time_status is "stopped" it means download Canceled by user
logger.sendToLog("Download Canceled", "INFO")

# this function returns list of download information


def tellActive():
# get download information from aria2
try:
Expand Down
2 changes: 1 addition & 1 deletion persepolis/scripts/mainwindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ def run(self):
# if request is not successful then persepolis is checking rpc
# connection with download.aria2Version() function
answer = download.downloadAria(self.gid, self.parent)
if not(answer):
if answer == False:
version_answer = download.aria2Version()

if version_answer == 'did not respond':
Expand Down
2 changes: 1 addition & 1 deletion persepolis/scripts/progress.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@
from persepolis.scripts.shutdown import shutDown
from persepolis.scripts.bubble import notifySend
from persepolis.scripts import download
from persepolis.constants import OS
from PyQt5.QtGui import QIcon
import subprocess
import platform
import time

os_type = platform.system()


class ShutDownThread(QThread):
def __init__(self, parent, gid, password=None):
QThread.__init__(self)
Expand Down
2 changes: 0 additions & 2 deletions persepolis/scripts/shutdown.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,8 @@
import subprocess
import platform

# find os platform
os_type = platform.system()


def shutDown(parent, gid=None, category=None, password=None):
# for queue >> gid = None
# for single downloads >> category = None
Expand Down

0 comments on commit 2414998

Please sign in to comment.