@@ -84,21 +84,21 @@ public async void UpdateTrack(Track track)
8484 if ( track . IsAd ( ) )
8585 return ; //Don't process further, maybe null values
8686
87- titleLinkLabel . Text = track . TrackResource . Name ;
88- titleLinkLabel . Tag = track . TrackResource . Uri ;
87+ titleLinkLabel . Text = track . TrackResource ? . Name ;
88+ titleLinkLabel . Tag = track . TrackResource ? . Uri ;
8989
90- artistLinkLabel . Text = track . ArtistResource . Name ;
91- artistLinkLabel . Tag = track . ArtistResource . Uri ;
90+ artistLinkLabel . Text = track . ArtistResource ? . Name ;
91+ artistLinkLabel . Tag = track . ArtistResource ? . Uri ;
9292
93- albumLinkLabel . Text = track . AlbumResource . Name ;
94- albumLinkLabel . Tag = track . AlbumResource . Uri ;
93+ albumLinkLabel . Text = track . AlbumResource ? . Name ;
94+ albumLinkLabel . Tag = track . AlbumResource ? . Uri ;
9595
96- SpotifyUri uri = track . TrackResource . ParseUri ( ) ;
96+ SpotifyUri uri = track . TrackResource ? . ParseUri ( ) ;
9797
98- trackInfoBox . Text = $@ "Track Info - { uri . Id } ";
98+ trackInfoBox . Text = $@ "Track Info - { uri ? . Id } ";
9999
100- bigAlbumPicture . Image = await track . GetAlbumArtAsync ( AlbumArtSize . Size640 ) ;
101- smallAlbumPicture . Image = await track . GetAlbumArtAsync ( AlbumArtSize . Size160 ) ;
100+ bigAlbumPicture . Image = track . AlbumResource != null ? await track . GetAlbumArtAsync ( AlbumArtSize . Size640 ) : null ;
101+ smallAlbumPicture . Image = track . AlbumResource != null ? await track . GetAlbumArtAsync ( AlbumArtSize . Size160 ) : null ;
102102 }
103103
104104 public void UpdatePlayingStatus ( bool playing )
0 commit comments