Merge pull request #4481 from FineFindus/fix/import-playlist-csv

fix(import): correctly import playlist csv
This commit is contained in:
Bnyro 2023-08-15 09:58:59 +02:00 committed by GitHub
commit ca107f5494
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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