Playnite Forums
GameActivity - Printable Version

+- Playnite Forums (https://playnite.link/forum)
+-- Forum: Extension Database (https://playnite.link/forum/forum-3.html)
+--- Forum: Generic Extensions (https://playnite.link/forum/forum-6.html)
+--- Thread: GameActivity (/thread-264.html)

Pages: 1 2 3 4 5 6 7 8


GameActivity - Lacro59 - 05-05-2020

Informations
The plugin can track gaming activities and displays lots of statistics about your activities.

With this plugin you can:
  • elapsed time by source by month and week and days
  • elapsed time by genre by month
  • date and elapsed time by game
  • details hardware usage by game with Performance Monitor and Open Hardware Monitor and MSI Afterburner or HWiNFO
  • defined limit usage for have message warnings after the game session and show it in the main view
 
If the theme support function, you can:
  • add plugin data in game list in "Details View" & "Grid View"
  • add plugin data in game details
[Image: main_01.jpg]  [Image: settings_01.jpg]  [Image: settings_02.jpg]  [Image: control_01.jpg]


Localization
The plugin is localized.
It's possible to translate the extension on crowdin


Custom theme integration
Addition in a custom theme


More information for the optionals applications here (thanks to sheepbeep)


Warnings
  • It's a beta version for the Playnite 9 beta.
  • Get sensors id and elements id with "HWiNFOSharedMemoryViewer".
  • The fps with HWiNFO is got with "rivatuner statistics server".
  • The average data is visible if "enable log" is checked.


More information on Wiki 
Lastest release


Changelog
v2.0.1
  • Playnite 9 beta version (not compatible with Playnite 8)
  • UI tweaks
  • Fixed many bugs
v2.0
  • Playnite 9 beta version (not compatible with Playnite 8)
  • Custom UI Elements for custom theme integration (see wiki on GitHub)
  • Fixed many bugs
  • New chart options
  • Added new options in plugin main view
v1.3
  • UI adjustments
  • Many optimizations
  • Added new filters
  • Many optimizations
v1.2.2
  • Many optimizations & crashes résolutions
v1.2.1
  • Integration UI optimizations
v1.2
  • Integration UI optimizations
  • Rewrite database
  • Many optimizations



RE: Dashboard for game activity - Crow - 05-05-2020

Very nice! I'm planning to add something similar to Playnite 8, but I have no idea how detailed it will be: https://github.com/JosefNemec/Playnite/issues/1346


RE: Dashboard for game activity - Lacro59 - 05-07-2020

(05-05-2020, 04:37 PM)Crow Wrote: Very nice! I'm planning to add something similar to Playnite 8, but I have no idea how detailed it will be: https://github.com/JosefNemec/Playnite/issues/1346

Great and thanks!


RE: Dashboard for game activity - darklinkpower - 05-07-2020

I'm getting this error with the 0.2 version when clicking "Dashboard"
"Can't find a part of the path..."
[Image: cWZtL3R.png]
In fact I don't have "library" directory inside the Playnite directory. Is it trying to reference the database location? Because mine is not at "library" so if it's a static path a dynamic path should be used instead.



RE: Dashboard for game activity - Crow - 05-08-2020

Looks like the extension is probably reading database files directly (which is a bad practice) instead of using API collections, and it has some parts of path hard coded. Otherwise I don't see how that kind of error could happen.


RE: Dashboard for game activity - Lacro59 - 05-08-2020

(05-08-2020, 06:54 AM)Crow Wrote: Looks like the extension is probably reading database files directly (which is a bad practice) instead of using API collections, and it has some parts of path hard coded. Otherwise I don't see how that kind of error could happen.

Yes, I took a shortchut to understand the sdk.
I'm working to have a good integration with application library.


RE: Dashboard for game activity - sheepbeep - 05-09-2020

Does not work with PlayNite 7.7; the extension is activated, but there is no menu item to access it.

2020-05-09 20:11:13.7735|ERROR:Failed to load plugin: Dashboard PluginSystem.IO.DirectoryNotFoundException: Could not find a part of the path 'D:\Client\PlayNite\7\Extensions\Dashboard\activity'.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileSystemEnumerableIterator`1.CommonInit()
   at System.IO.FileSystemEnumerableIterator`1..ctor(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler`1 resultHandler, Boolean checkHost)
   at System.IO.Directory.GetFiles(String path, String searchPattern)
   at Dashboard.Dashboard.transformOldData_v02a(String pathActivityDB, String pathActivityDetailsDB) in J:\Lacro59\PlaynitePlugins\Dashboard\Dashboard.cs:line 90
   at Dashboard.Dashboard..ctor(IPlayniteAPI api) in J:\Lacro59\PlaynitePlugins\Dashboard\Dashboard.cs:line 49

If you manually create the activity folder, it will run. Note that this folder should be ExtensionData\Dashboard\, not directly in the plugin folder.


RE: Dashboard for game activity - Crow - 05-09-2020

(05-09-2020, 06:16 PM)sheepbeep Wrote: Note that this folder should be ExtensionData\Dashboard\, not directly in the plugin folder.

Data generated by an extension should be stored in folder which GetPluginUserDataPath API method returns (which is "ExtensionData\plugin_id"), it shouldn't be manually hardcoded path unless you have some specific requirements.

In the end, it really doesn't matter where your store the data, but using "GetPluginUserDataPath" is preferred, because it stores that data in Playnite's user folder, making it easier for users to backup/move their installation.


RE: Dashboard for game activity - Lacro59 - 05-10-2020

(05-09-2020, 06:16 PM)sheepbeep Wrote: Does not work with PlayNite 7.7; the extension is activated, but there is no menu item to access it.

2020-05-09 20:11:13.7735|ERROR:Failed to load plugin: Dashboard PluginSystem.IO.DirectoryNotFoundException: Could not find a part of the path 'D:\Client\PlayNite\7\Extensions\Dashboard\activity'.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileSystemEnumerableIterator`1.CommonInit()
   at System.IO.FileSystemEnumerableIterator`1..ctor(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler`1 resultHandler, Boolean checkHost)
   at System.IO.Directory.GetFiles(String path, String searchPattern)
   at Dashboard.Dashboard.transformOldData_v02a(String pathActivityDB, String pathActivityDetailsDB) in J:\Lacro59\PlaynitePlugins\Dashboard\Dashboard.cs:line 90
   at Dashboard.Dashboard..ctor(IPlayniteAPI api) in J:\Lacro59\PlaynitePlugins\Dashboard\Dashboard.cs:line 49

If you manually create the activity folder, it will run. Note that this folder should be ExtensionData\Dashboard\, not directly in the plugin folder.

Thanks for this report.
I'm working to resolve this.


RE: Dashboard for game activity - Lacro59 - 05-10-2020

(05-09-2020, 06:16 PM)sheepbeep Wrote: Does not work with PlayNite 7.7; the extension is activated, but there is no menu item to access it.

2020-05-09 20:11:13.7735|ERROR:Failed to load plugin: Dashboard PluginSystem.IO.DirectoryNotFoundException: Could not find a part of the path 'D:\Client\PlayNite\7\Extensions\Dashboard\activity'.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileSystemEnumerableIterator`1.CommonInit()
   at System.IO.FileSystemEnumerableIterator`1..ctor(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler`1 resultHandler, Boolean checkHost)
   at System.IO.Directory.GetFiles(String path, String searchPattern)
   at Dashboard.Dashboard.transformOldData_v02a(String pathActivityDB, String pathActivityDetailsDB) in J:\Lacro59\PlaynitePlugins\Dashboard\Dashboard.cs:line 90
   at Dashboard.Dashboard..ctor(IPlayniteAPI api) in J:\Lacro59\PlaynitePlugins\Dashboard\Dashboard.cs:line 49

If you manually create the activity folder, it will run. Note that this folder should be ExtensionData\Dashboard\, not directly in the plugin folder.

The new version resolve this problem.


RE: Dashboard for game activity - darklinkpower - 05-11-2020

[Image: lSPpPH4.png]

It's still trying to reference the database path as a hardcoded path. The file exists, but it's not at "library/..." but at "database/..." in my case.

You need to use PlayniteApi.Database.DatabasePath or PlayniteApi.Database.GetFullFilePath(game.Icon) depending on what you want as per the GameDatabaseAPI here: https://playnite.link/docs/api/Playnite.SDK.IGameDatabaseAPI.html

I don't know how your plugin works but I think you should see too if your plugin works if your database location changes.


RE: Dashboard for game activity - Lacro59 - 05-11-2020

(05-11-2020, 12:27 AM)darklinkpower Wrote: [Image: lSPpPH4.png]

It's still trying to reference the database path as a hardcoded path. The file exists, but it's not at "library/..." but at "database/..." in my case.

You need to use PlayniteApi.Database.DatabasePath or PlayniteApi.Database.GetFullFilePath(game.Icon) depending on what you want as per the GameDatabaseAPI here: https://playnite.link/docs/api/Playnite.SDK.IGameDatabaseAPI.html

I don't know how your plugin works but I think you should see too if your plugin works if your database location changes.

Effectively, there are always a reference on "PlayniteApi.Paths.ConfigurationPath()".
I resolve this with 0.4.1a.
Thanks.


RE: Dashboard for game activity - sheepbeep - 05-13-2020

I have noticed several issues with this extensions:

Extension brute forces through library providers
if you have at any time (also before this was installed) enabled and disabled a library provider, this disabled provider will show up in the dashboard.

In my case, I had enabled GOG, itch.io, Steam, Twitch, Uplay and Amazon. Shortly afterwards, I removed / disabled the Amazon provider (it is more or less identical to Twitch).

The dashboard by itself displays:
itch.io, GOG, Steam, Amazon (should not be here), Twitch and "Playnite". UPlay is missing, as I don't have the Uplay client installed and PlayNite never did connect to it.

Anyway, it should not display Amazon, but display Uplay and take ONLY the ENABLED and PRESENT library providers for the dashboard.

Missing Data provided by library extensions
The dashboard does not display any data on imported playtime, if the library provider (like) Steam is configured to import (and overwrite PlayNite recordings) the playtime of said library provider.

Feature request: configurable time frame
The dashboard should be able on the right hand side to display the total hours by day / week / 1 month / quarter (3 months) / half a year / year via a drop down menu.

Feature request: export data to CSV
A simple button to export the current displayed (or all data) data into a CSV file.


RE: Dashboard for game activity - Lacro59 - 05-13-2020

sheepbeep Wrote:Extension brute forces through library providers
if you have at any time (also before this was installed) enabled and disabled a library provider, this disabled provider will show up in the dashboard.

In my case, I had enabled GOG, itch.io, Steam, Twitch, Uplay and Amazon. Shortly afterwards, I removed / disabled the Amazon provider (it is more or less identical to Twitch).

The dashboard by itself displays:
itch.io, GOG, Steam, Amazon (should not be here), Twitch and "Playnite". UPlay is missing, as I don't have the Uplay client installed and PlayNite never did connect to it.

Anyway, it should not display Amazon, but display Uplay and take ONLY the ENABLED and PRESENT library providers for the dashboard.

This is the case for the graphics "Total hours by weeks".
Progressively, the issue will resolve.


sheepbeep Wrote:Missing Data provided by library extensions
The dashboard does not display any data on imported playtime, if the library provider (like) Steam is configured to import (and overwrite PlayNite recordings) the playtime of said library provider.

Playnite saves only the last activity.
For moment, the plugin does't use this data (planned).
The activities story saves with my plugin and uses this.


sheepbeep Wrote:Feature request: configurable time frame
The dashboard should be able on the right hand side to display the total hours by day / week / 1 month / quarter  (3 months) / half a year / year via a drop down menu.

Feature request: export data to CSV
A simple button to export the current displayed (or all data) data into a CSV file.

I note this on my todo list.


Thanks for yours come-back.


RE: Dashboard for game activity - Lacro59 - 05-15-2020

I'm upload a new version : 0.5a


RE: Dashboard for game activity - LuigiVs - 05-15-2020

(05-15-2020, 01:42 PM)Lacro59 Wrote: I'm upload a new version : 0.5a

I keep getting a scripting error when I try to open it

"Value cannot be null.
Parameter name: path2"
[attachment=139]


RE: Dashboard for game activity - Lacro59 - 05-15-2020

(05-15-2020, 02:28 PM)LuigiVs Wrote:
(05-15-2020, 01:42 PM)Lacro59 Wrote: I'm upload a new version : 0.5a

I keep getting a scripting error when I try to open it

"Value cannot be null.
Parameter name: path2"

The new version must resolve this.


RE: GameActivity - Lacro59 - 05-26-2020

A new version is published.


RE: GameActivity - Blackinator - 05-29-2020

I'm sure I'm missing something, but apparently the "HWInfo Shared Memory Viewer" only exists in a plugin for Rainmeter. Does that mean we have to be using Rainmeter to access the viewer?


RE: GameActivity - darklinkpower - 05-29-2020

(05-29-2020, 09:28 PM)Blackinator Wrote: I'm sure I'm missing something, but apparently the "HWInfo Shared Memory Viewer" only exists in a plugin for Rainmeter. Does that mean we have to be using Rainmeter to access the viewer?
You only need it to grab the sensors id. After that, you only need to have HWInfo open for it to work.