mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-01-07 18:10:31 +05:30
Merge pull request #4481 from FineFindus/fix/import-playlist-csv
fix(import): correctly import playlist csv
This commit is contained in:
commit
ca107f5494
@ -169,7 +169,9 @@ object ImportHelper {
|
|||||||
ImportFormat.YOUTUBECSV -> {
|
ImportFormat.YOUTUBECSV -> {
|
||||||
val playlist = PipedImportPlaylist()
|
val playlist = PipedImportPlaylist()
|
||||||
activity.contentResolver.openInputStream(uri)?.use {
|
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]
|
playlist.name = lines[1].split(",").reversed()[2]
|
||||||
var splitIndex = lines.indexOfFirst { line -> line.isBlank() }
|
var splitIndex = lines.indexOfFirst { line -> line.isBlank() }
|
||||||
// seek until playlist items table
|
// seek until playlist items table
|
||||||
|
Loading…
Reference in New Issue
Block a user