mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-07 01:14:15 +02:00
[gem.appimage] refactoring: self-install using 'repository' instead of 'github'
This commit is contained in:
@@ -79,7 +79,7 @@ class AppImageManager(SoftwareManager, SettingsController):
|
|||||||
self.configman = AppImageConfigManager()
|
self.configman = AppImageConfigManager()
|
||||||
self._custom_actions: Optional[Iterable[CustomSoftwareAction]] = None
|
self._custom_actions: Optional[Iterable[CustomSoftwareAction]] = None
|
||||||
self._action_self_install: Optional[CustomSoftwareAction] = None
|
self._action_self_install: Optional[CustomSoftwareAction] = None
|
||||||
self._app_github: Optional[str] = None
|
self._app_repository: Optional[str] = None
|
||||||
self._search_unfilled_attrs: Optional[Tuple[str, ...]] = None
|
self._search_unfilled_attrs: Optional[Tuple[str, ...]] = None
|
||||||
self._suggestions_downloader: Optional[AppImageSuggestionsDownloader] = None
|
self._suggestions_downloader: Optional[AppImageSuggestionsDownloader] = None
|
||||||
|
|
||||||
@@ -441,7 +441,7 @@ class AppImageManager(SoftwareManager, SettingsController):
|
|||||||
return TransactionResult(success=True, installed=None, removed=[pkg])
|
return TransactionResult(success=True, installed=None, removed=[pkg])
|
||||||
|
|
||||||
def _add_self_latest_version(self, app: AppImage):
|
def _add_self_latest_version(self, app: AppImage):
|
||||||
if app.name == self.context.app_name and app.repository == self.app_github and not app.url_download_latest_version:
|
if app.name == self.context.app_name and app.repository == self.app_repository and not app.url_download_latest_version:
|
||||||
history = self.get_history(app)
|
history = self.get_history(app)
|
||||||
|
|
||||||
if not history or not history.history:
|
if not history or not history.history:
|
||||||
@@ -998,7 +998,7 @@ class AppImageManager(SoftwareManager, SettingsController):
|
|||||||
@property
|
@property
|
||||||
def search_unfilled_attrs(self) -> Tuple[str, ...]:
|
def search_unfilled_attrs(self) -> Tuple[str, ...]:
|
||||||
if self._search_unfilled_attrs is None:
|
if self._search_unfilled_attrs is None:
|
||||||
self._search_unfilled_attrs = ('icon_url', 'url_download_latest_version', 'author', 'license', 'github',
|
self._search_unfilled_attrs = ('icon_url', 'url_download_latest_version', 'author', 'license', 'repository',
|
||||||
'source', 'url_screenshot')
|
'source', 'url_screenshot')
|
||||||
|
|
||||||
return self._search_unfilled_attrs
|
return self._search_unfilled_attrs
|
||||||
@@ -1013,7 +1013,7 @@ class AppImageManager(SoftwareManager, SettingsController):
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
app = AppImage(name=self.context.app_name, version=self.context.app_version,
|
app = AppImage(name=self.context.app_name, version=self.context.app_version,
|
||||||
categories=['system'], author=self.context.app_name, github=self.app_github,
|
categories=['system'], author=self.context.app_name, repository=self.app_repository,
|
||||||
license='zlib/libpng')
|
license='zlib/libpng')
|
||||||
|
|
||||||
res = self._install(pkg=app, watcher=watcher,
|
res = self._install(pkg=app, watcher=watcher,
|
||||||
@@ -1094,11 +1094,11 @@ class AppImageManager(SoftwareManager, SettingsController):
|
|||||||
return self._action_self_install
|
return self._action_self_install
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def app_github(self) -> str:
|
def app_repository(self) -> str:
|
||||||
if self._app_github is None:
|
if self._app_repository is None:
|
||||||
self._app_github = f'vinifmor/{self.context.app_name}'
|
self._app_repository = f"https://github.com/vinifmor/{self.context.app_name}"
|
||||||
|
|
||||||
return self._app_github
|
return self._app_repository
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def suggestions_downloader(self) -> AppImageSuggestionsDownloader:
|
def suggestions_downloader(self) -> AppImageSuggestionsDownloader:
|
||||||
|
|||||||
Reference in New Issue
Block a user