35 lines
866 B
Python
35 lines
866 B
Python
# Imports
|
|
from src.ui.qt_app import run
|
|
from src.core.file_manager import FileManager
|
|
from src.core.tag_manager import TagManager
|
|
|
|
|
|
def _use_system_certificates() -> None:
|
|
"""Make HTTPS (ČSFD fetching) use the OS certificate store.
|
|
|
|
Required behind corporate SSL inspection, where the proxy's root CA is in the
|
|
Windows trust store but not in certifi's bundle. Best-effort; ignored if the
|
|
optional `truststore` package is unavailable.
|
|
"""
|
|
try:
|
|
import truststore
|
|
truststore.inject_into_ssl()
|
|
except Exception:
|
|
pass
|
|
|
|
|
|
class State:
|
|
def __init__(self) -> None:
|
|
self.tagmanager = TagManager()
|
|
self.filehandler = FileManager(self.tagmanager)
|
|
|
|
|
|
def main() -> None:
|
|
_use_system_certificates()
|
|
state = State()
|
|
run(state.filehandler, state.tagmanager)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|