Remove legacy settings
This commit is contained in:
parent
d987a811e3
commit
ba4b779145
@ -13,7 +13,6 @@ from comictaggerlib.defaults import DEFAULT_REPLACEMENTS, Replacement, Replaceme
|
||||
def general(parser: settngs.Manager) -> None:
|
||||
# General Settings
|
||||
parser.add_setting("check_for_new_version", default=False, cmdline=False)
|
||||
parser.add_setting("send_usage_stats", default=False, cmdline=False)
|
||||
|
||||
|
||||
def internal(parser: settngs.Manager) -> None:
|
||||
|
@ -2106,11 +2106,7 @@ Have fun!
|
||||
|
||||
def check_latest_version_online(self) -> None:
|
||||
version_checker = VersionChecker()
|
||||
self.version_check_complete(
|
||||
version_checker.get_latest_version(
|
||||
self.options[0].internal_install_id, self.options[0].general_send_usage_stats
|
||||
)
|
||||
)
|
||||
self.version_check_complete(version_checker.get_latest_version(self.options[0].internal_install_id))
|
||||
|
||||
def version_check_complete(self, new_version: tuple[str, str]) -> None:
|
||||
if new_version[0] not in (self.version, self.options[0].dialog_dont_notify_about_this_version):
|
||||
|
@ -25,16 +25,16 @@ logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class VersionChecker:
|
||||
def get_request_url(self, uuid: str, use_stats: bool) -> tuple[str, dict[str, str]]:
|
||||
def get_request_url(self, uuid: str) -> tuple[str, dict[str, str]]:
|
||||
|
||||
base_url = "https://api.github.com/repos/comictagger/comictagger/releases/latest"
|
||||
params: dict[str, str] = {}
|
||||
|
||||
return base_url, params
|
||||
|
||||
def get_latest_version(self, uuid: str, use_stats: bool = True) -> tuple[str, str]:
|
||||
def get_latest_version(self, uuid: str) -> tuple[str, str]:
|
||||
try:
|
||||
url, params = self.get_request_url(uuid, use_stats)
|
||||
url, params = self.get_request_url(uuid)
|
||||
release = requests.get(
|
||||
url,
|
||||
params=params,
|
||||
|
Loading…
Reference in New Issue
Block a user