Commit Graph

22 Commits

Author SHA1 Message Date
mollusk 55c88ecd1f Add store-tag filter alongside genre filter
Steam's official genres list is coarse (~12 entries) and doesn't include
community-relevant categories like Roguelike, Soulslike, or Metroidvania —
those live in Steam's store tags. This adds a second combo box that filters
by store tag, AND'd with the genre filter.

Tag IDs in appinfo.vdf are translated via Steam's IStoreService/GetTagList
endpoint (~450 entries, fetched once on first use, cached at
~/.cache/steam-dice/tags.json). The genre cache file is replaced by
~/.cache/steam-dice/taxonomy.json, which stores both genres and tags per
appid as {"genres": [...], "tags": [...]}; the old genres.json is left in
place as harmless orphan data. Cache merge logic preserves non-empty
fields per appid so the API-fallback genre fetcher doesn't clobber tags
populated from appinfo.vdf.

Tags are appinfo.vdf-only — Steam's appdetails endpoint doesn't return
store_tags, so there's no API fallback. Without python-steam, the tag
combo stays empty and a tooltip-style dialog explains why.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-08 15:55:18 -04:00
mollusk 77af32081d Merge branch 'feature/genre-filter'
Adds genre/category filter dropdown. Reads from Steam's local
appinfo.vdf for instant population, with rate-limited appdetails API
as fallback when local data is unavailable.
2026-05-08 15:31:29 -04:00
mollusk b5dc6fb547 Fix genre cache merge race when API thread runs alongside main thread
_save_genre_cache now reads the on-disk state and merges before writing,
so a concurrent writer can't shrink the cache. Likewise the API thread's
progress/done handlers now `update()` the in-memory cache instead of
replacing it wholesale.

Reachable only in the rare path where both the appinfo loader and the
API fetch thread run in the same session.
2026-05-08 15:31:24 -04:00
mollusk bb50d96999 Add genre filter using local appinfo.vdf with API fallback
Adds a second dropdown next to the install filter that lets the user
narrow rolls to a single Steam genre (RPG, Strategy, etc.).

Genre data is loaded from Steam's local appinfo.vdf cache via
python-steam (instant, no network). If that's unavailable or a game
isn't in the cache, falls back to a rate-limited background fetch of
appdetails?filters=genres, prompted via confirm dialog. Cached at
~/.cache/steam-dice/genres.json across runs.

python-steam declared as optdepends — app degrades gracefully to the
API path if missing.
2026-05-08 15:26:53 -04:00
mollusk 37bf1c9cc5 Rename desktop ID and icon to reverse-DNS scheme
The icon name "steam-dice" triggers freedesktop's compound-name
fallback: when not found, it strips "-dice" and resolves to the
Steam package's icon. Switch to io.github.silvernode.SteamDice
so the fallback can't collide with anything pre-existing.

Also add .gitignore for makepkg build artifacts and pycache.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-05 16:55:40 -04:00
mollusk be764eb67e Add desktop integration and Arch PKGBUILD
- steam-dice.svg: flat dice icon on Steam-blue gradient
- steam-dice.desktop: launcher entry under Game category
- PKGBUILD: steam-dice-git, builds from GitHub source
- Use setDesktopFileName for correct Wayland WM_CLASS, with
  local SVG fallback when running from the source tree

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-05 16:22:50 -04:00
mollusk 1f828f1e1a Fix four security issues: keyring storage, API key redaction, input validation, cooldown bypass
- Store API key in system keyring instead of plaintext QSettings
- Migrate away from plaintext api_key on first save
- Redact API key from error messages emitted to the UI
- Validate API key (32 hex chars) and Steam ID (17 digits) before use
- Apply refresh cooldown when settings dialog triggers a fetch

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-03 16:14:39 -04:00
mollusk 74856ee9f9 Fix five bugs: concurrent fetch threads, cooldown on error, stale image signal, redundant startup fetch, validation style leak
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-03 15:50:56 -04:00
mollusk 3691161fcb Crop compositor shadow from screenshot
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-03 14:44:30 -04:00
mollusk 8279957262 Fix screenshot URL to use Gitea raw path
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-03 14:29:52 -04:00
mollusk 56768d1c24 Replace screenshot with clean window capture
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-03 14:27:48 -04:00
mollusk 605050b8c3 Add screenshot to README
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-03 14:24:49 -04:00
mollusk 8289a091ee Add README and GPLv2 LICENSE
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-03 14:22:02 -04:00
mollusk fca74fd86b Make steam_dice.py executable
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-03 14:11:06 -04:00
mollusk 434e4f8e0b Clarify Steam ID field expects number only, not full URL 2026-04-02 07:35:34 -04:00
mollusk 315724598f Add settings dialog with QSettings persistence
Removes hardcoded credentials. Users enter their Steam API key and Steam ID
via a gear-icon settings dialog. Help text in the dialog explains how to
obtain each value with clickable links. Settings persist to
~/.config/butter/steam-dice.conf via QSettings. Dialog auto-opens on first
launch if credentials are not yet configured.
2026-04-02 07:13:33 -04:00
mollusk 294a5f6810 Add installed/not installed filter dropdown
Scans libraryfolders.vdf and all steamapps directories at load time to
build the installed appid set. Dropdown filters the roll pool between
All games, Installed, and Not installed. Re-scans on each library refresh.
2026-04-02 07:04:28 -04:00
mollusk 4c927e7ac3 Add Play button to launch selected game via Steam URI
Uses steam://rungameid/{appid} with xdg-open to hand off to the local
Steam client. Button appears below the game image after a roll and hides
again when the dice is rolled next.
2026-04-02 06:59:11 -04:00
mollusk 8eaee99196 Add refresh button with 60s cooldown timer
Adds a view-refresh icon button in the top-right corner to re-fetch the
Steam library. A countdown label appears below it during the cooldown and
hides when the timer expires, preventing API spam.
2026-04-02 06:35:36 -04:00
mollusk 02f561b3ac Set dice app icon from Papirus theme
Replaces the generic Qt placeholder W icon in the titlebar with the
Papirus gDiceRoller icon.
2026-04-02 06:28:46 -04:00
mollusk db56be8bef Add version label and native Wayland support
- Set QT_QPA_PLATFORM=wayland when WAYLAND_DISPLAY is present so the
  app runs natively instead of via XWayland
- Show version string (v0.1.0-<git short hash>) in bottom-left corner
2026-04-02 06:21:24 -04:00
mollusk 8465124977 Initial commit: Steam Dice PyQt6 app
Random game picker with Steam Web API integration, Wayland-native Qt6 support,
and Steam-style dark theme.
2026-04-02 06:20:34 -04:00