Skip to content

Commit

Permalink
Implement #650: open default browser to release page if checkNewVersi…
Browse files Browse the repository at this point in the history
…on=True in config.ini
  • Loading branch information
Nandaka committed Aug 24, 2020
1 parent f5c7994 commit 97c0b4e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions PixivHelper.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import traceback
import unicodedata
import urllib
import webbrowser
import zipfile
from datetime import date, datetime, timedelta, tzinfo
from pathlib import Path
Expand Down Expand Up @@ -976,10 +977,13 @@ def check_version(br, config=None):
latest_version_int = int(latest_version_full[0][0])
curr_version_int = int(re.findall(r"(\d+)", PixivConstant.PIXIVUTIL_VERSION)[0])
is_beta = True if latest_version_full[0][1].find("beta") >= 0 else False
url = "https://github.com/Nandaka/PixivUtil2/releases"
if latest_version_int > curr_version_int and is_beta:
print_and_log("info", "New beta version available: {0}".format(latest_version_full[0]))
webbrowser.open_new(url)
elif latest_version_int > curr_version_int:
print_and_log("info", "New version available: {0}".format(latest_version_full[0]))
webbrowser.open_new(url)


def decode_tags(tags):
Expand Down

0 comments on commit 97c0b4e

Please sign in to comment.