Remove legacy settings

This commit is contained in:
Timmy Welch 2023-01-31 19:44:47 -08:00
parent d987a811e3
commit ba4b779145
No known key found for this signature in database
3 changed files with 4 additions and 9 deletions

View File

@ -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:

View File

@ -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):

View File

@ -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,