Skip to content
Snippets Groups Projects
Commit 629bf3bd authored by Duncan McNamara's avatar Duncan McNamara
Browse files

Ml: Fix ban / unban with spaces in the name

The callback called after ban / unban of a directory compares
non encoded directories from the StorageBrowserAdapter to a
VLCencoded directory string. Because of this after ban / unban the item
view was not updated after action.

Fixes #2596
parent b7632ca9
No related branches found
No related tags found
1 merge request!1527Bump libs to 3.5.2-eap1 / 0.13.4-eap1
Pipeline #261957 passed with stage
in 17 minutes and 13 seconds
......@@ -40,6 +40,7 @@ import kotlinx.coroutines.CoroutineExceptionHandler
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
import org.videolan.libvlc.util.AndroidUtil
import org.videolan.libvlc.util.VLCUtil
import org.videolan.medialibrary.MLServiceLocator
import org.videolan.medialibrary.interfaces.Medialibrary
import org.videolan.medialibrary.interfaces.media.MediaWrapper
......@@ -110,8 +111,8 @@ class StorageBrowserFragment : FileBrowserFragment(), BrowserContainer<MediaLibr
addBannedFoldersCallback { folder, _ ->
(adapter as StorageBrowserAdapter).bannedFolders = Medialibrary.getInstance().bannedFolders().toList()
adapter.dataset.forEachIndexed{ index, mediaLibraryItem ->
if ("${(mediaLibraryItem as Storage).uri}/" == folder) adapter.notifyItemChanged(index)
}
if ("${VLCUtil.encodeVLCString((mediaLibraryItem as Storage).uri.toString())}/" == folder) adapter.notifyItemChanged(index)
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment