Fix #37: Downloaded art no longer displays in Steam.
Valve changed how Steam identifies art. Instead of hashing the exe and
name, it generates a shortcut id and stores it in shortcuts.vdf as
'appid'. Presumably this is so art is preserved when renaming shortcuts.
We can't wait for steam to populate the shortcut_id for our newly added
shortcuts, so instead we use the old method to generate a shortcut_id
and write it into the vdf. After removing other shortcuts and multiple
restarts of Steam, it seems that this method reliably and permanently
sets a shortcut id.
Also use the new name format for big picture art. It now matches the id
format of the others.
Test
Use steamsync to add 4 shortcuts from Xbox with art and they all show
up. Remove one from within Steam and restart. The other three still
have their art.
Use steamsync to add a bunch of epic and itchio shortcuts and their
art looks correct art except itchio ones using gifs (which aren't
supported by steam).
Also adds a --dump-shortcut-vdf argument which is helpful to debug this kind of issue.
Also handles "Win10" suffix on games when detecting appid. I was testing with Death's Door and it wasn't detected correctly.
Read and write shortcut ids to vdf
Fix #37: Downloaded art no longer displays in Steam.
Valve changed how Steam identifies art. Instead of hashing the exe and name, it generates a shortcut id and stores it in shortcuts.vdf as 'appid'. Presumably this is so art is preserved when renaming shortcuts.
We can't wait for steam to populate the shortcut_id for our newly added shortcuts, so instead we use the old method to generate a shortcut_id and write it into the vdf. After removing other shortcuts and multiple restarts of Steam, it seems that this method reliably and permanently sets a shortcut id.
Also use the new name format for big picture art. It now matches the id format of the others.
Test
Also adds a
--dump-shortcut-vdf
argument which is helpful to debug this kind of issue.Also handles "Win10" suffix on games when detecting appid. I was testing with Death's Door and it wasn't detected correctly.