Advertisement
Nina611

Untitled

Feb 10th, 2016
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.02 KB | None | 0 0
  1. if (i == 90) {
  2. infoFilm = Main.DBHandler.getMoviebyID(infoFilmID);
  3.  
  4. if (t.contains("Schauspieler") || t.contains("Actor") || t.contains("cast") || t.contains("schauspieler")) {
  5. String f = infoFilm.getCast().toString();
  6. f = f.replace("]", "");
  7. f = f.replace("[", "");
  8. for (int l = 0; l < 10; l++) {
  9. f = f.replace(Integer.toString(l), "");
  10. }
  11. Chat.i = Chat.i - 1; //return increases it to 8, which is "show me more results"
  12. return " Hier ist eine Liste aller Schauspieler: "+ f ;
  13. } else if (t.contains("review") || t.contains("Rezension") || t.contains("meinung") || t.contains("rezension")) {
  14. String f = "";
  15. try{ f = infoFilm.getReviews().get(0).getContent();
  16. f = f.replaceAll("\\\\\\\\n", "");
  17. f = f.replace("*", "");
  18.  
  19.  
  20. }
  21. catch(Exception e){
  22. Chat.i = Chat.i - 1;
  23. return " Leiden wurden für " + infoFilm.getOriginalTitle() + " noch keine Rezensionen verfasst";
  24. }
  25.  
  26. Chat.i = Chat.i - 1; //return increases it to 8, which is "show me more results"
  27. return "Das ist die Meinung eines Zuschauers zu "+ infoFilm.getOriginalTitle() + ": \n" + f;
  28. } else if (t.contains("rating") || t.contains("ranking") || t.contains("bewertung") || t.contains("wertung")) {
  29. float f = infoFilm.getVoteAverage();
  30. Chat.i = Chat.i - 1; //return increases it to 8, which is "show me more results"
  31. return infoFilm.getOriginalTitle() + " wurde bewertet mit: " +f;
  32. } else if (t.contains("runtime") || t.contains("laufzeit") || t.contains("länge") || t.contains("laenge")) {
  33. float f = infoFilm.getRuntime();
  34. Chat.i = Chat.i - 1; //return increases it to 8, which is "show me more results"
  35. return infoFilm.getOriginalTitle() + " ist " + f +" Minuten lang.";
  36. } else if (t.contains("alter") || t.contains("usk") || t.contains("freigabe") || t.contains("18")) {
  37. boolean f = infoFilm.isAdult();
  38. String k = "";
  39. if (f) {
  40. k = "Dieser Film ist erst ab 18 Jahren freigegeben!";
  41. } else {
  42. k = "Dieser Film ist unter 18 Jahren freigegeben.";
  43. }
  44. Chat.i = Chat.i - 1; //return increases it to 8, which is "show me more results"
  45. return k ;
  46. }
  47. else if (t.contains("danke") || t.contains("ok") || t.contains("super") || t.contains("fertig")) {
  48. Chat.i=499;
  49. return "Gerne geschehen";
  50. }
  51. else {
  52. Chat.i = Chat.i - 1;
  53. return "Dazu habe ich leider keine Informationen";
  54. }
  55.  
  56. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement