Remove sleep from ficwad, fix menu in plugin when changing libraries.

This commit is contained in:
Jim Miller
2012-02-04 16:16:19 -06:00
parent 52fc8633e5
commit b19385ada3
3 changed files with 5 additions and 4 deletions
+1 -1
View File
@@ -27,7 +27,7 @@ class FanFictionDownLoaderBase(InterfaceActionBase):
description = 'UI plugin to download FanFiction stories from various sites.'
supported_platforms = ['windows', 'osx', 'linux']
author = 'Jim Miller'
version = (1, 3, 3)
version = (1, 3, 4)
minimum_calibre_version = (0, 8, 30)
#: This field defines the GUI plugin class that contains all the code
+4
View File
@@ -119,6 +119,10 @@ class FanFictionDownLoaderPlugin(InterfaceAction):
def about_to_show_menu(self):
self.rebuild_menus()
def library_changed(self, db):
# We need to reset our menus after switching libraries
self.rebuild_menus()
def rebuild_menus(self):
with self.menus_lock:
# Show the config dialog
@@ -201,9 +201,6 @@ class FicwadComSiteAdapter(BaseSiteAdapter):
def getChapterText(self, url):
logging.debug('Getting chapter text from: %s' % url)
time.sleep(0.5) ## ffnet tends to fail more if hit too fast.
## This is in additional to what ever the
## slow_down_sleep_time setting is.
soup = bs.BeautifulStoneSoup(self._fetchUrl(url),
selfClosingTags=('br','hr')) # otherwise soup eats the br/hr tags.