xemle / home-gallery

Self-hosted open-source web gallery to view your photos and videos featuring mobile-friendly, tagging and AI powered image discovery
https://home-gallery.org
MIT License
736 stars 50 forks source link

implement plug-in system #135

Open JohnnyDarks opened 2 months ago

JohnnyDarks commented 2 months ago

I've been using this and find it meet most of my needs. However, I believe implementing a plugin system could greatly enhance its flexibility and extend its functionality. Preferable for the Web App.

Would you be open to considering this feature? I'm happy to discuss further and contribute where I can.

xemle commented 2 months ago

Hi @JohnnyDarks

Thank you for using HomeGallery and propose the Plugin feature. I am happy that this gallery covers most of you needs.

Indeed I am considering this feature and would be happy to discuss further steps and also possibilities how to contribute. Regarding the backend to extend the extractor or the database creator I do have ideas. But it is different to the Web App.

What functionality would you like to add as plugin in the Web App? The Web App is written in React and I have only a rough idea how to provide pluggable features to a React App. Do you have experience with plugins and react?

JohnnyDarks commented 2 months ago

Some ideas I had include saved searches, a search builder (an advanced search tool that allows you to select order by, media type, and tags from a list of possible values), animated GIF support, video player settings like auto-play with sound and auto-looping, and a slideshow mode with auto-advancement to the next file. These are smaller features that allow for easy extensions without requiring feature bloat in the main app or deviation from the main app's objectives. While I have experience using plugins, I don't have experience making them. I also have some experience creating educational and visualization content in React/Lit

xemle commented 2 months ago

Hi @JohnnyDarks

  • saved searches
  • animated GIF support
  • video player settings like auto-play with sound and auto-looping, and
  • a slideshow mode with auto-advancement to the next file.

Thank you for your improvement suggestions.

  • saved searches

Currently the database schema is flat and has only one "table". Via the feature of face names from #132 this might change and the database schema might have several "tables" like "faces", "searches" or "albums"

  • animated GIF support

This should be done quite easy with the new plugin system. Things would work well to just support other image formats

  • video player settings like auto-play with sound and auto-looping, and

This could be a general setting. Either a global one or a single one via the detail view. To bring this feature as plugin it would be tricky IMHO.

  • a slideshow mode with auto-advancement to the next file.

Same as the video player which requires a own renderer of some media files.

I am trying to define the interfaces for a plugin system. Currently it is work in progress on the branch feature/plugin. Maybe you can check the interfaces in src.

While I have experience using plugins, I don't have experience making them. I also have some experience creating educational and visualization content in React/Lit

That sounds awesome! I would like to have a private conversation with you as sparing partner to talk about requirements and functions of the plugin. Would that be possible?