mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-31 14:33:54 -04:00
Collect icon theme usage stats
This commit is contained in:
parent
51616d39e8
commit
0b7c14102d
@ -1,7 +1,7 @@
|
|||||||
__license__ = 'GPL v3'
|
__license__ = 'GPL v3'
|
||||||
__copyright__ = '2008, Kovid Goyal <kovid at kovidgoyal.net>'
|
__copyright__ = '2008, Kovid Goyal <kovid at kovidgoyal.net>'
|
||||||
|
|
||||||
import re, binascii, cPickle, ssl
|
import re, binascii, cPickle, ssl, json
|
||||||
from future_builtins import map
|
from future_builtins import map
|
||||||
from threading import Thread, Event
|
from threading import Thread, Event
|
||||||
|
|
||||||
@ -28,10 +28,15 @@ def get_download_url():
|
|||||||
return 'http://calibre-ebook.com/download_' + which
|
return 'http://calibre-ebook.com/download_' + which
|
||||||
|
|
||||||
def get_newest_version():
|
def get_newest_version():
|
||||||
|
try:
|
||||||
|
icon_theme_name = json.loads(I('icon-theme.json', data=True))['name']
|
||||||
|
except Exception:
|
||||||
|
icon_theme_name = ''
|
||||||
headers={
|
headers={
|
||||||
'CALIBRE-VERSION':__version__,
|
'CALIBRE-VERSION':__version__,
|
||||||
'CALIBRE-OS': ('win' if iswindows else 'osx' if isosx else 'oth'),
|
'CALIBRE-OS': ('win' if iswindows else 'osx' if isosx else 'oth'),
|
||||||
'CALIBRE-INSTALL-UUID': prefs['installation_uuid']
|
'CALIBRE-INSTALL-UUID': prefs['installation_uuid'],
|
||||||
|
'CALIBRE-ICON-THEME': icon_theme_name,
|
||||||
}
|
}
|
||||||
try:
|
try:
|
||||||
version = get_https_resource_securely(URL, headers=headers)
|
version = get_https_resource_securely(URL, headers=headers)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user