Skip to content

Commit 03be7f6

Browse files
authored
Update PlaylistSerializer.kt
1 parent 214302d commit 03be7f6

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

app/src/main/java/uk/akane/libphonograph/manipulator/PlaylistSerializer.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ object PlaylistSerializer {
128128
}
129129
val uriLine = Uri.decode(it)
130130
val link = listOf(Entry.parseUri(outFile, uriLine))
131-
val durationSeconds = extInfMatch?.groupValues?.get(1)?.toLong()
131+
val durationSeconds = extInfMatch?.groupValues?.get(1)?.toLongOrNull()
132132
val tvKeys = extInfMatch?.groupValues?.get(2)?.let {
133133
tvKeysRegex.findAll(it).map { match ->
134134
val key = match.groupValues[1]
@@ -1254,4 +1254,4 @@ object PlaylistSerializer {
12541254
}
12551255
}
12561256
class UnsupportedPlaylistFormatException(extension: String) : Exception(extension)
1257-
}
1257+
}

0 commit comments

Comments
 (0)