bburky / playnite-non-steam-shortcuts

A Playnite extension to create non-Steam shortcuts
MIT License
38 stars 2 forks source link

Possible Encoding Error - Pursuant to Wolvenreign Reddit Thread #12

Open TRoehrman opened 4 years ago

TRoehrman commented 4 years ago

Wolvenreign here. Here is the shortcut.vdf you asked for earlier in relation to the possible encoding error. shortcuts.zip

bburky commented 4 years ago

Thanks I'll look at this soon.

Copying some notes from reddit. This shortcuts.vdf file has a game "Ghost Blade" that currently generates the incorrect Steam URL: steam://rungameid/14080141791307235328 . The correct URL is: steam://rungameid/13659626001531928576. The shortcut does launch correctly from Steam.

TRoehrman commented 4 years ago

Further mismatch notes...

Zero Ranger:

Desktop: steam://rungameid/13247910634105864192

Playnite: steam://rungameid/14656308299696177152

DoDonPachi Resurrection:

Desktop: steam://rungameid/14145719069969481728

Playnite: steam://rungameid/13738719104188022784

BLACK BIRD:

Desktop: steam://rungameid/11630964801324187648

Playnite: steam://rungameid/15877520862346215424

TRoehrman commented 4 years ago

Interestingly, it seems that it does create some shortcuts correctly, such as the ones for Blazing Star, VASARA Collection, and R-Type Dimensions EX.

bburky commented 4 years ago

It looks like you have some duplicate games in your shortcuts.vdf file. The following game names all appear multiple times. Honestly, I'm not sure how this didn't already break my extension, I checked for this already.

> Counter(s["appname"] for s in steam_shortcuts).most_common(6)
[(u'LAUNCHER_x64', 4),
 (u'game', 3),
 (u'raiden5_one', 2),
 (u'EdensAegis1.11', 2),
 (u'Dolphin', 2),
 (u'WOLFLAME', 2)]

All the LAUNCHER_x64 games look like they are different games. Do these games appear fine in Steam? Can you see them all in Steam?

>[s for s in steam_shortcuts if s["appname"] == "LAUNCHER_x64"]
[{u'allowdesktopconfig': 1,
  u'allowoverlay': 1,
  u'appname': u'LAUNCHER_x64',
  u'devkit': 0,
  u'devkitgameid': u'',
  u'exe': u'"D:\\Games\\The Dishwasher Vampire Smile\\LAUNCHER_x64.exe"',
  u'icon': u'',
  u'ishidden': 0,
  u'lastplaytime': 0,
  u'launchoptions': u'',
  u'openvr': 0,
  u'shortcutpath': u'',
  u'startdir': u'"D:\\Games\\The Dishwasher Vampire Smile\\"',
  u'tags': {}},
 {u'allowdesktopconfig': 1,
  u'allowoverlay': 1,
  u'appname': u'LAUNCHER_x64',
  u'devkit': 0,
  u'devkitgameid': u'',
  u'exe': u'"D:\\Games\\Subsurface Circular\\LAUNCHER_x64.exe"',
  u'icon': u'',
  u'ishidden': 0,
  u'lastplaytime': 0,
  u'launchoptions': u'',
  u'openvr': 0,
  u'shortcutpath': u'',
  u'startdir': u'"D:\\Games\\Subsurface Circular\\"',
  u'tags': {}},
 {u'allowdesktopconfig': 1,
  u'allowoverlay': 1,
  u'appname': u'LAUNCHER_x64',
  u'devkit': 0,
  u'devkitgameid': u'',
  u'exe': u'"D:\\Games\\Q-YO.Blaster\\Q-YO BLASTER\\LAUNCHER_x64.exe"',
  u'icon': u'',
  u'ishidden': 0,
  u'lastplaytime': 0,
  u'launchoptions': u'',
  u'openvr': 0,
  u'shortcutpath': u'',
  u'startdir': u'"D:\\Games\\Q-YO.Blaster\\Q-YO BLASTER\\"',
  u'tags': {}},
 {u'allowdesktopconfig': 1,
  u'allowoverlay': 1,
  u'appname': u'LAUNCHER_x64',
  u'devkit': 0,
  u'devkitgameid': u'',
  u'exe': u'"D:\\Games\\Monolith\\LAUNCHER_x64.exe"',
  u'icon': u'',
  u'ishidden': 0,
  u'lastplaytime': 0,
  u'launchoptions': u'',
  u'openvr': 0,
  u'shortcutpath': u'',
  u'startdir': u'"D:\\Games\\Monolith\\"',
  u'tags': {}}]
TRoehrman commented 4 years ago

They appear, though as separate LAUNCHER_x64 shortcuts.

bburky commented 4 years ago

I didn't realize you could have duplicate shortcuts like that, thanks I'll make sure I correctly support that.

TRoehrman commented 4 years ago

You're welcome, thank you for your hard work. If you need more reporting, let me know.

bburky commented 4 years ago

I'm very confused though, if I manually load your shortcuts.vdf file I am getting the correct URLs for all games. I can't reproduce your problem. Currently testing with command line IronPython, but the code should work the same as in Playnite.

>>> g = [s for s in shortcuts if s["appname"] == "GhostBlade"][0]
>>> nonsteam.steam_URL(g)
'steam://rungameid/13659626001531928576'

Can you please confirm you have the current version of this extension?

TRoehrman commented 4 years ago

Oh, one more piece of information: I don't actually have to use those LAUNCHER_x64 shortcuts. There are actual EXEs there that would be better to use, particularly for Playnite because of the automatic DB. Maybe make a one-time dialog message that says something like, "Using LAUNCHER_x64s? Naughty. Just use the actual EXE, it'll work and it's better for Playnite.". I really shouldn't be using those myself, I only used to think it was necessary when it really isn't.

I grabbed the latest version from GitHub only yesterday, but I will double check in case I'm misremembering that or something. Here we go...

Having replaced whatever version I was using previously with the latest that is uploaded to GitHub, the same results occur with the same games.

Edit: To be clear, I mean that I tried to generate a new shortcut.

DoDonPachi Resurrection:

Desktop: steam://rungameid/14145719069969481728

Playnite: steam://rungameid/13738719104188022784

Furthermore, after trying to launch it, the same phenomenon occurs.

Edit 2: Tried to create a Blood: Fresh Supply Steam Shortcut with the update-ensured extension. It didn't create one at all. Here's the Playnite Steam ID anyway: steam://rungameid/15591387083069980672

TRoehrman commented 4 years ago

There is something else interesting to note. Under my C:\Program Files (x86)\Steam\userdata\, there are, in fact, two separate folders. One is C:\Program Files (x86)\Steam\userdata\17663841 and the other is C:\Program Files (x86)\Steam\userdata\35530196. So far, I have used the 17663841 one.

bburky commented 4 years ago

I'll try to figure this out another day, out of time at the moment. Still pretty confused though.

There is something else interesting to note. Under my C:\Program Files (x86)\Steam\userdata\, there are, in fact, two separate folders. One is C:\Program Files (x86)\Steam\userdata\17663841 and the other is C:\Program Files (x86)\Steam\userdata\35530196. So far, I have used the 17663841 one.

This happens when multiple Steam users have logged into the same computer. You use whichever matches your profile. You're using the right one because at least some shortcuts are working.

TRoehrman commented 4 years ago

No worries, thanks again for your help and sorry for the trouble.