Checklist
Feature description
I am inside a channel, but I want to search for videos on that channel with specific terms in the title, without having to do a generate search and check if that video is from that channel or not.
This filter would not add http calls, but would only filter videos that do not contain those terms in the title.
So having two variables, items remains with all possible videos, filteredItems, instead if there is a search term it applies the filter.
Why do you want this feature?
Ability to search within a video channel with specific title terms.
Additional information
Example code:
data class VideoItem(val id: Int, val name: String, val url: String)
fun filterItems(items: List<VideoItem>, searchTerm: String): List<VideoItem> {
return items.filter { it.name.contains(searchTerm, ignoreCase = true) }
}
fun main() {
val items = listOf(
VideoItem(1, "Video 1", "https://example.com/video1"),
VideoItem(2, "Video 2", "https://example.com/video2"),
VideoItem(3, "Tutorial", "https://example.com/tutorial"),
VideoItem(4, "Demo", "https://example.com/demo")
)
val search = "video"
val filteredItems = if (search.isNotEmpty()) filterItems(items, search) else items
filteredItems.forEach { println(it) }
}
Checklist
Feature description
I am inside a channel, but I want to search for videos on that channel with specific terms in the title, without having to do a generate search and check if that video is from that channel or not.
This filter would not add http calls, but would only filter videos that do not contain those terms in the title.
So having two variables, items remains with all possible videos, filteredItems, instead if there is a search term it applies the filter.
Why do you want this feature?
Ability to search within a video channel with specific title terms.
Additional information
Example code: