setting flathub remote if it is not set (#18)

This commit is contained in:
Vinícius Moreira
2019-07-08 12:55:08 -03:00
committed by GitHub
parent 74fa85a2bb
commit 81b7846a7d
7 changed files with 39 additions and 32 deletions

View File

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

View File

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