Releases: bigfa/Pluto
Releases · bigfa/Pluto
v0.3.0 - Media View Count
What's New
Media View Count
- New
POST/GET /api/media/{id}/viewendpoint for recording and retrieving view counts - Lightbox automatically records and displays view count with eye icon
- Home page gallery supports sorting by views (new "Views" tab alongside "Latest" and "Popular")
- Admin media list shows view count column with sort support
- IP-based deduplication via KV (5-minute window) prevents spam
- Bot User-Agent filtering (Googlebot, Bingbot, curl, etc.)
Technical Details
- New DB field
media.view_countwith index - New service
mediaViewServices.tsfollowingalbumViewServicespattern - KV keys:
media:view:{id}(count),media:view:dedup:{id}:{ipHash}(dedup with 300s TTL) - COALESCE-based NULL-safe sorting for both public and admin APIs
Upgrade Guide
Run the database migration:
# Cloudflare D1
npx wrangler d1 execute <DB_NAME> --remote --file=drizzle/0004_add_media_view_count.sql
# Docker (SQLite)
sqlite3 /data/photos.db < drizzle/0004_add_media_view_count.sql
# Supabase (PostgreSQL)
psql -h <host> -U postgres -d postgres -f drizzle/0004_add_media_view_count.sqlFull Changelog: v0.2.1...v0.3.0
v0.2.1
What's New
Added
- Public media details endpoint
GET /api/media/{id}: returns full photo info including categories, tags, EXIF, and like status - Upload duplicate detection: SHA-256 hash-based detection that skips existing files and notifies users
- Database field
file_hash: stores image hash for duplicate detection
Changed
- Unified all timestamps to ISO 8601 format (
YYYY-MM-DDTHH:mm:ss.sssZ)
Upgrade Guide
Upgrading from v0.2.0 requires a database migration:
# Cloudflare D1 - Local development
npx wrangler d1 execute <DB_NAME> --local --file=drizzle/0003_add_media_file_hash.sql
# Cloudflare D1 - Remote production
npx wrangler d1 execute <DB_NAME> --remote --file=drizzle/0003_add_media_file_hash.sql
# Docker (SQLite) - Execute inside container
sqlite3 /data/photos.db < drizzle/0003_add_media_file_hash.sql
# Supabase (PostgreSQL)
psql -h <host> -U postgres -d postgres -f drizzle/0003_add_media_file_hash.sqlFull Changelog: v0.2.0...v0.2.1
v0.2.0
Changelog
All notable changes to this project will be documented in this file.
[0.2.0] - 2026-02-06
Added
- Album categories: schema, admin CRUD, public listing, and album filtering.
- Admin media upload: multi-image queue with paste support, dedupe, previews, and per-item progress overlay.
- Docker deployment: Dockerfile, docker-compose, Nginx sidecar guidance, and init scripts.
- App/API docs: new App-focused API doc and expanded API/config/deploy docs (EN/ZH).
Changed
- Media URL resolution now uses
provider + object_keywhere available. - Public album list now supports category filtering and returns categories/ids.
- i18n: added album category/admin labels and related strings.
- Env loading improved for Workers (Cloudflare bindings).
Fixed
- Album/detail category visibility now respects
show_in_frontend. - Admin media edit dialog layout scrolling and button visibility.
- Several build/type issues found during deploy.