Skip to content

Plugins: Expose the marketplace URL as an app setting - #907

Open
Bas1874 wants to merge 1 commit into
5rahim:mainfrom
Bas1874:URL
Open

Plugins: Expose the marketplace URL as an app setting#907
Bas1874 wants to merge 1 commit into
5rahim:mainfrom
Bas1874:URL

Conversation

@Bas1874

@Bas1874 Bas1874 commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Summary

The marketplace URL is stored in localStorage, so the server never knows what it is and plugins can't read or change it without DOM.

This moves it into the app settings as extensions.marketplaceUrl. Plugins can then use ctx.appSettings with the existing settings scope, no new permission needed. The extensions page reads it from the server now and migrates the old localStorage value on first load.

Two related fixes while I was in there: the settings permission prompt only showed the path being written, not the value, and the prompt cache was keyed on the path alone, so approving one value let a plugin write any other value to the same path without asking again.

Validation runs in db.UpsertSettings since every write path goes through it.

Tested locally with a small plugin that flips the URL from a tray button. seemed to work fine. Let me know if anything needs changing :D

one small issue might be that
PATCH /settings/path calls InitOrRefreshModules(), which is heavy for a single URL change. I
reused the endpoint rather than adding another one, let me know if you want that differently.

Used AI assistance for spelling. and to create the testing plugins. and small tweaks

For issue #849

Checklist

  • I have read CONTRIBUTING.md
  • I set up Seanime locally.
  • I understand the code I changed.
  • I tested the change locally.
  • I wrote this PR description myself.
  • I disclosed any AI assistance.
  • I can explain and maintain this change.

@Bas1874 Bas1874 changed the title 1 Marketplace URL as extensions.marketplaceUrl Jul 28, 2026
@Bas1874 Bas1874 changed the title Marketplace URL as extensions.marketplaceUrl Plugins: Expose the marketplace URL as an app setting Jul 30, 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.

1 participant