mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-19 00:59:17 +01:00
Don't update the chapter list if the parsed list is empty (#18)
This commit is contained in:
parent
201650ced7
commit
6eb321bb06
@ -84,8 +84,12 @@ public abstract class Source extends BaseSource {
|
||||
public Observable<List<Chapter>> pullChaptersFromNetwork(final String mangaUrl) {
|
||||
return networkService
|
||||
.getStringResponse(getBaseUrl() + mangaUrl, requestHeaders, null)
|
||||
.flatMap(unparsedHtml ->
|
||||
Observable.just(parseHtmlToChapters(unparsedHtml)));
|
||||
.flatMap(unparsedHtml -> {
|
||||
List<Chapter> chapters = parseHtmlToChapters(unparsedHtml);
|
||||
return !chapters.isEmpty() ?
|
||||
Observable.just(chapters) :
|
||||
Observable.error(new Exception("No chapters found"));
|
||||
});
|
||||
}
|
||||
|
||||
public Observable<List<Page>> getCachedPageListOrPullFromNetwork(final String chapterUrl) {
|
||||
|
Loading…
Reference in New Issue
Block a user