mirror of
https://github.com/aniyomiorg/aniyomi.git
synced 2024-11-27 16:26:29 +03:00
Fix MAL autoupdate function.
This commit is contained in:
parent
0a7f8711ad
commit
a32c1b5eb2
2 changed files with 2 additions and 2 deletions
|
@ -60,7 +60,7 @@ public class UpdateMangaSyncService extends Service {
|
||||||
private void updateLastChapterRead(MangaSync mangaSync, int startId) {
|
private void updateLastChapterRead(MangaSync mangaSync, int startId) {
|
||||||
MangaSyncService sync = syncManager.getSyncService(mangaSync.sync_id);
|
MangaSyncService sync = syncManager.getSyncService(mangaSync.sync_id);
|
||||||
|
|
||||||
subscriptions.add(Observable.fromCallable(() -> sync.update(mangaSync))
|
subscriptions.add(Observable.defer(() -> sync.update(mangaSync))
|
||||||
.flatMap(response -> db.insertMangaSync(mangaSync).createObservable())
|
.flatMap(response -> db.insertMangaSync(mangaSync).createObservable())
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
|
|
|
@ -115,7 +115,7 @@ public class ChapterRecognitionTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testWithVersionBefore() {
|
public void testWithVersionBefore() {
|
||||||
// It should be 84, not 2084)
|
// It should be 84, not 2084
|
||||||
Chapter c = createChapter("Onepunch-Man Punch Ver002 084 : Creeping Darkness");
|
Chapter c = createChapter("Onepunch-Man Punch Ver002 084 : Creeping Darkness");
|
||||||
ChapterRecognition.parseChapterNumber(c, randomManga);
|
ChapterRecognition.parseChapterNumber(c, randomManga);
|
||||||
assertThat(c.chapter_number, is(84f));
|
assertThat(c.chapter_number, is(84f));
|
||||||
|
|
Loading…
Reference in a new issue