correção pub.out

This commit is contained in:
Felipe Domingos 2022-04-21 21:18:30 -03:00
parent 04cf0226e9
commit bf20a30cb4
3 changed files with 11 additions and 9 deletions

View File

@ -47,8 +47,8 @@
103 103
(R) G.I. Joe Origens: Snake Eyes (R) G.I. Joe Origens: Snake Eyes
105 105
83 107
80 103
(R) Golpes de Vingança (R) Golpes de Vingança
(R) Kimi: Alguém Está Escutando (R) Kimi: Alguém Está Escutando
(R) Licorice Pizza (R) Licorice Pizza

View File

@ -47,8 +47,8 @@
103 103
(R) G.I. Joe Origens: Snake Eyes (R) G.I. Joe Origens: Snake Eyes
105 105
83 107
80 103
(R) Golpes de Vingança (R) Golpes de Vingança
(R) Kimi: Alguém Está Escutando (R) Kimi: Alguém Está Escutando
(R) Licorice Pizza (R) Licorice Pizza

View File

@ -247,19 +247,21 @@ public class Film {
*/ */
private int hoursToMinutes(String value){ private int hoursToMinutes(String value){
// Data declaration // Data declaration
value = removeLetters(value);
int result = 0, minutes = 0; int result = 0, minutes = 0;
String[] splitValue = value.split(" "); String[] splitValue = value.split(" ");
if(splitValue.length > 1) { if(splitValue.length > 1) {
int hour = Integer.parseInt(splitValue[0]); int hour = Integer.parseInt(removeLetters(splitValue[0]));
minutes = Integer.parseInt(splitValue[1]); minutes = Integer.parseInt(removeLetters(splitValue[1]));
result = (60 * hour) + minutes; result = (60 * hour) + minutes;
} else { } else {
minutes = Integer.parseInt(splitValue[0]); if(splitValue[0].contains("h")){
minutes = Integer.parseInt(removeLetters(splitValue[0]))*60;
} else {
minutes = Integer.parseInt(removeLetters(splitValue[0]));
}
result = minutes; result = minutes;
} }
return result; return result;
} }