- private List<Entry<String, URL>> getChaptersPool(URL source,
- InputStream in, Progress pg) throws IOException {
- List<Entry<String, URL>> urls = new ArrayList<Entry<String, URL>>();
- int last = 1; // no pool/show when only one page
-
- @SuppressWarnings("resource")
- Scanner scan = new Scanner(in, "UTF-8");
- scan.useDelimiter("\\n");
- while (scan.hasNext()) {
- String line = scan.next();
- for (int pos = line.indexOf(source.getPath()); pos >= 0; pos = line
- .indexOf(source.getPath(), pos + source.getPath().length())) {
- int equalPos = line.indexOf("=", pos);
- int quotePos = line.indexOf("\"", pos);
- if (equalPos >= 0 && quotePos > equalPos) {
- String snum = line.substring(equalPos + 1, quotePos);
- try {
- int num = Integer.parseInt(snum);
- if (num > last) {
- last = num;
- }
- } catch (NumberFormatException e) {
- }
+ // no tags for pools
+ private List<String> getTags() {
+ List<String> tags = new ArrayList<String>();
+ if (isSearchOrSet(getSource())) {
+ String str = getTagsFromUrl(getSource());
+ for (String tag : str.split("\\+")) {
+ try {
+ tags.add(URLDecoder.decode(tag.trim(), "UTF-8").trim());
+ } catch (UnsupportedEncodingException e) {