mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Update url for win64 builds
This commit is contained in:
parent
7633b69c8d
commit
ffe5db3bad
@ -8,7 +8,7 @@ from PyQt4.Qt import (QThread, pyqtSignal, Qt, QUrl, QDialog, QGridLayout,
|
|||||||
import mechanize
|
import mechanize
|
||||||
|
|
||||||
from calibre.constants import (__appname__, __version__, iswindows, isosx,
|
from calibre.constants import (__appname__, __version__, iswindows, isosx,
|
||||||
isportable)
|
isportable, is64bit)
|
||||||
from calibre import browser, prints, as_unicode
|
from calibre import browser, prints, as_unicode
|
||||||
from calibre.utils.config import prefs
|
from calibre.utils.config import prefs
|
||||||
from calibre.gui2 import config, dynamic, open_url
|
from calibre.gui2 import config, dynamic, open_url
|
||||||
@ -19,6 +19,13 @@ URL = 'http://status.calibre-ebook.com/latest'
|
|||||||
NO_CALIBRE_UPDATE = '-0.0.0'
|
NO_CALIBRE_UPDATE = '-0.0.0'
|
||||||
VSEP = '|'
|
VSEP = '|'
|
||||||
|
|
||||||
|
def get_download_url():
|
||||||
|
which = ('portable' if isportable else 'windows' if iswindows
|
||||||
|
else 'osx' if isosx else 'linux')
|
||||||
|
if which == 'windows' and is64bit:
|
||||||
|
which += '64'
|
||||||
|
return 'http://calibre-ebook.com/download_' + which
|
||||||
|
|
||||||
def get_newest_version():
|
def get_newest_version():
|
||||||
br = browser()
|
br = browser()
|
||||||
req = mechanize.Request(URL)
|
req = mechanize.Request(URL)
|
||||||
@ -116,10 +123,7 @@ class UpdateNotification(QDialog):
|
|||||||
config.set('new_version_notification', bool(self.cb.isChecked()))
|
config.set('new_version_notification', bool(self.cb.isChecked()))
|
||||||
|
|
||||||
def accept(self):
|
def accept(self):
|
||||||
url = ('http://calibre-ebook.com/download_' +
|
open_url(QUrl(get_download_url()))
|
||||||
('portable' if isportable else 'windows' if iswindows
|
|
||||||
else 'osx' if isosx else 'linux'))
|
|
||||||
open_url(QUrl(url))
|
|
||||||
|
|
||||||
QDialog.accept(self)
|
QDialog.accept(self)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user