Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,3 +164,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `PluginError` enum with `thiserror`: `SerdeJson(#[from])` preserves error source chain; dedicated variants for parse errors, subprocess failures, host response errors, unsupported URLs, and quality mismatches
- 77 native unit tests covering all pure-logic modules (url_matcher, metadata, quality_manager, extractor, ipc handlers) — runs on `x86_64-unknown-linux-gnu` without a WASM runtime
- Release WASM binary: 1.2 MB stripped with LTO + `opt-level = "z"`
- SoundCloud, Vimeo, and Gallery WASM plugins (Task 25)
- New crates under `plugins/`: `vortex-mod-soundcloud`, `vortex-mod-vimeo`, `vortex-mod-gallery`, all targeting `wasm32-wasip1` via `extism-pdk` 1.4 and delegating network I/O to the host `http_request` capability
- **SoundCloud plugin**: `/resolve` API client (api-v2.soundcloud.com) with tagged enum `ResolveResponse` (Track / Playlist / User / Unknown), `classify_url` router covering `soundcloud.com`, `m.soundcloud.com`, `on.soundcloud.com` (single-segment short-links treated as Track), plus `sets/`, `likes`, `reposts`, `tracks`, `albums` paths. Fragment-safe path normalisation (`#recent` no longer misclassifies), artwork upgrade from `-large` to `-t500x500` (handles `.ext`, extensionless, and query-string variants), `client_id` forwarded via host `get_config`. Artist profiles are intentionally rejected by `can_handle` / `supports_playlist` / `ensure_soundcloud_url` until artist pagination is implemented, avoiding a false-positive capability claim. 51 native unit tests.
- **Vimeo plugin**: oEmbed JSON client (`vimeo.com/api/oembed.json`) for metadata + player config client (`player.vimeo.com/video/<id>/config`) for quality variants (progressive MP4 + HLS). Balanced-brace HTML fallback with single- and double-quoted string tracking, plus a word-boundary marker (`window.playerConfig` / `playerConfig =`) so similarly named variables like `window.playerConfigVersion` cannot derail extraction. Deterministic HLS CDN fallback (lexicographic key order when `default_cdn` is missing). `pick_variant_for_quality` with `2K → 1440` / `4K → 2160` mapping, `filter_audio_only` preserving HLS, plus `default_quality` config honoured by hoisting the matching variant to the head of the returned list. Private-share URLs (`vimeo.com/<id>/<hash>`) are preserved verbatim in the response so the auth token is not dropped. Showcase URLs are rejected by `can_handle` / `supports_playlist` / `extract_links` until token-gated showcase extraction lands. Anchored showcase/album regex rejects malformed trailing segments. 57 native unit tests.
- **Gallery plugin**: 3 provider backends with dedicated JSON shapes — Imgur album API v3 (Authorization: Client-ID), Reddit submission JSON (native `is_gallery` + single-image preview fallback) with `&amp;` unescaping and deterministic URL-sorted output (single-image fallback accepts `.jpg`/`.png`/… URLs with query strings and fragments). Flickr `flickr.photosets.getPhotos` handles both numeric and string `width_o`/`height_o`, and `{"stat":"fail"}` envelopes surface as a `PluginError::HttpStatus` with the Flickr error `code`/`message` instead of a JSON parse failure. Generic `<img src>` HTML fallback behind a separate `extract_generic` export; relative URLs now resolve against the **page directory** (preserving `gallery/` context), protocol-relative URLs inherit the **page scheme** (no forced `https:`), and `UrlContext` strips `?`/`#` when computing the origin and base directory. `has_non_http_scheme` guard blocks `data:`/`javascript:`/`mailto:`/`blob:` from resolution. Fragment-stripping URL normaliser; `extract_reddit_permalink` no longer double-appends `.json` when the input already ends in `.json`. Post-processing pipeline: `dedupe_links` → `filter_by_min_resolution` (now drops images with a single known dimension below the threshold, not just both-known cases) → `auto_name` (zero-padded `<provider>_<album>_<idx>.<ext>` with album-id sanitisation). Canonical `Provider` enum lives in `url_matcher.rs` and is re-exported from `link.rs`, eliminating the duplicated type surface. Runtime `min_resolution` fallback (`800x600`) now matches the manifest default. 49 native unit tests.
- Shared host-function envelope pattern: every plugin models `HttpRequest`/`HttpResponse` to mirror `src-tauri/src/adapters/driven/plugin/host_functions.rs`, with `HttpResponse::into_success_body()` mapping 401/403 → `PluginError::Private` and other non-2xx → `PluginError::HttpStatus`
- `PluginError` per crate via `thiserror` with `SerdeJson(#[from])`, no `.unwrap()` in production paths, no `#[allow(dead_code)]`, no `unsafe` outside documented `#[host_fn]` call sites
- Release WASM binaries: SoundCloud ~250 KB, Vimeo ~1.12 MB, Gallery ~1.14 MB (all stripped with LTO + `opt-level = "z"`)
2 changes: 2 additions & 0 deletions plugins/vortex-mod-gallery/.cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[build]
target = "wasm32-wasip1"
Loading
Loading