Skip to content

Commit

Permalink
Make caching optional
Browse files Browse the repository at this point in the history
  • Loading branch information
manuelseeger committed Jan 12, 2025
1 parent ada6cd6 commit 1216238
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 0 additions & 3 deletions config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,6 @@ rating_delta_max: 500
# maximum time since last played game to consider opponent for barcode unmasking in seconds
last_played_ago_max: 2400

# where to cache bnet files
bnet_cache_dir: obs/bnet_cache

# Current ladder season
season: 61
# Maps in the current ladder pool
Expand Down
3 changes: 3 additions & 0 deletions obs_tools/battlenet.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,9 @@ def get_portrait(self, profile: BattlenetProfile) -> bytes | None:
)
return

if config.bnet_cache_dir is None:
return r.content

# write to cache dir
cache_path.parent.mkdir(parents=True, exist_ok=True)
cache_path.write_bytes(r.content)
Expand Down

0 comments on commit 1216238

Please sign in to comment.