LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File tvbrowser-3.1-ratings.patch of Package tvbrowser (Project home:dnh)

--- tvbrowser-3.1/src/util/program/ProgramUtilities.java.orig	2012-06-26 05:36:17.000000000 +0200
+++ tvbrowser-3.1/src/util/program/ProgramUtilities.java	2012-08-05 02:49:30.000000000 +0200
@@ -648,16 +648,23 @@
       return -1;
     }
     // German FSK
-    if (rating.toUpperCase().startsWith("FSK")) {
+    if ( rating.equalsIgnoreCase("K.A.") || 
+         rating.toUpperCase().startsWith("UNBEK") ||
+         rating.toUpperCase().startsWith("OHNE ALTERS") )
+    {
+      return -1;
+    }
+    if (rating.toUpperCase().startsWith("FSK") || 
+        rating.toUpperCase().startsWith("AB ") ) {
       String num = rating.substring(3).trim();
       if (num.startsWith("-")) {
         num = num.substring(1).trim();
-        try {
-          int number = Integer.parseInt(num);
-          return number;
-        } catch (NumberFormatException e) {
-          e.printStackTrace();
-        }
+      }
+      try {
+        int number = Integer.parseInt(num);
+        return number;
+      } catch (NumberFormatException e) {
+        e.printStackTrace();
       }
     }
     // numerical codes