mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-08 06:14:16 +02:00
setting flathub remote if it is not set (#18)
This commit is contained in:
@@ -17,6 +17,7 @@ class FlatpakManager:
|
||||
self.http_session = requests.Session()
|
||||
self.lock_read = Lock()
|
||||
self.async_data_loader = FlatpakAsyncDataLoaderManager(api_cache=self.api_cache)
|
||||
flatpak.set_default_remotes()
|
||||
|
||||
def _map_to_model(self, app: dict) -> FlatpakApplication:
|
||||
|
||||
|
||||
@@ -212,3 +212,8 @@ def search(word: str) -> List[dict]:
|
||||
|
||||
def install_and_stream(app_id: str, origin: str):
|
||||
return system.stream_cmd([BASE_CMD, 'install', origin, app_id, '-y'])
|
||||
|
||||
|
||||
def set_default_remotes():
|
||||
system.run_cmd('flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user