mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-29 20:34:22 +01:00
Improve speed
This commit is contained in:
parent
09e8d6e616
commit
a48e35876c
1 changed files with 5 additions and 18 deletions
|
@ -46,6 +46,7 @@ class RepoInfo(Configs):
|
|||
count: int = 0
|
||||
status: str = 'Disabled'
|
||||
color: str = self.red
|
||||
|
||||
if value[0]:
|
||||
enabled += 1
|
||||
status: str = 'Enabled'
|
||||
|
@ -58,25 +59,11 @@ class RepoInfo(Configs):
|
|||
if last is None:
|
||||
last: tuple = ('',)
|
||||
|
||||
packages: dict = {
|
||||
self.repos.sbo_repo_name: SBoQueries('').count_packages(),
|
||||
self.repos.ponce_repo_name: SBoQueries('').count_packages(),
|
||||
self.repos.alien_repo_name: BinQueries('', repo).count_packages(),
|
||||
self.repos.multilib_repo_name: BinQueries('', repo).count_packages(),
|
||||
self.repos.restricted_repo_name: BinQueries('', repo).count_packages(),
|
||||
self.repos.gnome_repo_name: BinQueries('', repo).count_packages(),
|
||||
self.repos.msb_repo_name: BinQueries('', repo).count_packages(),
|
||||
self.repos.conraid_repo_name: BinQueries('', repo).count_packages(),
|
||||
self.repos.slackonly_repo_name: BinQueries('', repo).count_packages(),
|
||||
self.repos.ponce_bin_repo_name: BinQueries('', repo).count_packages(),
|
||||
self.repos.salixos_repo_name: BinQueries('', repo).count_packages(),
|
||||
self.repos.salixos_extra_repo_name: BinQueries('', repo).count_packages(),
|
||||
self.repos.slackel_repo_name: BinQueries('', repo).count_packages(),
|
||||
self.repos.slint_repo_name: BinQueries('', repo).count_packages()
|
||||
}
|
||||
|
||||
if value[0]:
|
||||
count: int = packages[repo]
|
||||
if repo in [self.repos.sbo_repo_name, self.repos.ponce_repo_name]:
|
||||
count = int(SBoQueries('').count_packages())
|
||||
else:
|
||||
count = int(BinQueries('', repo).count_packages())
|
||||
|
||||
total_packages += count
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue