Mon, 12 May 2008 11:26:43 +0200 <thp@perli.net>
Fix race condition in is_download_in_progress() * src/gpodder/services.py: Make sure we behave correctly when items in the download list disappear while we are iterating over the list of downloads when trying to find out if a download is already in progress * src/gpodder/gui.py: Add SPGoetze to list of bug reporters (Closes: https://bugs.launchpad.net/ubuntu/+source/gpodder/+bug/208964) git-svn-id: svn://svn.berlios.de/gpodder/trunk@712 b0d088ad-0a06-0410-aad2-9ed5178a7e87
This commit is contained in:
parent
9ba9d6bbbd
commit
dd2300e727
|
@ -1,3 +1,12 @@
|
|||
Mon, 12 May 2008 11:26:43 +0200 <thp@perli.net>
|
||||
Fix race condition in is_download_in_progress()
|
||||
|
||||
* src/gpodder/services.py: Make sure we behave correctly when items in
|
||||
the download list disappear while we are iterating over the list of
|
||||
downloads when trying to find out if a download is already in progress
|
||||
* src/gpodder/gui.py: Add SPGoetze to list of bug reporters
|
||||
(Closes: https://bugs.launchpad.net/ubuntu/+source/gpodder/+bug/208964)
|
||||
|
||||
Mon, 12 May 2008 11:04:53 +0200 <thp@perli.net>
|
||||
Fix bugs in the calculate_size utility function
|
||||
|
||||
|
|
|
@ -92,7 +92,7 @@ app_authors = [
|
|||
'Pavel Mlčoch', 'Peter Hoffmann', 'Philippe Gouaillier', 'Pieter de Decker',
|
||||
'Preben Randhol', 'Rafael Proença', 'red26wings', 'Richard Voigt',
|
||||
'Robert Young', 'Roel Groeneveld',
|
||||
'Scott Wegner', 'Seth Remington', 'Shane Donohoe',
|
||||
'Scott Wegner', 'Seth Remington', 'Shane Donohoe', 'SPGoetze',
|
||||
'Stefan Lohmaier', 'Stephan Buys', 'Stylianos Papanastasiou', 'Teo Ramirez',
|
||||
'Thomas Matthijs', 'Thomas Mills Hinkle', 'Thomas Nilsson',
|
||||
'Tim Michelsen', 'Tim Preetz', 'Todd Zullinger', 'Tomas Matheson', 'VladDrac',
|
||||
|
|
|
@ -221,12 +221,18 @@ class DownloadStatusManager(ObservableService):
|
|||
self.notify( 'progress-detail', url, status['progress'], status['speed'])
|
||||
|
||||
def is_download_in_progress( self, url):
|
||||
for element in self.status_list:
|
||||
thread = self.status_list[element]['thread']
|
||||
if thread is not None and thread.url == url:
|
||||
return True
|
||||
|
||||
return False
|
||||
for element in self.status_list.keys():
|
||||
# We need this, because status_list is modified from other threads
|
||||
if element in self.status_list:
|
||||
try:
|
||||
thread = self.status_list[element]['thread']
|
||||
except:
|
||||
thread = None
|
||||
|
||||
if thread is not None and thread.url == url:
|
||||
return True
|
||||
|
||||
return False
|
||||
|
||||
def cancel_all( self):
|
||||
for element in self.status_list:
|
||||
|
|
Loading…
Reference in New Issue