mirror of
https://github.com/lutris/lutris
synced 2024-09-15 22:09:55 +00:00
Try steam sync using 'BytesDownloaded' to detect install state
This commit is contained in:
parent
781514c8f3
commit
32572953bd
1
debian/changelog
vendored
1
debian/changelog
vendored
|
@ -16,6 +16,7 @@ lutris (0.3.6) trusty; urgency=medium
|
|||
- sdlmame and sdlmess runners renamed to mame and mess
|
||||
- "Prefix command" system option
|
||||
- Button to access runners folder in the Manage runners window
|
||||
- Manually re-synchronize from the menu: Lutris > Synchronize library
|
||||
|
||||
* Fixes:
|
||||
- Fixed inconsistent password field limit to 26 chars, raised to 1024.
|
||||
|
|
|
@ -8,7 +8,7 @@ from lutris.runners.steam import steam
|
|||
from lutris.runners.winesteam import winesteam
|
||||
from lutris.util import resources
|
||||
from lutris.util.log import logger
|
||||
from lutris.util.steam import get_path_from_appmanifest
|
||||
from lutris.util.steam import vdf_parse
|
||||
|
||||
|
||||
class Sync(object):
|
||||
|
@ -189,6 +189,13 @@ class Sync(object):
|
|||
logger.error("Invalid SteamID for %s", filename)
|
||||
continue
|
||||
|
||||
if get_path_from_appmanifest(dirname, steamid):
|
||||
appmanifest_path = os.path.join(
|
||||
dirname, "appmanifest_%s.acf" % str(steamid)
|
||||
)
|
||||
with open(appmanifest_path, "r") as appmanifest_file:
|
||||
appmanifest = vdf_parse(appmanifest_file, {})
|
||||
appstate = appmanifest.get('AppState') or {}
|
||||
is_installed = appstate.get('BytesDownloaded') or '0'
|
||||
if not is_installed == '0':
|
||||
installed.append(steamid)
|
||||
return installed
|
||||
|
|
Loading…
Reference in a new issue