mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-09 02:54:16 +02:00
retrieving URL file size correctly | improving downloaded file size format
This commit is contained in:
@@ -199,7 +199,14 @@ class AppImageManager(SoftwareManager):
|
||||
pass
|
||||
|
||||
def get_info(self, pkg: AppImage) -> dict:
|
||||
return pkg.get_data_to_cache()
|
||||
data = pkg.get_data_to_cache()
|
||||
|
||||
if data.get('url_download'):
|
||||
size = self.http_client.get_content_length(data['url_download'])
|
||||
if size:
|
||||
data['size'] = size
|
||||
|
||||
return data
|
||||
|
||||
def get_history(self, pkg: AppImage) -> PackageHistory:
|
||||
history = []
|
||||
|
||||
Reference in New Issue
Block a user