Add filter tag namespace

This commit is contained in:
seven332 committed 2016-03-26 22:02:41 +08:00
1 parent 8a1c0c0766
commit 10c814fc2b
8 files changed
+141 -78

No files matched your search

@@ -218,7 +218,7 @@ public class EhEngine {
// Filter tag
for (int i = 0, n = list.size(); i < n; i++) {
GalleryInfo info = list.get(i);
if (!sEhFilter.filterTag(info)) {
if (!sEhFilter.filterTag(info) || !sEhFilter.filterTagNamespace(info)) {
list.remove(i);
i--;
n--;
@@ -616,29 +616,9 @@ public class EhEngine {
throw e;
}
// Filter title
for (int i = 0, n = list.size(); i < n; i++) {
GalleryInfo info = list.get(i);
if (!sEhFilter.filterTitle(info)) {
list.remove(i);
i--;
n--;
}
}
if (list.size() > 0) {
// Fill by api
fillGalleryListByApi(task, okHttpClient, list);
// Filter uploader and tag
for (int i = 0, n = list.size(); i < n; i++) {
GalleryInfo info = list.get(i);
if (!sEhFilter.filterUploader(info) || !sEhFilter.filterTag(info)) {
list.remove(i);
i--;
n--;
}
}
}
return list;