Skip to content

Commit

Permalink
Merge branch '7aman-fix-pylint-hints'
Browse files Browse the repository at this point in the history
  • Loading branch information
alireza-amirsamimi committed Oct 12, 2019
2 parents 46f932f + 72eeac0 commit 0fb1e22
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
9 changes: 5 additions & 4 deletions persepolis/scripts/mainwindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -2939,7 +2939,7 @@ def propertiesCallback(self, add_link_dictionary, gid, category, video_finder_di
self.threadPool[len(self.threadPool) - 1].QTABLEREADY.connect(
partial(self.propertiesCallback2, add_link_dictionary, gid, category, video_finder_dictionary))
else:
self.propertiesCallback2(self, add_link_dictionary, gid, category, video_finder_dictionary)
self.propertiesCallback2(add_link_dictionary, gid, category, video_finder_dictionary)

def propertiesCallback2(self, add_link_dictionary, gid, category, video_finder_dictionary=None):
# current_category_tree_text is current category that highlighted by user
Expand Down Expand Up @@ -5489,9 +5489,10 @@ def moveSelectedDownloads(self, menu=None):
file_name = self.download_table.item(row, 0).text()

# show error message
#TODO: no value for message2
notifySend(QCoreApplication.translate("mainwindow_src_ui_tr",
'Operation was not successful! Following download must be completed first: ') + file_name,
5000, 'fail', parent=self)
message1='Operation was not successful! Following download must be completed first: '),
message2=file_name, time=5000, sound='fail', parent=self)

# move files with MoveThread
# MoveThread is created to pervent UI freezing.
Expand Down Expand Up @@ -5574,7 +5575,7 @@ def clearDownloadList(self, item):
else:
self.clearDownloadList2()

def clearDownloadList(self):
def clearDownloadList2(self):
# all Downloads must be stopped by user
gid_list = self.persepolis_db.findActiveDownloads()

Expand Down
6 changes: 4 additions & 2 deletions persepolis/scripts/properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,8 @@ def okButtonPressed(self, button):

# if link changed, then update download_db_table in data base
if self.add_link_dictionary_1['link'] != self.add_link_dictionary_1_backup['link']:
dictionary = {'gid': self.gid_1, 'link': link}

dictionary = {'gid': self.gid_1, 'link': self.add_link_dictionary_1['link']}
self.parent.persepolis_db.updateDownloadTable([dictionary])

# if any thing in add_link_dictionary_2 is changed,then update data base!
Expand All @@ -494,7 +495,8 @@ def okButtonPressed(self, button):

# if link changed, then update download_db_table in data base
if self.add_link_dictionary_2['link'] != self.add_link_dictionary_2_backup['link']:
dictionary = {'gid': self.gid_2, 'link': link}

dictionary = {'gid': self.gid_2, 'link': self.add_link_dictionary_2['link']}
self.parent.persepolis_db.updateDownloadTable([dictionary])

# if download_path was changed, then update video_finder_db_table in data base
Expand Down
2 changes: 1 addition & 1 deletion persepolis/scripts/spider.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def spider(add_link_dictionary):

if download_user:
# set download user pass to the session
requests_session.auth(download_user, download_passwd)
requests_session.auth = (download_user, download_passwd)

# set cookies
if raw_cookies:
Expand Down
3 changes: 1 addition & 2 deletions persepolis/scripts/video_finder_progress.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,7 @@ def afterPushButtonPressed(self, button):

else:
# for Windows
# TODO: gid_list -> self.gid_list
for gid in gid_list:
for gid in self.gid_list:
shutdown_enable = ShutDownThread(self.parent, self.video_finder_plus_gid)
self.parent.threadPool.append(shutdown_enable)
self.parent.threadPool[len(self.parent.threadPool) - 1].start()
Expand Down

0 comments on commit 0fb1e22

Please sign in to comment.