[CI SKIP] add some points to CONTRIBUTING.md (#3513)
* [CI SKIP] add some points to CONTRIBUTING.md * [CI SKIP] Getting help section * Update CONTRIBUTING.md Co-authored-by: arkon <arkon@users.noreply.github.com>
This commit is contained in:
parent
5a9a96f761
commit
d8b59bf7b4
|
@ -17,6 +17,10 @@ Before you start, please note that the ability to use following technologies is
|
|||
- [Android Studio](https://developer.android.com/studio)
|
||||
- Emulator or phone with developer options enabled and a recent version of Tachiyomi installed
|
||||
|
||||
## Getting help
|
||||
|
||||
- Join [the Discord server](https://discord.gg/tachiyomi) for online help and to ask questions while developing your extension.
|
||||
- There are some features and tricks that are not explored in this document. Refer to existing extension code for examples.
|
||||
|
||||
## Writing an extension
|
||||
|
||||
|
@ -134,6 +138,7 @@ a.k.a. the "Latest" source entry point in the app.
|
|||
|
||||
- `getFilterList` will be called to get all filters and filter types. **TODO: explain more about `Filter`**
|
||||
- When the user searches inside the app, `fetchSearchManga` will be called and the rest of the flow is similar to what happens with `fetchPopularManga`.
|
||||
- If search functionality is not available, return `Observable.just(MangasPage(emptyList(), false))`
|
||||
|
||||
#### Manga Details
|
||||
|
||||
|
@ -141,6 +146,7 @@ a.k.a. the "Latest" source entry point in the app.
|
|||
- `fetchMangaDetails` is called to update a manga's details from when it was initialized earlier
|
||||
- Note: During a backup, only `url` and `title` are stored, and to restore the rest of the manga data the app calls `fetchMangaDetails`, so all fields should be filled in if possible.
|
||||
- `fetchChapterList` is called to display the chapter list. This should be sorted descending by date.
|
||||
- `SManga.initialized` tells the app if it should call `fetchMangaDetails`. If you are overriding `fetchMangaDetails`, make sure to pass it as `true`.
|
||||
|
||||
#### Chapter
|
||||
|
||||
|
@ -150,13 +156,15 @@ a.k.a. the "Latest" source entry point in the app.
|
|||
|
||||
- When user opens a chapter, `fetchPageList` will be called and it will return a list of `Page`s.
|
||||
- While a chapter is open the reader will call `fetchImageUrl` to get URLs for each page of the manga.
|
||||
- Chapter pages start from `0`.
|
||||
- If `Page.imageUrl`s are available immediately, you should pass them here. Otherwise, you can set `page.url` to a empty string and override `imageUrlParse` to fill those `imageUrl`s.
|
||||
|
||||
### Misc notes
|
||||
|
||||
- Sometimes you may find no use for some inherited methods. If so just override them and throw exceptions: `throw Exception("Not used")`
|
||||
- Sometimes you may find no use for some inherited methods. If so just override them and throw exceptions: `throw UnsupportedOperationException("Not used.")`
|
||||
- You probably will find `getUrlWithoutDomain` useful when parsing the target source URLs.
|
||||
- If possible try to stick to the general workflow from `HttpSource`/`ParsedHttpSource`; breaking them may cause you more headache than necessary.
|
||||
|
||||
- By implementing `ConfigurableSource` you can add settings to your source, which is backed by [`SharedPreferences`](https://developer.android.com/reference/android/content/SharedPreferences).
|
||||
|
||||
## Running
|
||||
|
||||
|
|
Loading…
Reference in New Issue