File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3232 client ID on Android platform.
3333- [ connect] Fix "play" command not handled if missing "offset" property
3434- [ discovery] Fix libmdns zerconf setup errors not propagating to the main task.
35+ - [ metadata] ` Show::trailer_uri ` is now optional since it isn't always present (breaking)
3536
3637### Removed
3738
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ pub struct Show {
2727 pub media_type : ShowMediaType ,
2828 pub consumption_order : ShowConsumptionOrder ,
2929 pub availability : Availabilities ,
30- pub trailer_uri : SpotifyId ,
30+ pub trailer_uri : Option < SpotifyId > ,
3131 pub has_music_and_talk : bool ,
3232 pub is_audiobook : bool ,
3333}
@@ -63,7 +63,12 @@ impl TryFrom<&<Self as Metadata>::Message> for Show {
6363 media_type : show. media_type ( ) ,
6464 consumption_order : show. consumption_order ( ) ,
6565 availability : show. availability . as_slice ( ) . try_into ( ) ?,
66- trailer_uri : SpotifyId :: from_uri ( show. trailer_uri ( ) ) ?,
66+ trailer_uri : show
67+ . trailer_uri
68+ . as_deref ( )
69+ . filter ( |s| !s. is_empty ( ) )
70+ . map ( SpotifyId :: from_uri)
71+ . transpose ( ) ?,
6772 has_music_and_talk : show. music_and_talk ( ) ,
6873 is_audiobook : show. is_audiobook ( ) ,
6974 } )
You can’t perform that action at this time.
0 commit comments