Skip to content

Commit 631d81c

Browse files
committed
Revert to 04fd42c
1 parent cc450e3 commit 631d81c

File tree

2 files changed

+5
-18
lines changed

2 files changed

+5
-18
lines changed

plugin/library.py

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,6 @@
1212

1313
log = logging.getLogger(__name__)
1414

15-
ASSETS = [
16-
'header',
17-
'library_600x900',
18-
'library_hero',
19-
'library_hero_blur',
20-
'logo'
21-
]
22-
2315

2416
@dataclass
2517
class Library:
@@ -102,12 +94,6 @@ def __init__(self, name: str, path: Union[str, Path], image_dir: LibraryImageDir
10294
self._id = id
10395
self._image_id = self.id
10496

105-
def _get_hashed_icon(self) -> Optional[Path]:
106-
asset_path = Path(self.image_dir).joinpath(self.id)
107-
for asset in asset_path.iterdir():
108-
if asset.stem not in ASSETS:
109-
return asset
110-
11197
@property
11298
def id(self):
11399
"""
@@ -127,6 +113,7 @@ def launch(self) -> None:
127113
"""
128114
Launch this Steam library item.
129115
"""
116+
from steam import Steam
130117
webbrowser.open(self.uri())
131118

132119
def get_image(self, type: str, sep='_') -> Path:
@@ -137,11 +124,11 @@ def get_image(self, type: str, sep='_') -> Path:
137124
return self.image_dir.get_image(id, type, sep)
138125

139126
@cached_property
140-
def icon(self) -> Optional[Path]:
127+
def icon(self) -> Path:
141128
"""
142129
Return the icon for this library item.
143130
"""
144-
return self._get_hashed_icon()
131+
return self.get_image('icon') or Path(self.unquoted_path())
145132

146133
@cached_property
147134
def hero(self) -> Path:

plugin/steam.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from pathlib import Path
22
import logging
3-
#import winreg as reg
4-
#from winreg import HKEY_CURRENT_USER, HKEY_LOCAL_MACHINE
3+
import winreg as reg
4+
from winreg import HKEY_CURRENT_USER, HKEY_LOCAL_MACHINE
55
from typing import Union
66

77
from .vdfs import VDF

0 commit comments

Comments
 (0)