Skip to content

Commit 1807e44

Browse files
committed
fix caching playtime issue
1 parent cbe8597 commit 1807e44

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "vapor-steam"
3-
version = "1.5.2"
3+
version = "1.5.3"
44
description = "TUI program to check the ProtonDB compatibility of all the games of a Steam user."
55
authors = ["TabulateJarl8 <tabulatejarl8@gmail.com>"]
66
license = "GPLv3"

tests/test_cache.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ def test_update_cache(cache, cache_data):
139139
updated_data = json.loads(f.read())
140140
assert '654321' in updated_data['game_cache']
141141
assert '987654' in updated_data['anticheat_cache']['data']
142+
assert 'playtime' not in updated_data['game_cache']['654321']
142143
assert (
143144
updated_data['game_cache']['483']['timestamp']
144145
== cache_data['game_cache']['483']['timestamp']

tests/test_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def __exit__(self, *_):
3232
@pytest.fixture
3333
def config():
3434
cfg = Config()
35-
cfg._config_path = InMemoryPath()
35+
cfg._config_path = InMemoryPath() # type: ignore
3636
return cfg
3737

3838

vapor/cache_handler.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ def _serialize_game_data(self) -> dict:
3636
app_id: {
3737
'name': game[0].name,
3838
'rating': game[0].rating,
39-
'playtime': game[0].playtime,
4039
'timestamp': game[1],
4140
}
4241
for app_id, game in self._games_data.items()
@@ -119,7 +118,7 @@ def load_cache(self, prune=True) -> Self:
119118
Game(
120119
game_cache['name'],
121120
rating=game_cache['rating'],
122-
playtime=game_cache['playtime'],
121+
playtime=0,
123122
app_id=app_id,
124123
),
125124
game_cache['timestamp'],

vapor/data_structures.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
'Broken': 'dark_orange3',
2424
'Planned': 'purple',
2525
'Running': 'blue',
26-
'Supported': 'green',
26+
'Supported': '#02b302',
2727
'': '',
2828
}
2929

@@ -101,5 +101,5 @@ class SteamUserData(NamedTuple):
101101
'silver': ProtonDBRating(weight=3, color='#A6A6A6'),
102102
'gold': ProtonDBRating(weight=4, color='#CFB53B'),
103103
'platinum': ProtonDBRating(weight=5, color='#B4C7DC'),
104-
'native': ProtonDBRating(weight=6, color='green'),
104+
'native': ProtonDBRating(weight=6, color='#02b302'),
105105
}

0 commit comments

Comments
 (0)