diff --git a/SpotifyAPI/Local/Models/Track.cs b/SpotifyAPI/Local/Models/Track.cs index e8451d32..96eecbcf 100644 --- a/SpotifyAPI/Local/Models/Track.cs +++ b/SpotifyAPI/Local/Models/Track.cs @@ -24,10 +24,14 @@ namespace SpotifyAPI.Local.Models /// /// Checks if the track is an advert /// - /// true if the track is an advert, fals otherwise + /// true if the track is an advert, false otherwise public bool IsAd() { - return TrackType == "ad"; + if (TrackType == "ad") + return true; + if (Length == 0) + return true; + return false; } /// @@ -54,7 +58,7 @@ namespace SpotifyAPI.Local.Models break; } String raw; - using(WebClient wc = new WebClient()) + using (WebClient wc = new WebClient()) { wc.Proxy = null; raw = wc.DownloadString("http://open.spotify.com/album/" + AlbumResource.Uri.Split(new[] { ":" }, StringSplitOptions.None)[2]); @@ -98,7 +102,7 @@ namespace SpotifyAPI.Local.Models /// A Bitmap, which is the albumart public Bitmap GetAlbumArt(AlbumArtSize size) { - using(WebClient wc = new WebClient()) + using (WebClient wc = new WebClient()) { wc.Proxy = null; String url = GetAlbumArtUrl(size); @@ -112,6 +116,6 @@ namespace SpotifyAPI.Local.Models } } } - - + + }