Skip to content

Commit

Permalink
Merge pull request #89 from tobexyz/feat/issue88
Browse files Browse the repository at this point in the history
issue #88 avoid exception if duration is not parsable
  • Loading branch information
tobexyz authored Jan 1, 2024
2 parents 35de2cf + 345a5ce commit 65bf155
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion yaacc/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
buildscript {

dependencies {
classpath 'com.android.tools.build:gradle:8.1.2'
classpath 'com.android.tools.build:gradle:8.1.3'

}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,10 @@ private ContentBrowser findBrowserFor(String objectID) {


public String formatDuration(String millisStr) {

if (millisStr == null || millisStr.equals("")) {
return String.format(Locale.US, "%02d:%02d:%02d", 0L, 0L, 0L);
}
String res;
long duration = Long.parseLong(millisStr);
long hours = TimeUnit.MILLISECONDS.toHours(duration)
Expand Down

0 comments on commit 65bf155

Please sign in to comment.