src/main/java/fr/poulpogaz/animescandl/scan/SushiScan.java
/**
     * Using text and filter at the same time doesn't work
     */
Using text and filter at the same time doesn't work
Using text and filter at the same time doesn ' t work
@Override
    public List<Manga> search(String search, FilterList filter)
            throws IOException, WebsiteException, InterruptedException {
        if (filter instanceof UrlFilterList urlFilterList) {
            List<Manga> mangas = new ArrayList<>();
            if (search == null || search.isBlank()) {
                int page = 1 + filter.getOffset() / 20;
                int offset = filter.getOffset() % 20;
                while (mangas.size() < filter.getLimit()
                        && searchWithFilters(page, offset, urlFilterList, mangas)) {
                    page++;
                    offset = 0;
                }
            } else {
                int page = 1 + filter.getOffset() / 10;
                int offset = filter.getOffset() % 10;
                while (mangas.size() < filter.getLimit()
                        && searchWithText(page, offset, urlFilterList.getLimit(), search, mangas)) {
                    page++;
                    offset = 0;
                }
            }
            return mangas;
        }
        return List.of();
    }
@ Override public List < Manga > search ( String search , FilterList filter ) throws IOException , WebsiteException , InterruptedException { if ( filter instanceof UrlFilterList urlFilterList ) { List < Manga > mangas = new ArrayList < > ( ) ; if ( search == null || search . isBlank ( ) ) { int page = 1 + filter . getOffset ( ) / 20 ; int offset = filter . getOffset ( ) % 20 ; while ( mangas . size ( ) < filter . getLimit ( ) && searchWithFilters ( page , offset , urlFilterList , mangas ) ) { page ++ ; offset = 0 ; } } else { int page = 1 + filter . getOffset ( ) / 10 ; int offset = filter . getOffset ( ) % 10 ; while ( mangas . size ( ) < filter . getLimit ( ) && searchWithText ( page , offset , urlFilterList . getLimit ( ) , search , mangas ) ) { page ++ ; offset = 0 ; } } return mangas ; } return List . of ( ) ; }
Using text and filter at the same time doesn't work
Using text and filter at the same time doesn ' t work