lutris / agora

Public discussion space for the community
11 stars 0 forks source link

[Feature Request] How to completely delete a game in lutris 0.5.8.1? #25

Open SwimmingTiger opened 3 years ago

SwimmingTiger commented 3 years ago

I noticed that there is no delete function in Lutris 0.5.8.1, only hide.

However, the application can add any number of custom games, and the same game can be installed multiple times. So hiding could not meet my needs. I want a real delete function just like what we have in 0.5.7.1.

If the game I added randomly for testing cannot be deleted, I will not be happy.

lutris_20201129162350

strycore commented 3 years ago

it's not really possible to completely delete a game from the database in the current version. But also, you shouldn't get duplicates like that so there seems to be a bug in the game matching code. When reinstalling, it should reuse your uninstalled game. We don't delete games so that we don't lose play time if someone uninstalls then reinstalls a game. We'll be able to remove this behavior once we sync play time to the website.

SwimmingTiger commented 3 years ago

I just want to say: Don't make decisions for the user.

Even Steam has an option to completely delete a game.

Users have too many reasons to add games repeatedly, or need to delete a "game" completely:

A User has the right to choose to give up what they own. Software should respect these rights of a user.

If the software really does not give the user this right, the only thing we can do is to completely remove the lutris game database: lose all the games, just to delete one of them. I hope that things will not turn out to be this way.

If the decision is irreversible, it will be the beginning of the repository fork. Because I obviously want to delete the games I added for testing purposes. And I also have the ability to return the delete function back.

SwimmingTiger commented 3 years ago

We'll be able to remove this behavior once we sync play time to the website.

So will we have the delete function again? This is great.

Add one point: A better design is to allow users to delete games, but save the game time of each slug in a separate table. As long as users can't see the game icon, they won't be upset about it. And there is actually no burden to have an extra row in the database.

SwimmingTiger commented 3 years ago

And I need to clarify: I installed three Uplay through the "install different versions" option. I did this deliberately just to show the need to delete the game completely.

This is not "a bug in the game matching code".

strycore commented 3 years ago

There is nothing to worry about, there are no plans to prevent users from deleting games and I understand that it's a needed feature. The only thing that is kept by lutris is a row in the database containing the name and other info like the playtime. I uninstalled then reinstalled EGS and I was glad that my playtime was kept. I'm glad that there is no bug in the game matching because I have tested that (Just said, with EGS). What I plan to do it to have the game deleted if no playtime is recorded because that pretty much the only thing we care for right now. Then, also add a command line flag like lutris --clear-uninstalled to erase all uninstalled games from the database whether they have playtime or not.

Mind you that this stops being a problem the moment we have upwards sync with the lutris website. When we can sync playtime to lutris.net, then it will be backed up on your lutris.net account so we can always safely delete games from the database. Those who are not connected to a lutris.net account will just lose playtime between installs.

strycore commented 3 years ago

If there is an urgent need to delete a game and since the current release doesn't allow it, my recommended method is to directly edit the database with a GUI tool like sqlitebrower:

cd ~/.local/share/lutris/
sqlitebrowser pga.db

Then go to browse data, select games table, use filters to find the game you want to delete and right click on the row number to select "Delete record". Then click "Write changes".

strycore commented 3 years ago

Add one point: A better design is to allow users to delete games, but save the game time of each slug in a separate table. As long as users can't see the game icon, they won't be upset about it. And there is actually no burden to have an extra row in the database.

That's also an option. There is a PR that's related to playtime that add game sessions. If we can somehow keep game sessions and delete the game record, that would be perfect.