Kapiainen / Lauhdutin

A Rainmeter skin for launching games.
MIT License
67 stars 8 forks source link

Twitch games support [WIP] #145

Closed BanCrash closed 3 years ago

BanCrash commented 6 years ago

DONE:

ORIGINAL COMMENT:

Hello! I made an investigation and I think games from Twitch store could be fully supported.

image image image

image

However, I think it's better to let the user choose games installation folder/s as on blizzard Battle.net, to avoid issues that could arise.

image image image image

So is easily to know which owned games are installed.

image image

image image

And if you use that command with an uninstalled game, you will get this popup: image

Translation: "Game is not installed. Would you like to install it now?"

In resume, sqlite3 could get ProductIdStr, ProductTitle, and Background2 from DbSet on C:\Users\User\AppData\Roaming\Twitch\Games\Sql\GameProductInfo.sqlite, then will check folders placed on games installation folder to see which games are installed, and then games would be launched or installed with twitch://fuel-launch/ProductIdStr.

EDIT; After more research, I found another sql file (C:\ProgramData\Twitch\Games\Sql\GameInstallInfo.sqlite) that has only installed games. Has also previous installed games, but with field "Installed" with 0 instead 1. So will be better than check folders to see if they're installed.

image

Kapiainen commented 6 years ago

I'm probably not going to implement and maintain support for it for a few reasons: 1) Several games available via the service require Steam anyway. 2) I have not been able to find a free game that I could use to generate the database and test it. 3) Amazon's presence in my country is limited, which means that some regional restrictions apply, and I don't have an account.

Feel free to implement it yourself, but I'm reluctant to do it since I don't use it myself and would be unable to properly maintain support for it.

BanCrash commented 6 years ago

I understand why you're reluctant. I will try to implement to see if I can make it work.

For now I will let this closed until I know if I'm capable to do so.

BanCrash commented 6 years ago

I'm working on this and I have a doubt about the actual code. I'm using gog galaxy code as basis, and I found that on function OnDumpedDBs there is a call to: cachePath = STATE.PLATFORM_QUEUE[1]\getCachePath().

I see the gog galaxy platform file, but in the actual development3 version there isn't any function named "getCachePath()". However, in the master version yes there is. That function was moved to other part? I can't find it.

Kapiainen commented 6 years ago

The definition for that method can be found here in the Platform class that all platforms extend.

BanCrash commented 6 years ago

Ah, perfect then, thanks you!

BanCrash commented 6 years ago

I have to polish things and fix stuff, but right now uninstalled games are detected and have their banners dowloaded:

image

I see on your TODO list that you are making a refactor, so I will wait until that is done to make this PR for adapt the code to that refactor.