Obtainium
Obtainium copied to clipboard
Allow custom script to support more sources
Maintaining all sources solely by the dev could be very troublesome as the list grows. Please consider to allow something like extension / addon / plugin for user customization, where users can use their own scripts. Maybe in future a repo can be set up for collecting user-made sources.
It's an interesting idea, but how would this work? Currently the sources are all Dart classes that extend a base class, all compiled in the app. Is there a way for a Flutter app to load new code at runtime?
Maybe not something hardcoded. I'm not sure about the details, but it's likely some new modules (maybe in other languages) could be introduced, or the app structure should be kinda refactored. https://github.com/DUpdateSystem/UpgradeAll is an example (not in Flutter or Dart though).
For reference, maybe these projects (all in Kotlin though) can also be inspirational for their different ideas on source extension: Tachiyomi, Legado, CloudStream
I'm sorry for being unable to provide more suggestions on tech details.
The easiest solution would be to bundle a JS interpreter and have the sources be in JS.
But since this app is made with flutter...it doesn't feel that viable.
Just found a Flutter app with such extension system, https://github.com/miru-project/miru-app, which uses https://github.com/bellard/quickjs. Maybe there are some better alternatives, but anyway, its implementation should be interesting enough for reference.