JohnnyCrazy / SpotifyAPI-NET

:sound: A Client for the Spotify Web API, written in C#/.NET
http://johnnycrazy.github.io/SpotifyAPI-NET/
MIT License
1.51k stars 310 forks source link

VideoAd crash #41

Closed iUltimateLP closed 9 years ago

iUltimateLP commented 9 years ago

Okey, ad update is fine thanks. Spotify implements in his newest version those video ads, which are popping up and are louder than normal :/ This leads the API to crash too. I debugged it to take a look what the TrackType is when the VideoAd plays, and its just empty then. Maybe you add a String.IsNullOrEmpty(TrackType) somewhere, to make this work..

JohnnyCrazy commented 9 years ago

Video Ads? Wow. Can you give me full description on how the Track-Object looks like when this ad is played? I sadly can't reproduce since I never got any video ads on my free account (I was listening for about 2 hours :confused:)

JimmyAppelt commented 9 years ago

Track-Object when video is playing

AlbumResource = null ArtistResource = null Length = 0 TrackResource = null TrackType = null

It might be wise to check the length for the video ads instead of tracktype, the tracktype check works fine for the normal ads btw.

PR #42

iUltimateLP commented 9 years ago

Thanks @JimmyAppelt :+1:

JimmyAppelt commented 9 years ago

Np @iUltimateLP :facepunch:

Btw: To invoke ads i close spotify and restart it, when playing the current song and forward it ... an ad will be played afterwards (95% of the time)

JohnnyCrazy commented 9 years ago

Fixed in #42