[skip ci] Add info on extensions-lib 1.4 changes (#15311)

* [skip ci] Add info on extensions-lib 1.4 changes.

* [skip ci] Fix a wrong word.
This commit is contained in:
Alessandro Jean 2023-02-11 11:46:46 -03:00 committed by GitHub
parent 5093e6a5fa
commit 1128b1fcd8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 15 additions and 0 deletions

View File

@ -350,6 +350,9 @@ open class UriPartFilter(displayName: String, private val vals: Array<Pair<Strin
- If a `SManga` is cached, `fetchMangaDetails` will be only called when the user does a manual update (Swipe-to-Refresh).
- `fetchChapterList` is called to display the chapter list.
- **The list should be sorted descending by the source order**.
- `getMangaUrl` is called when the user taps "Open in WebView".
- If the source uses an API to fetch the data, consider overriding this method to return the manga absolute URL in the website instead.
- It defaults to the URL provided to the request in `mangaDetailsRequest`.
#### Chapter
@ -378,6 +381,9 @@ open class UriPartFilter(displayName: String, private val vals: Array<Pair<Strin
- In older versions, the default date is always the fetch date.
- In newer versions, this is the same if every (new) chapter has `0L` returned.
- However, if the source only provides the upload date of the latest chapter, you can now set it to the latest chapter and leave other chapters default. The app will automatically set it (instead of fetch date) to every new chapter and leave old chapters' dates untouched.
- `getChapterUrl` is called when the user taps "Open in WebView" in the reader.
- If the source uses an API to fetch the data, consider overriding this method to return the chapter absolute URL in the website instead.
- It defaults to the URL provided to the request in `pageListRequest`.
#### Chapter Pages
@ -407,6 +413,15 @@ To test if the URL intent filter is working as expected, you can try opening the
$ adb shell am start -d "<your-link>" -a android.intent.action.VIEW
```
#### Update strategy
There is some cases where titles in a source will always only have the same chapter list (i.e. immutable), and don't need to be included in a global update of the app because of that, saving a lot of requests and preventing causing unnecessary damage to the source servers. To change the update strategy of a `SManga`, use the `update_strategy` field. You can find below a description of the current possible values.
- `UpdateStrategy.ALWAYS_UPDATE`: Titles marked as always update will be included in the library update if they aren't excluded by additional restrictions.
- `UpdateStrategy.ONLY_FETCH_ONCE`: Titles marked as only fetch once will be automatically skipped during library updates. Useful for cases where the series is previously known to be finished and have only a single chapter, for example.
If not set, it defaults to `ALWAYS_UPDATE`.
#### Renaming existing sources
There is some cases where existing sources changes their name on the website. To correctly reflect these changes in the extension, you need to explicity set the `id` to the same old value, otherwise it will get changed by the new `name` value and users will be forced to migrate back to the source.