Add filter by downloaded chapter. When searching manga by URL, also check the source

This commit is contained in:
inorichi
2015-12-02 14:56:47 +01:00
parent d6257cf52e
commit 6b8ccbe01b
5 changed files with 38 additions and 7 deletions

View File

@@ -108,13 +108,13 @@ public class DatabaseHelper {
.prepare();
}
public PreparedGetListOfObjects<Manga> getManga(String url) {
public PreparedGetListOfObjects<Manga> getManga(String url, int sourceId) {
return db.get()
.listOfObjects(Manga.class)
.withQuery(Query.builder()
.table(MangaTable.TABLE)
.where(MangaTable.COLUMN_URL + "=?")
.whereArgs(url)
.where(MangaTable.COLUMN_URL + "=? AND " + MangaTable.COLUMN_SOURCE + "=?")
.whereArgs(url, sourceId)
.build())
.prepare();
}