From: Jan-Pascal van Best Date: Mon, 16 Apr 2012 15:23:15 +0000 (+0200) Subject: Fix crash when getting tvgids detail page fails X-Git-Tag: 0.9.1~2 X-Git-Url: http://www.vanbest.org/gitweb/?a=commitdiff_plain;h=e6539a4c7cdd80c8388405f89e7f8d05214adb33;p=tv_grab_nl_java Fix crash when getting tvgids detail page fails - Fix exception when more than MAX_TRIES tries are needed for fetching a url, ignore and log instead - Set loglevel to 0 when --debug is used - Remove

tags from description text (TvGids) --- diff --git a/src/main/java/org/vanbest/xmltv/AbstractEPGSource.java b/src/main/java/org/vanbest/xmltv/AbstractEPGSource.java index d9e2684..b24e27a 100644 --- a/src/main/java/org/vanbest/xmltv/AbstractEPGSource.java +++ b/src/main/java/org/vanbest/xmltv/AbstractEPGSource.java @@ -55,8 +55,7 @@ public abstract class AbstractEPGSource implements EPGSource { Thread.sleep(config.niceMilliseconds); StringBuffer buf = new StringBuffer(); boolean done = false; - IOException finalException = null; - for(int count = 0; count= 2 ) { - if (!config.quiet) { + if (parts.length >= 2 && parts[0].length()>=5) { + if (config.logLevel >= Config.LOG_DEBUG) { System.out.println("Splitting title from \"" + t.title + "\" to: \"" + parts[0].trim() + "\"; sub-title: \"" + parts[1].trim() + "\""); } t.title = parts[0].trim(); @@ -323,7 +331,7 @@ public class TvGids extends AbstractEPGSource implements EPGSource { if(key.equals("synop")) { value = value.replaceAll("
", " "). replaceAll("
", " "). - replaceAll("

", " "). + replaceAll("]*>", " "). replaceAll("

", " "). replaceAll("", " "). replaceAll("", " ").