Automattic / Automattic/pocket-casts-android
The voice command to play next episode in Up Next should support user files.
- Dominant language
- Kotlin
- Stars
- 2.8k
- Forks
- 308
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 143
Description
The code hasn't been implemented to play the next episode in the Up Next from a voice command if the episode is a user's file.
**PlaybackService.kt**
```
private fun performSearch(searchTerm: String): List {
val searchResults = mutableListOf()
val query = searchTerm.trim { it <= ' ' }.lowercase()
if (query.startsWith("up next") || query.startsWith("next episode") || query.startsWith("next podcast")) {
val upNextEpisodes = playbackManager.upNextQueue.queueEpisodes.take(10)
for (episode in upNextEpisodes) {
if (episode is Episode) {
podcastManager.findPodcastByUuid(episode.podcastUuid)?.let { parentPodcast ->
addToResultsIfNotExists(AutoConverter.convertEpisodeToMediaItem(context = this, episode = episode, parentPodcast = parentPodcast), searchResults)
}
} else {
// TODO: UserEpisode
}
}
return searchResults
}
```
Contributor guide
Research direction
Start in PlaybackService.kt at performSearch and trace how Up Next episodes are converted into search results. Inspect the TODO branch for UserEpisode and the surrounding queue handling, then verify that a voice search for “up next” returns user-file episodes as well as regular episodes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kotlin
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100