Steam: imported games with no known build update only when launched

An added game the account owns is linked into Steam as DroidDeck-<appid>.
When the folder carries no Steam build, Steam marks it Update Required and
checks every file before updating. That check reads the whole game, and an
interrupted one starts over, so on an SD card it ran again in every session
and kept the card busy: Lords of the Fallen (33 GB) restarted 51 times in a
day on an AYANEO Pocket FIT Elite.

The manifest for such an import now asks Steam to update the game when it
is launched. Imports that Steam already rewrote, but whose update has not
started, switch from "always keep updated" to "update when launched"; a
priority of 2, an update in progress, or an import with a recorded build is
left alone.
This commit is contained in:
K11MCH1 authored and Kurt Himebauch committed 2026-11-05 13:59:44 -05:00
1 parent ccab14384d
commit 1ec1c20be1
2 files changed
+69 -8

No files matched your search

+47 -1
View File
@@ -101,7 +101,8 @@ class ImportsTest(unittest.TestCase):
imports.route(self.steam, self.acct, [self.game])
path = self.steam / 'steamapps/appmanifest_42.acf'
current = path.read_text()
legacy = current.replace(' "Universe" "1"\n', '').replace('"StateFlags" "4"', '"StateFlags" "2"')
legacy = (current.replace(' "AutoUpdateBehavior" "1"\n', '').replace(' "Universe" "1"\n', '')
.replace('"StateFlags" "4"', '"StateFlags" "2"'))
path.write_text(legacy)
imports.route(self.steam, self.acct, [self.game])
self.assertEqual(current, path.read_text())
@@ -300,6 +301,51 @@ class ImportsTest(unittest.TestCase):
imports.route(self.steam, self.acct, [self.game])
self.assertIn('"buildid"\t\t"7"', path.read_text())
def test_import_without_a_build_updates_only_when_launched(self):
self.snapshot()
imports.route(self.steam, self.acct, [self.game])
path = self.steam / 'steamapps/appmanifest_42.acf'
current = path.read_text()
self.assertIn(' "AutoUpdateBehavior" "1"\n', current)
path.write_text(current.replace(' "AutoUpdateBehavior" "1"\n', ''))
imports.route(self.steam, self.acct, [self.game])
self.assertEqual(current, path.read_text())
def queued_bare_install(self, extra):
self.snapshot()
imports.route(self.steam, self.acct, [self.game])
path = self.steam / 'steamapps/appmanifest_42.acf'
path.write_text('"AppState"\n{\n\t"appid"\t\t"42"\n\t"StateFlags"\t\t"6"\n\t"installdir"\t\t"DroidDeck-42"\n'
'\t"buildid"\t\t"0"\n\t"TargetBuildID"\t\t"9"\n%s\t"InstalledDepots"\n\t{\n\t}\n'
'\t"UserConfig"\n\t{\n\t}\n}\n' % extra)
return path
def test_queued_import_without_a_build_waits_for_a_launch(self):
path = self.queued_bare_install('\t"AutoUpdateBehavior"\t\t"0"\n')
before = path.read_text()
imports.route(self.steam, self.acct, [self.game])
self.assertEqual(before.replace('"AutoUpdateBehavior"\t\t"0"', '"AutoUpdateBehavior"\t\t"1"'), path.read_text())
path = self.queued_bare_install('')
before = path.read_text()
imports.route(self.steam, self.acct, [self.game])
self.assertEqual(before[:-2] + '\t"AutoUpdateBehavior"\t\t"1"\n}\n', path.read_text())
def test_queued_import_keeps_a_chosen_update_priority(self):
path = self.queued_bare_install('\t"AutoUpdateBehavior"\t\t"2"\n')
before = path.read_text()
imports.route(self.steam, self.acct, [self.game])
self.assertEqual(before, path.read_text())
def test_started_import_without_a_build_is_left_to_steam(self):
for extra, staging in [('\t"BytesDownloaded"\t\t"5"\n\t"AutoUpdateBehavior"\t\t"0"\n', False),
('\t"AutoUpdateBehavior"\t\t"0"\n', True)]:
path = self.queued_bare_install(extra)
if staging:
(self.steam / 'steamapps/downloading/42').mkdir(parents=True)
before = path.read_text()
imports.route(self.steam, self.acct, [self.game])
self.assertEqual(before, path.read_text())
def test_started_fresh_install_is_left_to_steam(self):
for downloaded, staging in [('5', False), ('0', True)]:
path = self.steam_fresh_install(downloaded)