From 758ebfca0b2c3b9faad2783fda4360f4e2853584 Mon Sep 17 00:00:00 2001 From: inorichi Date: Sat, 5 Dec 2015 15:49:48 +0100 Subject: [PATCH] Another fix for batoto chapter dates --- .../kanade/mangafeed/data/source/online/english/Batoto.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/kanade/mangafeed/data/source/online/english/Batoto.java b/app/src/main/java/eu/kanade/mangafeed/data/source/online/english/Batoto.java index 7acbf1afe5..02ee94dd03 100644 --- a/app/src/main/java/eu/kanade/mangafeed/data/source/online/english/Batoto.java +++ b/app/src/main/java/eu/kanade/mangafeed/data/source/online/english/Batoto.java @@ -52,7 +52,7 @@ public class Batoto extends Source { public Batoto(Context context) { super(context); - datePattern = Pattern.compile("(\\d+|A)\\s+(.*?)s? ago.*"); + datePattern = Pattern.compile("(\\d+|A|An)\\s+(.*?)s? ago.*"); dateFields = new HashMap() {{ put("second", Calendar.SECOND); put("minute", Calendar.MINUTE); @@ -352,7 +352,7 @@ public class Batoto extends Source { if (m.matches()) { String number = m.group(1); - int amount = number.equals("A") ? 1 : Integer.parseInt(m.group(1)); + int amount = number.contains("A") ? 1 : Integer.parseInt(m.group(1)); String unit = m.group(2); Calendar cal = Calendar.getInstance();