From e6539a4c7cdd80c8388405f89e7f8d05214adb33 Mon Sep 17 00:00:00 2001 From: Jan-Pascal van Best Date: Mon, 16 Apr 2012 17:23:15 +0200 Subject: [PATCH] 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) --- .../org/vanbest/xmltv/AbstractEPGSource.java | 13 +++++---- src/main/java/org/vanbest/xmltv/Main.java | 1 + .../java/org/vanbest/xmltv/Programme.java | 13 +++++++++ src/main/java/org/vanbest/xmltv/RTL.java | 27 ++++++++++++++++--- src/main/java/org/vanbest/xmltv/TvGids.java | 18 +++++++++---- 5 files changed, 57 insertions(+), 15 deletions(-) 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("", " "). -- 2.39.5