From ce036345813620c799efb83b78c90fc73db3ce05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20D=C5=82ugosz?= Date: Sun, 5 May 2013 18:01:35 +0200 Subject: [PATCH] suspend deal vith ads4books --- src/calibre/customize/builtins.py | 2 -- src/calibre/gui2/store/stores/koobe_plugin.py | 14 ++++++++------ src/calibre/gui2/store/stores/woblink_plugin.py | 14 ++++++++------ 3 files changed, 16 insertions(+), 14 deletions(-) diff --git a/src/calibre/customize/builtins.py b/src/calibre/customize/builtins.py index da90452d0f..289a192b83 100644 --- a/src/calibre/customize/builtins.py +++ b/src/calibre/customize/builtins.py @@ -1476,7 +1476,6 @@ class StoreKoobeStore(StoreBase): drm_free_only = True headquarters = 'PL' formats = ['EPUB', 'MOBI', 'PDF'] - affiliate = True class StoreLegimiStore(StoreBase): name = 'Legimi' @@ -1660,7 +1659,6 @@ class StoreWoblinkStore(StoreBase): headquarters = 'PL' formats = ['EPUB', 'MOBI', 'PDF', 'WOBLINK'] - affiliate = True class XinXiiStore(StoreBase): name = 'XinXii' diff --git a/src/calibre/gui2/store/stores/koobe_plugin.py b/src/calibre/gui2/store/stores/koobe_plugin.py index 208592a827..b6ecdea6be 100644 --- a/src/calibre/gui2/store/stores/koobe_plugin.py +++ b/src/calibre/gui2/store/stores/koobe_plugin.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- from __future__ import (division, absolute_import, print_function) -store_version = 1 # Needed for dynamic plugin loading +store_version = 2 # Needed for dynamic plugin loading __license__ = 'GPL 3' __copyright__ = '2013, Tomasz Długosz ' @@ -25,19 +25,21 @@ from calibre.gui2.store.web_store_dialog import WebStoreDialog class KoobeStore(BasicStoreConfig, StorePlugin): def open(self, parent=None, detail_item=None, external=False): - aff_root = 'https://www.a4b-tracking.com/pl/stat-click-text-link/15/58/' + #aff_root = 'https://www.a4b-tracking.com/pl/stat-click-text-link/15/58/' url = 'http://www.koobe.pl/' - aff_url = aff_root + str(b64encode(url)) + #aff_url = aff_root + str(b64encode(url)) detail_url = None if detail_item: - detail_url = aff_root + str(b64encode(detail_item)) + detail_url = detail_item #aff_root + str(b64encode(detail_item)) if external or self.config.get('open_external', False): - open_url(QUrl(url_slash_cleaner(detail_url if detail_url else aff_url))) + #open_url(QUrl(url_slash_cleaner(detail_url if detail_url else aff_url))) + open_url(QUrl(url_slash_cleaner(detail_url if detail_url else url))) else: - d = WebStoreDialog(self.gui, url, parent, detail_url if detail_url else aff_url) + #d = WebStoreDialog(self.gui, url, parent, detail_url if detail_url else aff_url) + d = WebStoreDialog(self.gui, url, parent, detail_url if detail_url else url) d.setWindowTitle(self.name) d.set_tags(self.config.get('tags', '')) d.exec_() diff --git a/src/calibre/gui2/store/stores/woblink_plugin.py b/src/calibre/gui2/store/stores/woblink_plugin.py index 596bb76199..6434488b21 100644 --- a/src/calibre/gui2/store/stores/woblink_plugin.py +++ b/src/calibre/gui2/store/stores/woblink_plugin.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- from __future__ import (unicode_literals, division, absolute_import, print_function) -store_version = 2 # Needed for dynamic plugin loading +store_version = 3 # Needed for dynamic plugin loading __license__ = 'GPL 3' __copyright__ = '2011-2013, Tomasz Długosz ' @@ -26,19 +26,21 @@ from calibre.gui2.store.web_store_dialog import WebStoreDialog class WoblinkStore(BasicStoreConfig, StorePlugin): def open(self, parent=None, detail_item=None, external=False): - aff_root = 'https://www.a4b-tracking.com/pl/stat-click-text-link/16/58/' + #aff_root = 'https://www.a4b-tracking.com/pl/stat-click-text-link/16/58/' url = 'http://woblink.com/publication' - aff_url = aff_root + str(b64encode(url)) + #aff_url = aff_root + str(b64encode(url)) detail_url = None if detail_item: - detail_url = aff_root + str(b64encode('http://woblink.com' + detail_item)) + detail_url = 'http://woblink.com' + detail_item #aff_root + str(b64encode('http://woblink.com' + detail_item)) if external or self.config.get('open_external', False): - open_url(QUrl(url_slash_cleaner(detail_url if detail_url else aff_url))) + #open_url(QUrl(url_slash_cleaner(detail_url if detail_url else aff_url))) + open_url(QUrl(url_slash_cleaner(detail_url if detail_url else url))) else: - d = WebStoreDialog(self.gui, url, parent, detail_url if detail_url else aff_url) + #d = WebStoreDialog(self.gui, url, parent, detail_url if detail_url else aff_url) + d = WebStoreDialog(self.gui, url, parent, detail_url if detail_url else url) d.setWindowTitle(self.name) d.set_tags(self.config.get('tags', '')) d.exec_()