mtkennerly / ludusavi-playnite

Playnite plugin for save backups via Ludusavi
MIT License
155 stars 10 forks source link

Improvements for Steam library and PC platform matching #35

Closed darklinkpower closed 2 years ago

darklinkpower commented 2 years ago

https://github.com/mtkennerly/ludusavi-playnite/blob/a19ac1dc0490d150bb1d9634eeec304264a6d64a/src/LudusaviPlaynite.cs#L557-L565

Some suggestions:

mtkennerly commented 2 years ago

Thanks for this!

Source field can be changed by the user, I recommend instead to use the PluginId field

Sounds good. I'll probably check both so that it can handle any Steam games that were manually added.

There have been weird cases where some users, for some reason, don't have the pc_windows specification Id in platforms.

Oh, weird. Any idea what causes that?

My suggestion is to also check for the platform name and also check in all platform items in the list, as Platforms can have multiple platforms

I can definitely add the name checks, but IsOnPc only checks the first platform because the plugin actually skips games with multiple platforms:

https://github.com/mtkennerly/ludusavi-playnite/blob/a19ac1dc0490d150bb1d9634eeec304264a6d64a/src/LudusaviPlaynite.cs#L540-L543

The reason is that the plugin makes a strict distinction between PC and non-PC, and it's not clear which way to interpret a game with multiple platforms, although it should probably be a bit smarter about cases like "PC (Windows)" + "PC (Linux)".