Skip to content

Add support for dynamically-loaded metadata source plugins - #156

Closed
quattromeister wants to merge 2 commits into
SublerApp:mainfrom
quattromeister:feature/plugin-metadata-sources
Closed

quattromeister wants to merge 2 commits into
SublerApp:mainfrom
quattromeister:feature/plugin-metadata-sources

Conversation

@quattromeister

Copy link
Copy Markdown

Lets a third party add a movie metadata source to Subler without touching Subler's own source or Xcode project: they build a small, loadable .bundle implementing a Foundation-only protocol, and drop it into ~/Library/Application Support/Subler/Plugins.

  • SublerMetadataPlugin.swift: the protocol a plugin's principal class implements (searchMovie/loadMovieMetadata using plain String/[String: Any] dictionaries only, so a plugin project never needs to link against Subler's own types or MP42Foundation).
  • MetadataPluginLoader.swift: discovers and loads every .bundle in the Plugins folder, skipping (and logging) anything that fails to load or doesn't conform, so one broken plugin can never take down the rest of Subler.
  • PluginMetadataService.swift: adapts a loaded plugin to Subler's own MetadataService protocol, so it shows up in the Search Metadata dialog and batch queue provider popups exactly like a built-in source.

With no plugin bundles installed -- the common case -- this changes nothing about Subler's behavior.

Also includes this batch's shared GitHub Actions build check (.github/workflows/build.yml) -- compile-only verification on a macOS runner, so a branch shows red/green on GitHub before anyone opens Xcode. Flagging in case another PR in this batch merges it first, so it doesn't need to land twice -- happy to drop it from whichever PR merges second.

quattromeister and others added 2 commits September 27, 2026 04:21
Lets a third party add a movie metadata source to Subler without
touching Subler's own source or Xcode project: they build a small,
loadable .bundle implementing a Foundation-only protocol, and drop it
into ~/Library/Application Support/Subler/Plugins.

- SublerMetadataPlugin.swift: the protocol a plugin's principal class
  implements (searchMovie/loadMovieMetadata using plain
  String/[String: Any] dictionaries only, so a plugin project never
  needs to link against Subler's own types or MP42Foundation).
- MetadataPluginLoader.swift: discovers and loads every .bundle in the
  Plugins folder, skipping (and logging) anything that fails to load
  or doesn't conform, so one broken plugin can never take down the
  rest of Subler.
- PluginMetadataService.swift: adapts a loaded plugin to Subler's own
  MetadataService protocol, so it shows up in the Search Metadata
  dialog and batch queue provider popups exactly like a built-in
  source.

With no plugin bundles installed -- the common case -- this changes
nothing about Subler's behavior.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ETy3zxWgGdZPVzjN3vqbbC
Compile-only verification (no signing, no tests) on a macOS runner:
checks out the repo with submodules, then xcodebuilds the Subler
target. Runs on every push and PR to any branch, so a branch shows
red/green on GitHub before anyone has to open Xcode. This is fork/CI
infrastructure, not app code -- merged into every branch that should
get build coverage, but deliberately kept off of main so main stays a
byte-for-byte mirror of upstream for clean rebasing.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ETy3zxWgGdZPVzjN3vqbbC
@galad87 galad87 closed this Sep 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants