mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-17 13:09:17 +01:00
Another fix for batoto chapter dates
This commit is contained in:
parent
eaab0f33ce
commit
758ebfca0b
@ -52,7 +52,7 @@ public class Batoto extends Source {
|
|||||||
public Batoto(Context context) {
|
public Batoto(Context context) {
|
||||||
super(context);
|
super(context);
|
||||||
|
|
||||||
datePattern = Pattern.compile("(\\d+|A)\\s+(.*?)s? ago.*");
|
datePattern = Pattern.compile("(\\d+|A|An)\\s+(.*?)s? ago.*");
|
||||||
dateFields = new HashMap<String, Integer>() {{
|
dateFields = new HashMap<String, Integer>() {{
|
||||||
put("second", Calendar.SECOND);
|
put("second", Calendar.SECOND);
|
||||||
put("minute", Calendar.MINUTE);
|
put("minute", Calendar.MINUTE);
|
||||||
@ -352,7 +352,7 @@ public class Batoto extends Source {
|
|||||||
|
|
||||||
if (m.matches()) {
|
if (m.matches()) {
|
||||||
String number = m.group(1);
|
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);
|
String unit = m.group(2);
|
||||||
|
|
||||||
Calendar cal = Calendar.getInstance();
|
Calendar cal = Calendar.getInstance();
|
||||||
|
Loading…
Reference in New Issue
Block a user