Skip to content

Commit

Permalink
Fix false-positives on local music with missing track numbers
Browse files Browse the repository at this point in the history
fixes #57
  • Loading branch information
artemgordinskiy committed May 17, 2015
1 parent 091a95f commit 9c5a8e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Spotifree/SpotifyController.m
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ - (BOOL)isAnAd {
NSString * currentTrackUrl = self.spotify.currentTrack.spotifyUrl;

@try {
isAnAd = ([currentTrackUrl hasPrefix:@"spotify:ad"] || currentTrackNumber == 0);
isAnAd = ([currentTrackUrl hasPrefix:@"spotify:ad"] || (currentTrackNumber == 0 && ![currentTrackUrl hasPrefix:@"spotify:local"]));
}
@catch (NSException *exception) {
isAnAd = NO;
Expand Down

0 comments on commit 9c5a8e7

Please sign in to comment.