]> www.vanbest.org Git - tv_grab_nl_java/commitdiff
Fix some empty synop / description
authorJP <jp@here>
Tue, 13 Mar 2012 16:02:15 +0000 (17:02 +0100)
committerJP <jp@here>
Tue, 13 Mar 2012 16:02:15 +0000 (17:02 +0100)
tv_grab_nl_java/src/org/vanbest/xmltv/ProgrammeDetails.java

index 2638c5cce0b73f813b3564367536f59fbaa7e275..2d4b9f73d194807c40acb7a95e55ce511c8d6500 100644 (file)
@@ -20,6 +20,15 @@ public class ProgrammeDetails implements Serializable {
                this.titel = org.apache.commons.lang.StringEscapeUtils.unescapeHtml(titel);
                this.genre = org.apache.commons.lang.StringEscapeUtils.unescapeHtml(genre);
                this.synop = org.apache.commons.lang.StringEscapeUtils.unescapeHtml(synop);
+               this.synop = this.synop.replaceAll("<br>", " ").
+                               replaceAll("<br />", " ").
+                               replaceAll("<p>", " ").
+                               replaceAll("</p>", " ").
+                               replaceAll("<strong>", " ").
+                               replaceAll("</strong>", " ").
+                               replaceAll("<em>", " ").
+                               replaceAll("</em>", " ").
+                               trim();
                if ((synop == null || synop.isEmpty()) && ( genre == null || (!genre.toLowerCase().equals("movies") && !genre.toLowerCase().equals("film")))) {
                        String[] parts = p.titel.split("[[:space:]]*:[[:space:]]*", 2);
                        if (parts.length >= 2 ) {
@@ -29,14 +38,6 @@ public class ProgrammeDetails implements Serializable {
                                System.out.println("Splitting title to : \"" + p.titel + "\"; synop: \"" + synop + "\"");
                        }
                }
-               this.synop = this.synop.replaceAll("<br>", " ");
-               this.synop = this.synop.replaceAll("<br />", " ");
-               this.synop = this.synop.replaceAll("<p>", " ");
-               this.synop = this.synop.replaceAll("</p>", " ");
-               this.synop = this.synop.replaceAll("<strong>", " ");
-               this.synop = this.synop.replaceAll("</strong>", " ");
-               this.synop = this.synop.replaceAll("<em>", " ");
-               this.synop = this.synop.replaceAll("</em>", " ");
                this.presentatie = org.apache.commons.lang.StringEscapeUtils.unescapeHtml(presentatie);
                this.acteursnamen_rolverdeling = org.apache.commons.lang.StringEscapeUtils.unescapeHtml(acteursnamen_rolverdeling);
                this.regisseur = org.apache.commons.lang.StringEscapeUtils.unescapeHtml(regisseur);