fix(import): use collector

This commit is contained in:
FineFindus 2023-08-15 09:46:17 +02:00
parent 45031d3b50
commit 30847e41a5
No known key found for this signature in database
GPG Key ID: 64873EE210FF8E6B

View File

@ -169,7 +169,9 @@ object ImportHelper {
ImportFormat.YOUTUBECSV -> {
val playlist = PipedImportPlaylist()
activity.contentResolver.openInputStream(uri)?.use {
val lines = it.bufferedReader().use { reader -> reader.lines().toList() }
val lines = it.bufferedReader().use { reader ->
reader.lines().collect(Collectors.toList())
}
playlist.name = lines[1].split(",").reversed()[2]
var splitIndex = lines.indexOfFirst { line -> line.isBlank() }
// seek until playlist items table