Open hadi-norouzi opened 1 month ago
I would suggest adding only one screen for search and display all search results in one place (for now: Movies and shows. Later we can display actors and episodes as well)
I would suggest adding only one screen for search and display all search results in one place (for now: Movies and shows. Later we can display actors and episodes as well)
So do you think I should add a tab in home?
Yes, That would be great. And what do you think of this sketch?
Yes, That would be great. And what do you think of this sketch?
It is great. I will do it.
Yes, That would be great. And what do you think of this sketch?
Hi Mr. @moallemi. TMDB has three API for search, movie, tv shows and multi search. In multi search API it gives me dynamic list of movie or show or person (actor). what would you suggest to parse these dynamic data? it must be handled in API layer or datasource layer? It's better to have another response parser for it or just return Any type and handle this mapping inside datasource?
Dear @hadi-norouzi,
I'd suggest adding a separate search everywhere:
:data:api:tmdb
-> TmdbSearchService:data:model
, define new data type
sealed class SearchResult {
data class Video(val item videoThumbnail: VideoThumbnail)
// later we can add other search result types
// data class Actor(val item actor)
}
:data:tmdb-search
module, in here we return list of a new model called
so we need a new mapper to map the tmdb search result to our custom SearchResult
data type
then we will have:
interface TmdbSearchRepository {
fun searchStream(query: String): Flow<PagingData<SearchResult>>
}
:domain:tmdb-search
in domain and so onLet me know if you have any questions.
Is there an existing issue for this?
Related app
All - Android
Describe the problem
As a user, I want to have a search functionality in the movies section or somewhere in the app.
Describe the solution
No response
Additional context
No response
Code of Conduct