From d0791145c73dd6a4ebb84fc74a87cb93967eab82 Mon Sep 17 00:00:00 2001 From: John Schember Date: Sun, 21 Apr 2013 09:17:16 -0400 Subject: [PATCH 1/2] Store: Update Kobo program links. --- src/calibre/gui2/store/stores/kobo_plugin.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/calibre/gui2/store/stores/kobo_plugin.py b/src/calibre/gui2/store/stores/kobo_plugin.py index 44f4f4001c..62652ca855 100644 --- a/src/calibre/gui2/store/stores/kobo_plugin.py +++ b/src/calibre/gui2/store/stores/kobo_plugin.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- from __future__ import (unicode_literals, 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__ = '2011, John Schember ' @@ -31,10 +31,10 @@ class KoboStore(BasicStoreConfig, StorePlugin): if random.randint(1, 10) in (1, 2, 3): pub_id = '0dsO3kDu/AU' - murl = 'http://click.linksynergy.com/fs-bin/click?id=%s&offerid=268429.4&type=3&subid=0' % pub_id + murl = 'http://click.linksynergy.com/fs-bin/click?id=%s&subid=&offerid=280046.1&type=10&tmpid=9310&RD_PARM1=http%%3A%%2F%%2Fkobo.com' % pub_id if detail_item: - purl = 'http://click.linksynergy.com/link?id=%s&offerid=268429&type=2&murl=%s' % (pub_id, urllib.quote_plus(detail_item)) + purl = 'http://click.linksynergy.com/link?id=%s&offerid=280046&type=2&murl=%s' % (pub_id, urllib.quote_plus(detail_item)) url = purl else: purl = None From 62b8af88a3526923f25c0d51f378184ed2570003 Mon Sep 17 00:00:00 2001 From: John Schember Date: Sun, 21 Apr 2013 09:28:37 -0400 Subject: [PATCH 2/2] Store: Remove affilate program from Google books because they are retiring the program. --- src/calibre/customize/builtins.py | 1 - .../gui2/store/stores/google_books_plugin.py | 22 ++----------------- 2 files changed, 2 insertions(+), 21 deletions(-) diff --git a/src/calibre/customize/builtins.py b/src/calibre/customize/builtins.py index d0a04dae26..baf32ea017 100644 --- a/src/calibre/customize/builtins.py +++ b/src/calibre/customize/builtins.py @@ -1448,7 +1448,6 @@ class StoreGoogleBooksStore(StoreBase): headquarters = 'US' formats = ['EPUB', 'PDF', 'TXT'] - affiliate = True class StoreGutenbergStore(StoreBase): name = 'Project Gutenberg' diff --git a/src/calibre/gui2/store/stores/google_books_plugin.py b/src/calibre/gui2/store/stores/google_books_plugin.py index f6f91fd81d..65a7ccdfb4 100644 --- a/src/calibre/gui2/store/stores/google_books_plugin.py +++ b/src/calibre/gui2/store/stores/google_books_plugin.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- from __future__ import (unicode_literals, 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__ = '2011, John Schember ' @@ -25,25 +25,7 @@ from calibre.gui2.store.web_store_dialog import WebStoreDialog class GoogleBooksStore(BasicStoreConfig, StorePlugin): def open(self, parent=None, detail_item=None, external=False): - aff_id = { - 'lid': '41000000033185143', - 'pubid': '21000000000352219', - 'ganpub': 'k352219', - 'ganclk': 'GOOG_1335334761', - } - # Use Kovid's affiliate id 30% of the time. - if random.randint(1, 10) in (1, 2, 3): - aff_id = { - 'lid': '41000000031855266', - 'pubid': '21000000000352583', - 'ganpub': 'k352583', - 'ganclk': 'GOOG_1335335464', - } - - url = 'http://gan.doubleclick.net/gan_click?lid=%(lid)s&pubid=%(pubid)s' % aff_id - if detail_item: - detail_item += '&ganpub=%(ganpub)s&ganclk=%(ganclk)s' % aff_id - + url = 'http://books.google.com/books' if external or self.config.get('open_external', False): open_url(QUrl(url_slash_cleaner(detail_item if detail_item else url))) else: