mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-07 00:04:15 +02:00
[flatpak] fix update-checking for version 1.5.X
This commit is contained in:
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
|
||||
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||
|
||||
## [0.6.4] 2019-10-13
|
||||
### Fixes
|
||||
- Flatpak update-checking for version 1.5.X
|
||||
|
||||
## [0.6.3] 2019-10-11
|
||||
### Fixes
|
||||
- AUR update check for some scenarios
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
__version__ = '0.6.3'
|
||||
__version__ = '0.6.4'
|
||||
__app_name__ = 'bauh'
|
||||
|
||||
import os
|
||||
|
||||
@@ -96,7 +96,11 @@ class FlatpakManager(SoftwareManager):
|
||||
for app_json in installed:
|
||||
model = self._map_to_model(app_json=app_json, installed=True,
|
||||
disk_loader=disk_loader, internet=internet_available)
|
||||
model.update = app_json['ref'] in updates[0] if updates else None
|
||||
if version >= '1.5.0':
|
||||
model.update = '{}/{}'.format(app_json['id'], app_json['branch']) in updates[0] if updates else None
|
||||
else:
|
||||
model.update = app_json['ref'] in updates[0] if updates else None
|
||||
|
||||
models.append(model)
|
||||
|
||||
return SearchResult(models, None, len(models))
|
||||
|
||||
@@ -30,7 +30,7 @@ class FlatpakAsyncDataLoader(Thread):
|
||||
try:
|
||||
res = self.http_client.get('{}/apps/{}'.format(FLATHUB_API_URL, self.app.id))
|
||||
|
||||
if res.status_code == 200 and res.text:
|
||||
if res and res.text:
|
||||
data = res.json()
|
||||
|
||||
if not self.app.version:
|
||||
|
||||
Reference in New Issue
Block a user