Fix search duration parsing

This commit is contained in:
Mattia 2021-03-04 11:01:11 +01:00
parent 82f3deac7e
commit 5385ba1628
1 changed files with 3 additions and 3 deletions

View File

@ -95,13 +95,13 @@ class SearchList extends DelegatingList<Video> {
}
if (parts.length == 2) {
return Duration(
minutes: int.parse(parts[1]), seconds: int.parse(parts.first));
minutes: int.parse(parts[0]), seconds: int.parse(parts[1]));
}
if (parts.length == 3) {
return Duration(
hours: int.parse(parts[2]),
hours: int.parse(parts[0]),
minutes: int.parse(parts[1]),
seconds: int.parse(parts[0]));
seconds: int.parse(parts[2]));
}
// Shouldn't reach here.
throw Error();