Hentoid icon indicating copy to clipboard operation
Hentoid copied to clipboard

Suggestion: Custom Source Database for External Library Use

Open fuwamocoanon opened this issue 1 year ago • 0 comments

This feature would link with the External Library and allow a user to create a Source + Image for the source for use in the Library

In Site.java a source is given the follow format

[TITLE]([##], "[title short]", "[URL]", R.drawable.ic_site_[title short]);

TITLE - Format used for contentV2.json title short - the "nickname" for the site (simply just the lowercase) URL - Can be setup to be a dummy URL. Anything works here as long as TITLE is also in INVISIBLE_SITES R.drawable.ic_site_[title short] - calls for the source's image

Allowing a user to input [TITLE] + an image for the drawable would secure long-term EoL use for the app.

Idea for integration

  • Have a dictionary for storing each [TITLE] + [IMAGE]
  • [TITLE] can be used for [title short] as well
  • URL can be anything. https://dummyurl.com for example
  • Have another dictionary for storing each [TITLE] that functions as INVISIBLE_SITES
  • Add these dictionaries to the import worker

This should ensure legacy features don't need full refactoring beyond checking these 2 new dictionaries on top of the existing ones

fuwamocoanon avatar Sep 24 '24 21:09 fuwamocoanon