v1.3.0 (2026-05-23)
- Add backend-assisted `/api/identify` matching for items without reliable
  Kodi IDs, with confidence thresholds, safe fallback behavior, and local
  identify-result caching.
- Improve local filename parsing for movie years, season folders, anime
  absolute episodes, and multi-episode files such as `S01E01-E02`.
- Include `episode_end`, `multi_episode`, `absolute_episode`, canonical IDs,
  and backend identify metadata in later scrobble payloads when available.
- Add stricter backend URL validation so insecure or malformed backend
  settings do not receive tokens unless developer mode explicitly allows it.
- Add library import preview, richer import diagnostics, verbose debug export,
  rating-prompt delay/suppression options, and a manual Kodi QA checklist.
- Expand regression coverage for parser logic, backend identify behavior,
  queue migrations, payload identity fields, and duplicate stop handling.

v1.2.0 (2026-05-23)
- Rename the user-facing addon to "PunchPlay" while keeping the
  addon ID `script.punchplay`.
- Move runtime modules into `resources/lib` and keep `default.py` as a very
  small Kodi service bootstrap.
- Centralize addon constants, endpoint paths, default backend URL, and
  version lookups to reduce duplicated metadata across the runtime.
- Add per-event `event_id` values alongside stable `playback_session_id`
  values so queued and replayed events can be deduplicated backend-side.
- Harden final stop handling with a duplicate-stop guard, explicit
  `watched: true/false`, and near-end completion handling.
- Expand the offline queue schema with retry metadata, migration logic,
  30-day expiry, and higher retention with stop-priority preservation.
- Warn before logout when unsynced queued events would be deleted.
- Add settings actions for test connection, status viewing, debug export,
  and manual offline-queue clearing.

v1.1.1 (2026-05-17)
- Improve watched-threshold detection by caching playback position between
  heartbeat events, reducing missed 70% scrobbles when Kodi closes playback
  before the final position can be read.
- Add playback session IDs and event timestamps to prevent stale queued
  progress from reappearing after a completed stop event.
- Preserve PunchPlay link callback URLs through login so QR/device-code
  approval returns to the pre-filled connection page.

v1.1.0 (2026-04-28)
- Rate movies and episodes right in Kodi after the watched threshold is met.
  A 1–10 rating dialog appears after the scrobble notification. Configurable
  via the "Rate after watching" toggle in settings.
- Rate from context menu: right-click any movie or episode in your Kodi
  library and select "Rate on PunchPlay" to rate it at any time.
- One-click Kodi library sync: imports all watched movies and episodes from
  your Kodi library into PunchPlay. Open Settings → Library → Sync Kodi
  Library. Items already in your PunchPlay history are automatically skipped.

v1.0.3 (2026-04-25)
- Fix crash on Python 3.8 (Kodi Nexus on Windows) caused by modern
  type hint syntax; added `from __future__ import annotations` to all files
- Fix login poll silently swallowing HTTP errors — expired/access_denied
  are now properly detected and reported to the user
- Fix stale QR image on re-login (Kodi texture cache bypass)
- Wrap os.listdir in try/except for QR cleanup resilience
- Only update flush timestamp on success (restore correct retry behaviour)

v1.0.2 (2026-04-15)
- Login dialog now shows a scannable QR code alongside the device code.
  Scan with your phone to open punchplay.tv/link with the code pre-filled.
- Users without a phone can still read the code and type it on any device.

v1.0.1 (2026-04-15)
- Login dialog now shows the code at the top so it's visible without scrolling
- Heartbeat thread now stops cleanly on any unhandled error
- Offline queue WAL mode set once on DB init (not every connection)
- Anime detection no longer matches the "animation" genre (too broad)
- Offline queue retry loop stops on 401 so stale events don't block the queue

v1.0.0 (2026-03-16)
- Initial release
- Automatic scrobbling of movies and TV episodes
- Device-code OAuth login flow
- Heartbeat progress reporting
- Offline queue with automatic retry
- Anime detection via genre tags
- Configurable watched threshold, min length, and heartbeat interval
