mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Get tags from settings.
This commit is contained in:
parent
0b0123f5db
commit
e0b6a9a769
@ -18,9 +18,10 @@ from calibre.gui2.store.web_store_dialog import WebStoreDialog
|
||||
class FeedbooksStore(BasicStoreConfig, StorePlugin):
|
||||
|
||||
def open(self, parent=None, detail_item=None, external=False):
|
||||
settings = self.get_settings()
|
||||
d = WebStoreDialog(self.gui, 'http://m.feedbooks.com/', parent, detail_item)
|
||||
d.setWindowTitle(self.name)
|
||||
d.set_tags(self.name + ',' + _('store'))
|
||||
d.set_tags(settings.get(self.name + '_tags', ''))
|
||||
d = d.exec_()
|
||||
|
||||
def search(self, query, max_results=10, timeout=60):
|
||||
|
@ -19,9 +19,10 @@ from calibre.gui2.store.web_store_dialog import WebStoreDialog
|
||||
class ManyBooksStore(BasicStoreConfig, StorePlugin):
|
||||
|
||||
def open(self, parent=None, detail_item=None, external=False):
|
||||
settings = self.get_settings()
|
||||
d = WebStoreDialog(self.gui, 'http://manybooks.net/', parent, detail_item)
|
||||
d.setWindowTitle(self.name)
|
||||
d.set_tags(self.name + ',' + _('store'))
|
||||
d.set_tags(settings.get(self.name + '_tags', ''))
|
||||
d = d.exec_()
|
||||
|
||||
def search(self, query, max_results=10, timeout=60):
|
||||
|
@ -20,13 +20,14 @@ from calibre.gui2.store.web_store_dialog import WebStoreDialog
|
||||
class SmashwordsStore(BasicStoreConfig, StorePlugin):
|
||||
|
||||
def open(self, parent=None, detail_item=None, external=False):
|
||||
settings = self.get_settings()
|
||||
aff_id = 'usernone'
|
||||
# Use Kovid's affiliate id 30% of the time.
|
||||
if random.randint(1, 10) in (1, 2, 3):
|
||||
aff_id = 'kovidgoyal'
|
||||
d = WebStoreDialog(self.gui, 'http://www.smashwords.com/?ref=%s' % aff_id, parent, detail_item)
|
||||
d.setWindowTitle(self.name)
|
||||
d.set_tags(self.name + ',' + _('store'))
|
||||
d.set_tags(settings.get(self.name + '_tags', ''))
|
||||
d = d.exec_()
|
||||
|
||||
def search(self, query, max_results=10, timeout=60):
|
||||
|
Loading…
x
Reference in New Issue
Block a user