File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
spotify_player/src/client Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -1409,6 +1409,18 @@ impl Client {
14091409 let show = self . get_a_show ( show_id, None ) . await ?;
14101410 let first_page = show. episodes . clone ( ) ;
14111411
1412+ // Copy first_page but use Page<Option<SimplifiedEpisode>> instead of Page<SimplifiedEpisode>
1413+ // This is a temporary fix for https://github.com/aome510/spotify-player/issues/663
1414+ let first_page = rspotify:: model:: Page {
1415+ items : first_page. items . into_iter ( ) . map ( Some ) . collect ( ) ,
1416+ href : first_page. href ,
1417+ limit : first_page. limit ,
1418+ next : first_page. next ,
1419+ offset : first_page. offset ,
1420+ previous : first_page. previous ,
1421+ total : first_page. total ,
1422+ } ;
1423+
14121424 // converts `rspotify::model::FullShow` into `state::Show`
14131425 let show: Show = show. into ( ) ;
14141426
@@ -1417,6 +1429,7 @@ impl Client {
14171429 . all_paging_items ( first_page, & Query :: new ( ) )
14181430 . await ?
14191431 . into_iter ( )
1432+ . flatten ( )
14201433 . map ( std:: convert:: Into :: into)
14211434 . collect :: < Vec < _ > > ( ) ;
14221435
You can’t perform that action at this time.
0 commit comments