mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Legimi Store, add affiliate links
This commit is contained in:
commit
96cdbe105e
@ -1452,7 +1452,8 @@ class StoreLegimiStore(StoreBase):
|
|||||||
actual_plugin = 'calibre.gui2.store.stores.legimi_plugin:LegimiStore'
|
actual_plugin = 'calibre.gui2.store.stores.legimi_plugin:LegimiStore'
|
||||||
|
|
||||||
headquarters = 'PL'
|
headquarters = 'PL'
|
||||||
formats = ['EPUB']
|
formats = ['EPUB', 'PDF', 'MOBI']
|
||||||
|
affiliate = True
|
||||||
|
|
||||||
class StoreLibreDEStore(StoreBase):
|
class StoreLibreDEStore(StoreBase):
|
||||||
name = 'Libri DE'
|
name = 'Libri DE'
|
||||||
|
@ -25,11 +25,12 @@ class LegimiStore(BasicStoreConfig, StorePlugin):
|
|||||||
|
|
||||||
def open(self, parent=None, detail_item=None, external=False):
|
def open(self, parent=None, detail_item=None, external=False):
|
||||||
|
|
||||||
url = 'http://www.legimi.com/pl/ebooks/?price=any'
|
plain_url = 'http://www.legimi.com/pl/ebooks/?price=any'
|
||||||
|
url = 'https://ssl.afiliant.com/affskrypt,,2f9de2,,11483,,,?u=(' + plain_url + ')'
|
||||||
detail_url = None
|
detail_url = None
|
||||||
|
|
||||||
if detail_item:
|
if detail_item:
|
||||||
detail_url = detail_item
|
detail_url = 'https://ssl.afiliant.com/affskrypt,,2f9de2,,11483,,,?u=(' + detail_item + ')'
|
||||||
|
|
||||||
if external or self.config.get('open_external', False):
|
if external or self.config.get('open_external', False):
|
||||||
open_url(QUrl(url_slash_cleaner(detail_url if detail_url else url)))
|
open_url(QUrl(url_slash_cleaner(detail_url if detail_url else url)))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user