Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

[Stopify] - Spotify With No Audio Ads (w/o banned lists etc)


  • Please log in to reply
94 replies to this topic

Poll: Would you be interested to see this developed further? (21 member(s) have cast votes)

Would you be interested to see this developed further?

  1. Yes (79 votes [100.00%])

    Percentage of vote: 100.00%

  2. No (0 votes [0.00%])

    Percentage of vote: 0.00%

Vote Guests cannot vote
tuna
  • Members
  • 158 posts
  • Last active: Dec 28 2012 04:50 PM
  • Joined: 03 Oct 2007

Hi guys, many thanks for all your responses - sorry I've not checked back in a long while!

I can upload the original files if you want, but my interests have shifted away from autohotkey (into neural networks [R/SLUS] and parallel processing [OpenMP/MPI/CUDA]). As such, the code is in need of a major overhaul given the changes to both AHK_L an Spotify over the past year - indeed I set up a licensing framework within the application to prevent use when it's not been updated for too long/obsolete.

 

I'd be delighted to assist, but would require developers within the community with a good measure of both time and determination to get the code up to scratch. Let me know below if anyone's interested in taking over.

 

I will re-up the links should the community wish to tinker:

 

Last source update - for developers only (end-users please be patient):

http://www.mediafire...9kpxifcc44i11aq

 

Many thanks.

 

----------------------------------------------------------------------------------------------------------------------------

 

 

Features
> Skips Spotify's audio ads without any user intervention
> Spotify playback controls available through unobtrusive (and draggable) mini UI
> Control master volume via mouse
> Detects Spotify window closure, opening, minimisation etc and handles in all those situations
> Automatic software updates
> Portable - put it on a flash drive and run it on any computer


screenshot.gif


Download / Source
Version 0.110503.151500

Changelog

License
Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License
88x31.png



Usage
Run Stopify, and just play songs in Spotify as normal - easy.
Double click tray icon to toggle show/hide.

Hotkeys: Ctrl+Shift+...
...Mouse Scroll (MButton) Click/Scroll Down/Scroll Up or ...Q/W/E: (master) mute/volume down/volume up
...Z/X/C: previous/toggle play/next song
...A/S: shuffle/repeat
...D/F: Spotify volume down/volume up



Compatibility
> Compatible with Vista but most features will probably still work in XP. Not supported or anything less.
> Written in AHK_L

Known Issues
> Cosmetic - tab control with listview not allowing backgroundtrans



About
Everybody loves Spotify but hates the ads, so I thought I'd give it my shot at developing something to bypass the ads over Christmas, which also gave me an excuse to finally get into AHK_L. I'd been using hotkeys for a while now (something I proposed a while ago here) but always wanted a more comprehensive solution. All the other solutions I came across, like NASpotify, uses banned lists or muting but didn't really manage to let you completely forget about the ads. Stopify, it's name for now, detects when a track nears the end of play and switches songs before ads kick in, allowing you to completely forget about ads and concentrate on the music.

For those that object to ad-blocking, I think this best captures the motivation for this project:

 

Muting the spotify ads is morally equivalent to illegally downloading the music in the first place, so why bother getting Spotify if you're going to do that?!

I think it's more morally equivalent to turning your eyes away from a billboard.

 

http://www.autohotke...=45291&start=23


Lots of things were done in a rush (often for the quick fix) and are still to be done:

To Do
> Better compatibility with XP
> Apply mute if ad does play
> Detection of username, allowing for profile-specific settings
> Options window, including custom hotkeys and startup with windows
> Look into possibility of removing graphical ads also
> Improve code structure and design for performance improvements
> Clean up source code and add more comments
> Better icon

> If anyone would like to suggest a better name, I'm all ears - "Stopify" was just what I decided to call the script file when it was first saved.


Thanks for your interest.



tuna
  • Members
  • 158 posts
  • Last active: Dec 28 2012 04:50 PM
  • Joined: 03 Oct 2007
This is the first script I've considered may be publicly useful to warrant posting, so I thought I'd post here to get some much valued feedback before a public release and also to see if there's any interest in the community for this to develop further. As I am not finished with the source code just yet, nor have I decided where to take this project (whether to keep working on this myself or to give control to the community if there is interest), I have decided to release binary only - although if there is sufficient interest I'll probably release source code.

All comments most welcome.

Thanks

MacroMan!
  • Members
  • 604 posts
  • Last active: Mar 20 2012 11:40 AM
  • Joined: 28 Aug 2009
It looks good tuna, but you will find almost all users here, will not try any script without the source code.

David
What ever happened, happened.

tuna
  • Members
  • 158 posts
  • Last active: Dec 28 2012 04:50 PM
  • Joined: 03 Oct 2007
Thanks MacroMan, but as there doesn't seem to be many requests for source code, I'll keep working on it until somebody expresses their interest. Comments always welcome.

x79animal
  • Members
  • 1021 posts
  • Last active: May 14 2013 04:21 PM
  • Joined: 01 May 2010

Thanks MacroMan, but as there doesn't seem to be many requests for source code


Sauce code, Now!

tuna
  • Members
  • 158 posts
  • Last active: Dec 28 2012 04:50 PM
  • Joined: 03 Oct 2007

Thanks MacroMan, but as there doesn't seem to be many requests for source code


Sauce code, Now!


Haha ok, don't shout!
<!-- m -->https://ahknet.autoh...Stopify/src.zip<!-- m -->

I'm no Lexikos or ahk guru and like many people just had to follow the help file, so I apologise I may have used naive algorithms in some places. Just post any suggestions here and I'll merge it with the existing code. Also, code needs commenting - I just commented where I thought I might forget something. If there are any questions please post them here.

The biggest concern now is performance, since it is still very resource intensive. I was looking into using only using printwindow() when the Spotify window is active, and reading the off the time left "-x : xx" upon minimise and keep track of time within the script. I figured the only real reason we needed to keep monitoring the window was to account for unpredictable changes in Spotify caused by the user. However, once the window is minimised the behaviour in Spotify should be almost completely predictable.

Also, I am thinking over the design choice of whether to make it portable or not, since a lot of code could be saved if the script didn't have to clean up after itself.

Thanks

jolle2121
  • Guests
  • Last active:
  • Joined: --
hi, first of all - awsome script!
its working perfect, but sometimes songs seem to repeat. they finish, and then the same song gets played again, any help?

tuna
  • Members
  • 158 posts
  • Last active: Dec 28 2012 04:50 PM
  • Joined: 03 Oct 2007

sometimes songs seem to repeat. they finish, and then the same song gets played again, any help?


Thanks. There may be many reasons why songs repeat, not least because the script detects whether you have "repeat" switched on in Spotify, and will change tracks according to repeat behaviour.

Also, currently when when the end of the playlist is reached, it will simply carry on playing the last song again and again. I have not introduced any detection for when the end of the playlist is reached.

To try and reproduce this behaviour, could you post the name of the song/your search query and your OS.

Thanks

jolle21
  • Guests
  • Last active:
  • Joined: --
Well, first of all let me thank you again: ive been searching for this kind of script for a looooong time over the past 4 month or so, a script that skips to the next song when end of song is almost reached, so no adds are played.

It seems randomly replaying songs, but hasnt appeared when i reached the end of the playlist, but ive been only using this script for ~45min. It might be because the shuffling is somehow wrong, spotify-shuffler shuffles, but puts them in an order, it doesnt randomly play songs, so if ur script is messing with that ... mabybe?
Iam running Windows 7 32-bit

tuna
  • Members
  • 158 posts
  • Last active: Dec 28 2012 04:50 PM
  • Joined: 03 Oct 2007
I did originally rely on Spotify's own "next track" method to do all the shuffling/repeating, but that seems also to be precisely responsible for ensuring that ads are played. Currently, I'm using a random letter generator so a song is selected randomly by keying the first letter of it's title. It is possible that no song begins with the generated letter and so Spotify may simply select the last song on the playlist (the actual behaviour depends on how the songs are sorted). Could you post a screenshot please?

jolle2121
  • Guests
  • Last active:
  • Joined: --
A screenshot of what exactly? It happens randomly on songs, so i cant force it to happen, but iam gonna test a playlist with only few songs in about one hour.

tuna
  • Members
  • 158 posts
  • Last active: Dec 28 2012 04:50 PM
  • Joined: 03 Oct 2007

A screenshot of what exactly? It happens randomly on songs, so i cant force it to happen

Sure, but I need information about your playlist so I can reproduce your issue myself. I'd be interested in things like names of songs, search query and sort order.

If you want you can debug yourself - maybe try replacing SpotifyNext() (objects\Spotify.ahk line 41) with
SpotifyNext() {
	Spotify.Sendkeys((Spotify.MonitorControls.Shuffle.Active 
									? ((Random(0, 1) ? "{DOWN}" : "{UP}") . (RandLetter := RandomName(1, 1))) 
									: "{DOWN}")
								. "{ENTER}")
	Tooltip %RandLetter%
	Return 1
}
so you can see exactly what letter the script is trying to send.

  • Guests
  • Last active:
  • Joined: --
Okay, sure.
So far it happend to a song i cant remember and the song "Pogo" by Digitalism, and its a song in a playlist i found on shareplaylist or spotifyplaylist, one of those sites.
Heres the link:

spotify:user:smackern:playlist:2RERZExgRuUaXtjW7IWN9y

Oh and one more problem - i was just playing a game, League of Legends, and was listening to Spotify in the background. After a few minutes the music stopped, and i tabbed out of the game to see whats happening, and it seemed as if spotify tried to play an Ad but couldnt do it. I wasnt in the playlist, i was looking at music from a different artist+different album, when i tabbed back in the game it was laggy and my screen froze - but that might not be a problem of your program, just wanted to let you know about it

jolle2121
  • Guests
  • Last active:
  • Joined: --
Okay, heres something new: it seems to happen A LOT in this playlist:

spotify:user:jolle2121:playlist:4lNvgkKzlbuslyU04vEKbX

and i start with the song "We Come 1 - Radio Edit" and use your CTRL+Shift+C to go to next songs, he either replays the song We come 1, plays 1 or 2 different songs and end up at We come 1 again, or just plays the song again. This is probably more helpfull then my last post.

tuna
  • Members
  • 158 posts
  • Last active: Dec 28 2012 04:50 PM
  • Joined: 03 Oct 2007
OK, this is due a flaw in the psuedo-shuffle function (as I'm not relying on Spotify to shuffle/repeat). Essentially keying in random letters is not sufficient for a satisfactory shuffle as only a subset of the songs in the playlist are ever selected. Moreover, depending on how the playlist is sorted, keying in a letter may cause Spotify to jump to the relevant artist or album rather than song name, which varies less than than the song names, resulting in an ever smaller subset of songs up for selection.

I will, however, still use this as a basis for selecting a random song but add a random walk (move up/down) superimposed on top of that. However, I have no way of detecting when the first/last song in the list has been selected, I cannot make the barriers of the random walk reflective - if you're listening to the first or last song, it is likely (depending precisely on your playlist) that there will be a maximum (1/2)^n chance it will be replayed n times.

If anyone can think of a workaround I'd love to know.

Thanks