File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -1336,10 +1336,10 @@ impl WebApi {
13361336 shows : Option < Page < Arc < Show > > > ,
13371337 }
13381338
1339- let topics = topics. iter ( ) . map ( SearchTopic :: as_str) . join ( "," ) ;
1339+ let type_query_param = topics. iter ( ) . map ( SearchTopic :: as_str) . join ( "," ) ;
13401340 let request = & RequestBuilder :: new ( "v1/search" , Method :: Get , None )
13411341 . query ( "q" , query. replace ( " " , "%20" ) )
1342- . query ( "type" , & topics )
1342+ . query ( "type" , & type_query_param )
13431343 . query ( "limit" , limit. to_string ( ) )
13441344 . query ( "marker" , "from_token" ) ;
13451345
@@ -1350,9 +1350,11 @@ impl WebApi {
13501350 let tracks = result. tracks . map_or_else ( Vector :: new, |page| page. items ) ;
13511351 let playlists = result. playlists . map_or_else ( Vector :: new, |page| page. items ) ;
13521352 let shows = result. shows . map_or_else ( Vector :: new, |page| page. items ) ;
1353+ let topic = ( topics. len ( ) == 1 ) . then_some ( topics[ 0 ] ) ;
13531354
13541355 Ok ( SearchResults {
13551356 query : query. into ( ) ,
1357+ topic,
13561358 artists,
13571359 albums,
13581360 tracks,
You can’t perform that action at this time.
0 commit comments