Playnite Forums
  • Playnite Web
  • Rules
  • Members
  • Team
  • Search
  • Register
  • Login
  • Home
  • Members
  • Help
  • Search
Playnite Forums Extension Database Metadata Plugins Game Size Calculator

Game Size Calculator
gerren
Offline

#1
05-24-2020, 11:28 AM
Hi there,

I made a small Extension, that calculates game sizes. Since the author has his hands full, I made it myself, since I was in a need of it.

Official thread:
https://github.com/JosefNemec/Playnite/issues/167

Extension GitHub
https://github.com/Gerren/SizeCalculator

To anyone brave enough to use it - have fun Smile
darklinkpower
Offline

Super Moderator
#2
05-24-2020, 01:03 PM (This post was last modified: 05-24-2020, 01:04 PM by darklinkpower.)
Thanks for the extension: Some issues I found/ideas:

1. Would it be possible to calculate "Size on disk". If you use something like compact, the sizes can be very different to what it's really using and defeating the purpose of the information. Just one example of this:

[Image: oaBD7uA.png]
2. Would you consider rounding in ".5"? A lot of games, particularly indie games are being shown as 000gb. It shouldn't matter a lot for bigger AAA games but for smaller ones those 0.5 gb can be a big difference.

[Image: NgHSwdF.png]

[Image: 1W8hALm.png]

This one shows as 000 too:

[Image: lMndZrb.png]

3. I first thought that results would be saved exactly. I see it's being rounded so I think it would be better to add the "~" suffix to indicate that it's around the given number and not exact. Having just the number. For example: "024~ GB", "003~ GB", etc.

Another idea would be using ranges instead of trying to be using semi-exact sizes. I would go using: "000 - 000.5 GB", "000.51 - 001 GB" (this should help for smaller indie games), "001 - 001.99 GB", "001 - 001.99 GB","002 - 002.99 GB", etc.

4. The generated data in the Age rating field is lost upon restart. Is the data being stored?
gerren
Offline

#3
05-24-2020, 04:47 PM (This post was last modified: 05-24-2020, 04:57 PM by gerren. Edit Reason: Size on disk commentary )
Hello there,

thanks for the feedback.

Size on disk
I've never seen anyone using this feature for games. It must slow everything down, doesn't it? The measurements are returned by internal .NET library, and seems to be a real hustle to get the compressed size. Some funky Windows business. I'll look into it anyway. I'll add it to known issues for now.

And from cursory research, it is bound to be imprecise, due to many reasons: compression, many small files taking up NTFS clusters, possibly many more

<1GB sizes
Firstly, the rounding is documented on GithHub. For the purpose of disk cleaning, these often do not matter that much. This is not disk tool after all. If you want to download the Divison 2 with the whopping 63 GB, no amount of 0,3 GB games is going to save you.

Loosing data after restart
This must be a thing of importing of the data from the library. Nothing I could fix. Ond the other hand, disk cleaning comes only in times of need, in that case there is a great probability, that you've installed new games, and you'd recalculate the sizes anyway. Also most of the newer games would get patches, DLCs and so on. If you'd want your library sorted by size, I'm sorry. Another thing for known issues.
darklinkpower
Offline

Super Moderator
#4
05-24-2020, 05:25 PM
Compact and it's compression algorithms have been popularized recently thanks to tools like CompactGUI and Compactor and it's much better than the simple NTFS disk compression.
I suggest you read their readme for more information, the performance impact is negligible or near non existent maybe except the heavier algorithms like LZX and X16K.

Taken from CompactGUI readme:

[Image: 68747470733a2f2f692e696d6775722e636f6d2f...312e706e67]


I think you should mention that your extension is intended as a disk cleaning tool, since I thought it was intended as a general metadata informatio. For example, some people just want to know the size of games just for information and not for removing purposes.

For the last issue, the cause must be that the data is not being updated in the database, that's why changes are lost upon restart
https://playnite.link/docs/tutorials/scr...-game-data
gerren
Offline

#5
05-26-2020, 05:38 PM
(05-24-2020, 05:25 PM)darklinkpower Wrote: Compact and it's compression algorithms have been popularized recently thanks to tools like CompactGUI and Compactor and it's much better than the simple NTFS disk compression.
I suggest you read their readme for more information, the performance impact is negligible or near non existent maybe except the heavier algorithms like LZX and X16K.

Taken from CompactGUI readme:


I think you should mention that your extension is intended as a disk cleaning tool, since I thought it was intended as a general metadata informatio. For example, some people just want to know the size of games just for information and not for removing purposes.

For the last issue, the cause must be that the data is not being updated in the database, that's why changes are lost upon restart
https://playnite.link/docs/tutorials/scr...-game-data

Hi darklinkpower,

I've looked into your requests, and decided to implement them. New version is able to set precison/rounding and to compute "Size on Disk". I should warn you, Size on Disk is not very fast, said mildly.

And you've been right, the data was indeed not saved into the database. This error has been corrected.
darklinkpower
Offline

Super Moderator
#6
05-29-2020, 02:52 PM (This post was last modified: 05-30-2020, 06:53 PM by darklinkpower.)
Thanks for the update. I can confirm that data is preserved upon restart with the new version.

It's still not calculating size on disk for me, is this normal?

[Image: 6H0dmSC.png]

EDIT: I just saw that it was implemented as an option, it's working great!
[Image: ArAkhxg.png]

question: If I run the extension again will it calculate the size just for games with missing size info or will it calculate every game again?
L0RD-SiLVER
Offline

#7
05-29-2020, 02:54 PM (This post was last modified: 05-29-2020, 02:58 PM by L0RD-SiLVER.)
@gerren is there any way to update it to show only the number in there, without extra zeros? For instance, if the game is 18GB, show 18 instead of 018.

I found one game where this is not working, not sure why. That game is Valorant that's added manually. It shows 000 for it (the game has 7.35 GB).

And one more question, do you think is there any way that you can make it run automatically once in a while (for instance after all the libraries are reimported... or once a day, or after 1 minute the app is opened)?
darklinkpower
Offline

Super Moderator
#8
05-29-2020, 10:48 PM (This post was last modified: 05-31-2020, 08:48 PM by darklinkpower.)
I just noticed there's an issue with emulated games, it's calculating the entire directory instead of the rom/image file so either they should be skipped or calculate just the single file.

[Image: zWXrCJA.png]

Another issue is that it appears in the tray right click clients submenu:

[Image: 2GIMPNQ.png]
gerren
Offline

#9
06-03-2020, 06:00 AM
@Darklinkpower,
Check setting menu under libraries
Checkbox "Size on Disk" - you found it then.

It recalculates all games marked as installed. This could be an option though, if this feature was asked for.

Emulated games:
This extension takes "Installation directory". If you have it filled in with the path to your ROM "library", then it calculates whole directory. I could manage to set it up, so when the "rom" is filled in, then it ignores "installation directory" and takes the rom file only. Would this solution suffice?

Well, this extension is based on the "library" template. It provides the setting page. I could rewrite it to a "general" plugin, which wouldn't include it to the libraries list. But I would need to find another place where to put the settings. I will consider it.

@L0RD-SiLVER
Check setting menu under libraries
Checkbox "Size on Disk"
Input "Valid decimals" - set to 0 for no leading zeros.

Valorant:
Do you have correct path to the installation directory, is it correct? Do you use symlinks or junctions?

Auto-run: I would advise against it. It could be resource heavy, and could cause a freeze of the Playnite. Plus the game size does not change very often.
L0RD-SiLVER
Offline

#10
06-03-2020, 03:50 PM
@gerren it's working. If I check that "size on disk" the app become unresponsive (it says "not responding") for a while (around 1-2 minutes) and I should not touch anything in this time and some games are displaying wrong size (for instance: https://i.imgur.com/BfZX18e.png ). After like 2 minutes the sizes are calculated and it doesn't say not responding anymore. Without that checked it's way faster / without "not responding" error and game size seems ok.

Is there any way to have only two decimals, now there are a lot in there. An example: https://i.imgur.com/GCJ541j.png should show only 8,41 GB.
gerren
Offline

#11
06-05-2020, 09:26 AM
@L0RD-SiLVER
Sorry, the Size on Disk option was originally not meant for you. Don't use it, if you don't need it. The "Not responding" is a known issue, and is properly mentioned on the GitHub page.

Could you send me a screenshot of the setting page? It should look like "Valid decimals: 0" (or 1 could also work) "Round: 2".

The Fortnite problem - could you provide as screenshot of the installation folder properties?
darklinkpower
Offline

Super Moderator
#12
06-05-2020, 01:20 PM
I opened some issues in Github for the issues I mentioned.
gerren
Offline

#13
06-05-2020, 04:05 PM
Hi there,

there is now Version 1.2 available. This resolves the Emulated games issue, the showing amongst libraries and adds a new command to calculate only games without size already calculated.

In case of options not available, just delete the file in following folder:
%appdata%\Playnite\ExtensionsData\85dd7072-2f20-4e76-a007-41035e390724

Seems to be a result of changing the type of extension, while leaving the same ID, I guess...?
darklinkpower
Offline

Super Moderator
#14
06-05-2020, 07:57 PM
Just updated to v1.2 and it's showing correctly both options in the submenu after installing it by replacing the file, in case it matters I'm using a portable installation. It's working great, thanks for the update!
Gogoroth
Offline

#15
06-06-2020, 05:56 PM
I'm new to PlayNite extensions so please bear with me if my questions are ignorant.

Am I understanding correctly that this extension will not work at all with 7.7 and I will need to downgrade if I want to use this?

This extension does not show up in the Extensions tab. It shows up in the Settings/Extensions tab, but not the main Extensions tab.

There are also no settings listed for this extension, just Enable/Disable. I know this thread mentioned a Settings/Plugins tab, but I don't see one.
L0RD-SiLVER
Offline

#16
06-06-2020, 06:30 PM
@gerren:

Fortnite folder: https://i.imgur.com/Yvjjtrp.png

Settings page: https://i.imgur.com/1l5U10e.png
I've added what you said, valid decimals 1 (to show 0,xx when the game is smaller than 1 GB) and round 2. Now it seems it is showing correctly like this: X,YY.

Regarding what you said about performance, yes, that might be a problem but you can add it as a checkbox, not force this thing. "Autorun after everything is imported". So, if that auto-importing on launch is active, it will run after all the imports are done. From my testing, if "Size on disk" is not selected, it runs pretty fast, like a few seconds.
gerren
Offline

#17
06-06-2020, 06:37 PM (This post was last modified: 06-06-2020, 06:41 PM by gerren.)
Hi Gogoroth,

I understand, that you do not see the Commands/Actions in the main Playnite dropdown, menu Extensions. Is it correct?

Mind, the settings are located in Plugins/SizeCalculator, at the bottom.

It should work fine with Playnite 7.7. You should see following:


   
   
   

I might need to test on new instance of the Playnite, where the Extension is installed for the first time...?

@L0RD-SiLVER

I would need the Properties. Right-click the Fortnite folder, select Properties. There should be the correct Size shown. Could you please screenshot this Properties window? Then I could look into it.

I'm glad the rounding works as intended. AND that you find the size calculation relatively fast.
Gogoroth
Offline

#18
06-07-2020, 06:11 AM (This post was last modified: 06-07-2020, 06:27 AM by Gogoroth.)
Here's what I see
[Image: Bsw8txT.jpg]It's listed twice because I put it in AppData/Local/Playnite/Extensions and AppData/Roaming/Playnite/Extensions just to see if it made a difference. As you can see there's no plugin tab. Similarly, the man Extensions tab just has the Reload Scripts and Export Library options.

Nevermind. I downloaded SizeCalculatormaster.zip before and now I have SizeCalculator.zip and it works perfectly. I don't know what the difference is. I hit the download link again and it's a different name and content and now everything works. Not sure what I clicked before.
Thanks for the extension!
gerren
Offline

#19
06-07-2020, 06:36 AM (This post was last modified: 06-07-2020, 06:37 AM by gerren.)
@Gogoroth,

The Installation path should look something like so:

   

I see, you did download the whole repository (the source code), not the compiled extension. That's definitely it.

I'm glad it works now.
darklinkpower
Offline

Super Moderator
#20
06-07-2020, 01:39 PM
I think it would be a good idea to pack the extension with Playnite's extension packager to prevent issues like this and make installation easier.
« Next Oldest | Next Newest »
Pages (2): 1 2 Next »



  • View a Printable Version
  • Subscribe to this thread

© Designed by D&D - Powered by MyBB

Linear Mode
Threaded Mode