Skip to content
Jacob Roeland edited this page Aug 9, 2013 · 1 revision

So there are two ways of keeping NPR from being played. The first is to basically disable it with a minor hack. The other is to completely remove the functionality. Both take place in the bar-update.py file.

  1. Disabling: Find the line that states elif event == "songfinish":. It should be around line #31. Rename "songfinish" to something else. Maybe as simple as "songfinis". I use this method when I want uninterrupted Pandora.

  2. Removing: Find the line that states elif event == "songfinish":. It should be around line #31. Remove that line and all the tabbed code under it up to the the next elif. So in the end it should look like:

if event == "songstart" or event == "songexplain":
	open(www + "curSong.json", "w").write(buildJSON(title, artist, album, coverArt, rating, detailUrl))
elif event == "songlove":
	open(www + "curSong.json", "w").write(buildJSON(title, artist, album, coverArt, 1, detailUrl))
	open(www + "msg", "w").write("Loved")

And now NPR will no longer play.

Clone this wiki locally