[flatpak] fix update-checking for version 1.5.X

This commit is contained in:
Vinicius Moreira
2019-10-13 18:14:24 -03:00
parent 0224cf857a
commit 9fa9df04a5
4 changed files with 11 additions and 3 deletions

View File

@@ -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/). 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 ## [0.6.3] 2019-10-11
### Fixes ### Fixes
- AUR update check for some scenarios - AUR update check for some scenarios

View File

@@ -1,4 +1,4 @@
__version__ = '0.6.3' __version__ = '0.6.4'
__app_name__ = 'bauh' __app_name__ = 'bauh'
import os import os

View File

@@ -96,7 +96,11 @@ class FlatpakManager(SoftwareManager):
for app_json in installed: for app_json in installed:
model = self._map_to_model(app_json=app_json, installed=True, model = self._map_to_model(app_json=app_json, installed=True,
disk_loader=disk_loader, internet=internet_available) 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) models.append(model)
return SearchResult(models, None, len(models)) return SearchResult(models, None, len(models))

View File

@@ -30,7 +30,7 @@ class FlatpakAsyncDataLoader(Thread):
try: try:
res = self.http_client.get('{}/apps/{}'.format(FLATHUB_API_URL, self.app.id)) 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() data = res.json()
if not self.app.version: if not self.app.version: