Skip to content

feat(dashboard): bulk-create collections from an addon's catalogs - #142

Open
bigverm23 wants to merge 1 commit into
lostb1t:mainfrom
bigverm23:feat/addon-catalog-bulk-import
Open

feat(dashboard): bulk-create collections from an addon's catalogs#142
bigverm23 wants to merge 1 commit into
lostb1t:mainfrom
bigverm23:feat/addon-catalog-bulk-import

Conversation

@bigverm23

Copy link
Copy Markdown

What

Adds a bulk-import workflow for addon catalogs. Today, turning a
Stremio addon's catalogs into collections means creating them one at
a time through the manual "New Collection" form and hand-picking the
catalog filter. This adds a dedicated screen for it.

New screen: Addons → Catalogs

  • Click "Catalogs" on any addon that exposes the catalog resource
    to see all its catalogs in a grid, each tagged with its media kind
    (Movies/Shows/Mixed/Music/Collections).
  • Search box to filter the grid by name.
  • Select multiple catalogs and either:
    • Separate collections — one collection per catalog, each
      filtered to just that catalog's items.
    • Merge into one — combine all selected catalogs into a
      single named collection.
  • Optional overrides before creating: explicit Media Kind
    (instead of relying on auto-detection) and Tags, applied to
    whatever gets created.
  • Catalogs that already have a collection (tracked via the new
    collection_source field) are greyed out with an "Already added"
    badge, so re-visiting the screen won't offer duplicates.

Backend changes

  • AddonCatalogDto gains collection_media_kind, populated in
    get_addon_catalogs, so the dashboard knows each catalog's kind
    without guessing.
  • PatchItemPayload gains collection_source
    ("{addon_uuid}:{local_catalog_id}"), persisted by patch_item,
    so catalog-derived collections carry a pointer back to their
    source catalog. Already surfaced via the existing
    remux.collectionSource field on item responses.

Testing

  • cargo check across remux-sdks, remux-server, remux-dashboard
  • Ran locally via cargo make dev, walked through: creating separate
    collections, creating a merged collection, re-visiting the screen
    to confirm dedup/greying, media-kind override, and tags.

Notes / follow-ups I did not attempt here

  • CollectionMediaKind::Music (server) vs MediaKind::Track (SDK)
    don't line up, so a music catalog's kind won't round-trip perfectly
    today — same pre-existing gap as in api/models.rs. Worth a
    separate fix.
  • No bulk-delete / bulk-manage for existing catalog-sourced
    collections yet — this PR is additive/creation-only.

The initial implementation was drafted with Claude and then reviewed
and tested locally by me.

@bigverm23
bigverm23 force-pushed the feat/addon-catalog-bulk-import branch from e177e76 to 1a0ad63 Compare July 25, 2026 12:37
Adds a new /addons/{id}/catalogs screen: a grid of every catalog an
addon exposes, with checkboxes and two creation modes:

- Separate: one collection per selected catalog (collection_kind:
  catalog), each filtered to just that catalog.
- Merge: all selected catalogs combined into a single named
  collection.

Also:
- Lets the user override the auto-detected Media Kind (Movies, TV
  Shows, Mixed, Music, Collections) and add Tags to the created
  collection(s) instead of relying purely on catalog auto-detection.
- Adds collection_source (PatchItemPayload + DB column usage) so
  catalog-derived collections carry back a pointer to their source
  catalog, letting the screen grey out catalogs that already have a
  collection.
- Adds collection_media_kind and item_count to AddonCatalogDto /
  get_addon_catalogs so the dashboard can show a sensible default
  kind and current size per catalog.
- Adds a search box on the catalogs grid, and a confirmation step
  summarizing mode/name/kind/tags/catalogs before creating.
- Minor css theme adjustment to accomodate addition of Catalogs button

The initial implementation was drafted with Claude and then reviewed
and tested locally by me.
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.

1 participant