daspartho / SpotiByeAds

Skip spotify ads by automatically restarting application when ad plays
GNU General Public License v3.0
285 stars 41 forks source link

TypeError : 'method' object is not subscriptable #52

Closed atridey closed 3 years ago

atridey commented 3 years ago

An error was raised by line 71 (time.sleep((spotify.current_user_playing_track['duration_ms']/1000) - 6) #Stop us from getting rate limited from spotify API (It just waits for the song to end)). A quick Google search showed the fix was to replace the brackets in spotify.current_user_playing_track['duration_ms'] with parenthesis. I'll create a PR for it.

atridey commented 3 years ago

Converted to a draft as it seems to break the ad blocking

atridey commented 3 years ago

If it means anything, I get the error TypeError: current_user_playing_track() takes 1 positional argument but 2 were given. As far as I can tell it only gets the argument 'duration_ms', so I'm not sure what could be causing it.

AnonymouX47 commented 3 years ago

The script was broken by #48... Also see there the reason why this approach causes ads to not be skipped.

I've already opened a PR fixing the bug introduced (#51) and there's more on the "not skipping ads" issue there.

atridey commented 3 years ago

Looks like that fixed it, I'm closing this.