# Changelog

## v0.1.0-dev5 (2025-11-17)

### 🧰 CLI & Import Improvements
- Added `goondex import all` plus explicit `all-performers`, `all-studios`, and `all-scenes` bulk commands so the entire TPDB catalog can be ingested with one invocation.
- Each bulk import now exposes start/max page flags even when running the combined command, making resume workflows painless.
- Standardized TPDB API key handling across commands; errors now include clear export instructions via the shared helper.

### 📖 Developer Experience
- `README.md` now documents when/how to rebuild the CLI binary, preventing stale builds after source changes.
- `docs/ADULT_EMPIRE_SCRAPER.md` metadata bumped to v0.1.0-dev5.
- `goondex version` output updated to reflect the new release and highlight the bulk import capability.

## v0.1.0-dev4 (2025-11-16)

### 🎨 Web UI Enhancements
- **Grid Layout Migration**: Converted all listing pages (Performers, Studios, Scenes) from table-based to modern card grid layout
  - Uses GX_CardGrid component system with responsive design
  - Performers: 3:4 aspect ratio portrait cards with scene count and nationality
  - Studios: 3:4 aspect ratio cards with description preview
  - Scenes: 16:9 aspect ratio landscape cards with date, studio, and code
  - Hover effects with neon pink glow
  - Mobile-responsive grid (auto-fills from 160px to 220px cards)

- **Updated Navigation**: All pages now use consistent navbar with logo
- **Enhanced Search Forms**: Updated to use GX button components with hover effects
- **Improved Styling**: All pages now load `goondex.css` instead of `style.css`

### 🌐 Adult Empire Integration
- **Complete Scraper Implementation**
  - HTTP client with cookie jar for session management
  - XPath-based HTML parsing (no official API available)
  - Scene scraping: title, date, studio, performers, tags, description, cover art
  - Performer scraping: bio, measurements, birthday, ethnicity, aliases, images
  - Search functionality for both scenes and performers

- **CLI Commands**:
  - `adultemp search-scene [query]` - Search for scenes
  - `adultemp search-performer [name]` - Search for performers
  - `adultemp scrape-scene [url]` - Scrape and import a scene
  - `adultemp scrape-performer [url]` - Scrape and import a performer
  - `adultemp merge-performer [id] [url]` - Merge Adult Empire data into existing performer
  - Optional `--etoken` flag for authenticated access

### 🔄 Data Merging & Update System
- **Intelligent Data Merger**
  - New `merger` package for combining data from multiple sources
  - TPDB data takes priority, Adult Empire fills in gaps
  - Smart name matching algorithm (70% word overlap threshold)
  - Merges: bio, aliases, measurements, physical attributes
  - Preserves high-quality TPDB images over Adult Empire

- **Performer Update Command**
  - `performer-update [id]` - Refresh performer from TPDB
  - Automatically searches Adult Empire for supplemental data
  - Shows potential matches for manual merging

### 📚 Documentation
- Created comprehensive `docs/ADULT_EMPIRE_SCRAPER.md`
  - Architecture overview with diagrams
  - API reference for all scraper methods
  - XPath selector documentation
  - Authentication guide (etoken cookie)
  - Troubleshooting section
  - Comparison with TPDB scraper

### 🐛 Bug Fixes & Improvements
- Fixed variable shadowing in `joinStrings()` function
- Added missing dependencies for HTML parsing (`golang.org/x/text/*`)
- Riley Reid investigation: Performer exists (ID: 20029) but has 0 scenes (scene linking issue)

### 📦 New Dependencies
- `github.com/antchfx/htmlquery` - XPath HTML parsing
- `github.com/antchfx/xpath` - XPath query engine
- `golang.org/x/net/html` - HTML parsing
- `golang.org/x/text/*` - Text encoding support

---

## v0.1.0-dev3 (Previous)
Complete TPDB metadata with duplicate prevention

## v0.1.0-dev2
Full TPDB integration with auto-fetch and comprehensive docs

## v0.1.0-dev1
Initial release with basic TPDB functionality
