Skip to content

Releases: VitaliiRomanenko/popcorn-md

0.1.1 BugFix

13 Jun 18:17

Choose a tag to compare

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 innerHTML and direct HTML assignments with element creation via document.createElementand safe text insertion using textContent.

    • 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 / setCssStyles where appropriate.

    • Files affected: src/settings/settings.ts (lines referenced previously).

  • ESLint directives and explicit any

    • Removed undocumented directive comments and disallowed eslint-disable for @typescript-eslint/no-explicit-any.

    • Replaced any with 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 fetch usage with Obsidian requestUrl to 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 any usages to typed models or validated structures.

    • Files affected: src/api/tmdbAPIService.tssrc/api/tmdbMovieService.tssrc/api/tmdbGenreService.tssrc/views/searchModal.tssrc/settings/suggester/suggest.ts.

  • Obsidian compatibility

    • Replaced global document usage with activeDocument or appropriate Obsidian APIs to support popout windows.

    • Files affected: src/settings/settings.tssrc/views/MovieCard.ts.

  • Async handling

    • Ensured promises are awaited or explicitly handled with .catch or void where intentional.

    • Fixed functions that returned promises in contexts expecting void.

    • Files affected: src/settings/settings.tssrc/settings/suggester/suggest.tssrc/views/searchModal.ts.

  • API usage and suggestions

    • Migrated custom TextInputSuggest implementation toward the recommended AbstractInputSuggest API.

    • Added tests and validation for suggestion behavior.

    • Files affected: src/settings/suggester/suggest.ts.


Changed files

  • src/views/MovieCard.ts — safe DOM updates, removed innerHTML, use of activeDocument.

  • src/settings/settings.ts — moved inline styles to classes, fixed async usage, replaced document with activeDocument.

  • src/settings/suggester/suggest.ts — removed undocumented ESLint disables, improved typing, migrated toward AbstractInputSuggest.

  • src/api/tmdbAPIService.ts — replaced fetch with requestUrl, 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/types or 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 requestUrl for network requests and activeDocument for 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 innerHTML usage 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 any usages 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

13 Jun 14:15

Choose a tag to compare

🎉 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)

  1. Download the latest release from Releases.

  2. Extract main.jsmanifest.json, and styles.css into: <vault>/.obsidian/plugins/popcornmd/

  3. Reload Obsidian and enable the plugin in Settings → Community plugins.


🛠 Getting Started

  1. Obtain a TMDb API key from [themoviedb.org](https://www.themoviedb.org/signup).

  2. Open Settings → Popcorn MD.

  3. Select your template file.

  4. Enter your API key and save.

  5. Run the command “Popcorn MD: Create new movie note” from the palette or click the 🍿 ribbon icon.

  6. Choose a movie by title or IMDb ID.

  7. 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.