mirror of
https://github.com/Sarsoo/Spotify.NET.git
synced 2024-12-24 23:16:28 +00:00
Merge pull request #42 from JimmyAppelt/master
Track Length check to confirm video ad is playing and crash related artist tab
This commit is contained in:
commit
be0e9684f8
@ -24,10 +24,14 @@ namespace SpotifyAPI.Local.Models
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Checks if the track is an advert
|
/// Checks if the track is an advert
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>true if the track is an advert, fals otherwise</returns>
|
/// <returns>true if the track is an advert, false otherwise</returns>
|
||||||
public bool IsAd()
|
public bool IsAd()
|
||||||
{
|
{
|
||||||
return TrackType == "ad";
|
if (TrackType == "ad")
|
||||||
|
return true;
|
||||||
|
if (Length == 0)
|
||||||
|
return true;
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -37,7 +41,7 @@ namespace SpotifyAPI.Local.Models
|
|||||||
/// <returns>A String, which is the URL to the Albumart</returns>
|
/// <returns>A String, which is the URL to the Albumart</returns>
|
||||||
public String GetAlbumArtUrl(AlbumArtSize size)
|
public String GetAlbumArtUrl(AlbumArtSize size)
|
||||||
{
|
{
|
||||||
if (AlbumResource.Uri == null || AlbumResource.Uri.Contains("local") || AlbumResource.Uri.Contains("spotify:album:0000000000000000000000"))
|
if (AlbumResource.Uri == null || !AlbumResource.Uri.Contains("spotify:album:") || AlbumResource.Uri.Contains("spotify:album:0000000000000000000000"))
|
||||||
return "";
|
return "";
|
||||||
|
|
||||||
int albumsize = 0;
|
int albumsize = 0;
|
||||||
@ -112,6 +116,4 @@ namespace SpotifyAPI.Local.Models
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user