dmadisetti / steam-tui

Rust TUI client for steamcmd
MIT License
858 stars 17 forks source link

[Feature Request] Hide games #34

Closed Spagett1 closed 2 years ago

Spagett1 commented 2 years ago

Inside of steam-tui it shows up games which i dont own, image This is the gameslist on steam-tui ^^ and this is my normal steam library vv image i've made sure that the games arn't hidden or anything, i realise that you've sorta left this project alone so i understand if you don't put in the time to fix it but just thought id let you know.

dmadisetti commented 2 years ago

Yeahhh! Those are actually free games. I noticed the same thing, but you can actually play them. There's a flag that marks them as "free". But I thought it was almost more of a feature than a bug

Spagett1 commented 2 years ago

Lol, it would be really cool if there where a way to hide games, i might take a look at the source code and see if i can add a feature like that (ive been learning rust recently but not sure how hard it would be since ive never used rust-tui before)

dmadisetti commented 2 years ago

Yeah, you wouldn't have to change the tui code. Youd just need to mark the game as "Default" or something when parsing the response from steam cmd:

https://github.com/dmadisetti/steam-tui/blob/fe535c9e25bea6224bef78011cb68ffde440717d/src/interface.rs#L163

You can do a eprintln on map to see if the identifying "free" information.

Then to make the game visible, we'd change the definition of is_valid:

https://github.com/dmadisetti/steam-tui/blob/fe535c9e25bea6224bef78011cb68ffde440717d/src/interface.rs#L194

This goes somewhat closely with changes needed for https://github.com/dmadisetti/steam-tui/issues/11

dmadisetti commented 2 years ago

@Laar3 related: https://github.com/dmadisetti/steam-tui/pull/35

I like your keybind idea and storing ids in the config.

Spagett1 commented 2 years ago

Yeah, you wouldn't have to change the tui code. Youd just need to mark the game as "Default" or something when parsing the response from steam cmd:

https://github.com/dmadisetti/steam-tui/blob/fe535c9e25bea6224bef78011cb68ffde440717d/src/interface.rs#L163

You can do a eprintln on map to see if the identifying "free" information.

Then to make the game visible, we'd change the definition of is_valid:

https://github.com/dmadisetti/steam-tui/blob/fe535c9e25bea6224bef78011cb68ffde440717d/src/interface.rs#L194

This goes somewhat closely with changes needed for #11

Oh cool, i've managed to remove it from the left list via filtering it out of the games_list variable in the tui code but that had wasn't removing it from the right view pane (they where desyncing so youd have one game "selected" but not really, i'm not sure what variable/vector i would have to filter it out of for it to not appear in the right list.

Spagett1 commented 2 years ago

As for pull #35 if it where me doing it yeah id probably have an installed thing in the config file and store the gameid's of installed ones in there however caching does work too.