mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-07 03:34:15 +02:00
arch:using axel to pre-download source file | info window handling list attributes better
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
import logging
|
||||
import platform
|
||||
import sys
|
||||
|
||||
from bauh.api.abstract.cache import MemoryCacheFactory
|
||||
from bauh.api.abstract.disk import DiskCacheLoaderFactory
|
||||
from bauh.api.abstract.download import FileDownloader
|
||||
from bauh.api.http import HttpClient
|
||||
|
||||
|
||||
@@ -10,7 +12,7 @@ class ApplicationContext:
|
||||
|
||||
def __init__(self, disk_cache: bool, download_icons: bool, http_client: HttpClient, app_root_dir: str, i18n: dict,
|
||||
cache_factory: MemoryCacheFactory, disk_loader_factory: DiskCacheLoaderFactory,
|
||||
logger: logging.Logger):
|
||||
logger: logging.Logger, file_downloader: FileDownloader):
|
||||
"""
|
||||
:param disk_cache: if package data should be cached to disk
|
||||
:param download_icons: if packages icons should be downloaded
|
||||
@@ -20,6 +22,7 @@ class ApplicationContext:
|
||||
:param cache_factory:
|
||||
:param disk_loader_factory:
|
||||
:param logger: a logger instance
|
||||
:param file_downloader:
|
||||
"""
|
||||
self.disk_cache = disk_cache
|
||||
self.download_icons = download_icons
|
||||
@@ -30,3 +33,8 @@ class ApplicationContext:
|
||||
self.disk_loader_factory = disk_loader_factory
|
||||
self.logger = logger
|
||||
self.linux_distro = platform.linux_distribution()
|
||||
self.file_downloader = file_downloader
|
||||
self.arch_x86_64 = sys.maxsize > 2**32
|
||||
|
||||
def is_system_x86_64(self):
|
||||
return self.arch_x86_64
|
||||
|
||||
Reference in New Issue
Block a user