mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-13 13:50:30 +05:30
Allow importing multiple playlist at once (#3752)
This commit is contained in:
parent
d76dcf12b2
commit
9183be810e
@ -62,8 +62,8 @@ class BackupRestoreSettings : BasePreferenceFragment() {
|
||||
/**
|
||||
* result listeners for importing and exporting playlists
|
||||
*/
|
||||
private val getPlaylistsFile = registerForActivityResult(ActivityResultContracts.GetContent()) {
|
||||
it?.let {
|
||||
private val getPlaylistsFile = registerForActivityResult(ActivityResultContracts.OpenMultipleDocuments()) {
|
||||
it?.forEach {
|
||||
CoroutineScope(Dispatchers.IO).launch {
|
||||
ImportHelper.importPlaylists(requireActivity(), it)
|
||||
}
|
||||
@ -94,7 +94,7 @@ class BackupRestoreSettings : BasePreferenceFragment() {
|
||||
|
||||
val importPlaylists = findPreference<Preference>("import_playlists")
|
||||
importPlaylists?.setOnPreferenceClickListener {
|
||||
getPlaylistsFile.launch("*/*")
|
||||
getPlaylistsFile.launch(arrayOf("*/*"))
|
||||
true
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user