Skip to content

ExternalHoster

Jan Rau edited this page Apr 14, 2016 · 1 revision

External Hosters

Hosters can be loaded from external source. There are two ways to configure that.

MangaExt.jar

Create a jar-file with the name MangaExt.jar and put it into the folder lib

  • The jar must contain all hosters
  • The jar must contain the file META-INF/services/de.herrlock.manga.host.ChapterList
    • That file can be generated; eg. by auto-service (com.google.auto.service:auto-service:1.0-rc2)
      • Annotate the hoster-classes with @com.google.auto.service.AutoService ( de.herrlock.manga.host.ChapterList.class )
    • Characters after a # are ignored

Example:

net.droggelbecher.ExampleCom # ExampleCom
com.example.foo.MyNiceHoster

additionalHosters.txt

Other resources can be placed inside the file additionalHosters.txt.

  • lines starting with [ and ending with ] are treated as locations to lookup the classes
  • lines starting with # and empty lines are ignored
  • other lines are looked as classes
  • the order of the lines is not important, the resources (with []) are filtered first, the classes are loaded after that

Example:

# myjar.jar in the folder ext
[ext/myjar.jar]
# the folder "folder" in ext (no jar used)
[ext/folder]
# two classes to load
net.droggelbecher.ExampleCom
com.example.foo.MyNiceHoster

Clone this wiki locally