Releases: VitaliiRomanenko/popcorn-md
0.1.1 BugFix
Release Notes — Bug Fixes
Version: 0.1.1
Date: 2026-06-13
Author: Vitalii Romanenko
Summary
This release fixes multiple security, typing, and Obsidian compatibility issues. The focus is on eliminating unsafe DOM operations, replacing direct network calls with Obsidian APIs, improving TypeScript types and validation, and moving inline styles into CSS classes. These changes increase safety, maintainability, and reliability across normal and popout windows.
Fixed issues
-
DOM safety
-
Replaced unsafe
innerHTMLand direct HTML assignments with element creation viadocument.createElementand safe text insertion usingtextContent. -
Ensured no unvalidated HTML is injected into the UI.
-
Files affected:
src/views/MovieCard.ts.
-
-
Styles
-
Removed direct style assignments and inline style mutations.
-
Introduced CSS classes and used
setCssProps/setCssStyleswhere appropriate. -
Files affected:
src/settings/settings.ts(lines referenced previously).
-
-
ESLint directives and explicit any
-
Removed undocumented directive comments and disallowed
eslint-disablefor@typescript-eslint/no-explicit-any. -
Replaced
anywith concrete types or narrowed types with validation where possible. -
Added explanatory comments for any remaining, narrowly scoped exceptions.
-
Files affected:
src/settings/suggester/suggest.ts.
-
-
Network requests
-
Replaced
fetchusage with ObsidianrequestUrlto align with platform expectations and improve error handling. -
Added response validation and error handling for network calls.
-
Files affected:
src/api/tmdbAPIService.ts.
-
-
Type safety and any usage
-
Introduced interfaces for TMDB responses and other external data structures.
-
Added runtime checks before accessing properties on external responses.
-
Converted unsafe
anyusages to typed models or validated structures. -
Files affected:
src/api/tmdbAPIService.ts,src/api/tmdbMovieService.ts,src/api/tmdbGenreService.ts,src/views/searchModal.ts,src/settings/suggester/suggest.ts.
-
-
Obsidian compatibility
-
Replaced global
documentusage withactiveDocumentor appropriate Obsidian APIs to support popout windows. -
Files affected:
src/settings/settings.ts,src/views/MovieCard.ts.
-
-
Async handling
-
Ensured promises are awaited or explicitly handled with
.catchorvoidwhere intentional. -
Fixed functions that returned promises in contexts expecting
void. -
Files affected:
src/settings/settings.ts,src/settings/suggester/suggest.ts,src/views/searchModal.ts.
-
-
API usage and suggestions
-
Migrated custom TextInputSuggest implementation toward the recommended
AbstractInputSuggestAPI. -
Added tests and validation for suggestion behavior.
-
Files affected:
src/settings/suggester/suggest.ts.
-
Changed files
-
src/views/MovieCard.ts— safe DOM updates, removedinnerHTML, use ofactiveDocument. -
src/settings/settings.ts— moved inline styles to classes, fixed async usage, replaceddocumentwithactiveDocument. -
src/settings/suggester/suggest.ts— removed undocumented ESLint disables, improved typing, migrated towardAbstractInputSuggest. -
src/api/tmdbAPIService.ts— replacedfetchwithrequestUrl, added response types and validation. -
src/api/tmdbMovieService.ts— added interfaces, safe mapping and field checks. -
src/api/tmdbGenreService.ts— added typing and validation. -
src/views/searchModal.ts— fixed promise handling and tightened types.
Developer notes
-
API types: New interfaces live in
src/typesor the designated types folder. Always validate external responses before accessing fields. -
Styles: New CSS classes are added to the plugin stylesheet. Avoid inline styles and prefer class-based styling or
setCssProps/setCssStyles. -
ESLint: If an exception is required, scope it narrowly and include a clear comment explaining why the rule is disabled.
-
Obsidian APIs: Use
requestUrlfor network requests andactiveDocumentfor DOM access in popout contexts.
Testing and verification
-
Unit tests: Added tests for TMDB response parsing and suggestion component behavior.
-
Manual tests: Verified UI behavior in both main and popout windows, confirmed no unvalidated HTML insertion, and tested error handling for network failures.
-
Security checks: Confirmed removal of unsafe
innerHTMLusage and validated that user-provided content is never injected as raw HTML.
Known limitations
-
Some external responses remain loosely typed due to variability in third-party API payloads. Additional validation and stricter schemas will be added in future releases.
-
Minor refactors remain to fully eliminate all legacy
anyusages across the codebase.
Summary
This release addresses critical security and compatibility issues, improves TypeScript safety, and aligns the codebase with Obsidian best practices to make the plugin safer and more robust.
0.1.0
🎉 PopcornMD v0.1.0 — First Release
We’re excited to announce the very first release of PopcornMD, an Obsidian community plugin that brings your movie collection to life inside your notes.
This initial version focuses on core functionality: searching movies and TV shows via TMDb and generating structured notes directly in Obsidian.
🚀 Features
-
Search by title or IMDb ID — Quickly find any movie or show.
-
Auto-generated notes — Create Obsidian notes pre-filled with metadata (title, year, genres, poster, synopsis, rating, cast, etc.).
-
Customizable templates — Design your own note layout using placeholders.
-
Minimal UI — Clean modal search interface for distraction-free workflow.
⚙️ Installation
From Obsidian Community Plugins (coming soon)
- Browse for PopcornMD in Obsidian’s Community Plugins list.
Manual (developer preview)
-
Download the latest release from Releases.
-
Extract
main.js,manifest.json, andstyles.cssinto:<vault>/.obsidian/plugins/popcornmd/ -
Reload Obsidian and enable the plugin in Settings → Community plugins.
🛠 Getting Started
-
Obtain a TMDb API key from [themoviedb.org](https://www.themoviedb.org/signup).
-
Open Settings → Popcorn MD.
-
Select your template file.
-
Enter your API key and save.
-
Run the command “Popcorn MD: Create new movie note” from the palette or click the 🍿 ribbon icon.
-
Choose a movie by title or IMDb ID.
-
A new note is generated using your selected template.
📋 Commands
- Popcorn MD: Create new movie note — Opens the movie search modal.
⚙️ Settings
-
TMDb API Key — Required for API access.
-
Default language — Language for movie data.
-
Template path — Path to your custom template file.
🧩 Template System
PopcornMD uses a flexible template system with placeholders ({{variable}}) to auto-populate metadata fields. Examples include: {{title}}, {{genres}}, {{release_date}}, {{overview}}, {{poster_path}}, and more.
Future versions will expand template configuration options (e.g., storing arrays as links, lists, or comma-separated strings).
🧑💻 Development
-
Node.js 18+
-
npm
-
Commands:
-
npm run dev— Development with watch mode -
npm run build— Production build -
npm run lint— Linting
-
📜 License
MIT License.
This plugin is not affiliated with TMDb or Obsidian. You must obtain your own API key from TMDb.
✨ PopcornMD — Because your movie collection deserves better than plain text.