First of all i’d like to say that i dont consider this thing ‘a hack’. Its not different than using a VPN connection. But instead of a VPN i am just using normal DNS servers…Ok lets begin.
There is a website called https://tvunblock.com which gives you 2 DNS records (read bellow) to add to your network settings and be able to visit Pandora, netflix and other sites from your country’s ip (well you are borrowing their ip when it comes to those sites). The only ‘trick’ is that once you visited their site, your normal IP will be enabled to use their DNS records only for a month. If you get disconnected or a month passes, you’ll have to go to their site again for your new ip to get accept. How do we bypass all that ? Simple, you let the pi do all the work.
** TVUnblock has removed the free DNSs from their website. But everything still works if you add them.
Visit https://tvunblock.com/ to get your IP authorized and also see what’s all this i am talking about. After that, add the 2 dns reconds on your PC’s network card then visit Pandora.com and open an account there.
Get on your remote console and install crontab. We’ll use crontab to automatically curl the website every hour, to extend our time and update our IP in case our line gets disconnected.
sudo apt-get install cron
Make 2 empty txt files named gotip.txt and workingip.txt in folder: /usr/local/bin
sudo nano /usr/local/bin/compareips.sh and finally copy paste this inside (then save and exit):
#!/bin/bash sudo curl --silent http://ipecho.net/plain > gotip.txt gotip=$(cat gotip.txt) compare=$(cat workingip.txt) if [[ "$compare" != "$gotip" ]] then sudo curl https://activate.tvunblock.com/ echo "new ip detected" sudo cp gotip.txt workingip.txt else echo "done" fi
Lets create the crontab now. Do:
sudo crontab -e and at the botoom add:
0 * * * * sudo /usr/local/bin/compareips.sh > /var/log/mycron.log 2>&1
This will check/update our ip every hour and write a log about it in /var/log/mycron.log
If you want to manually update your ip just execute
Go to your My OSCM Network settings and add the 2 DNS (primary, secondary) you got from the website on your wifi or wired settings.
Download Pandoki addon (Pandoki - Pandora Internet Radio (Update 2nd Sept 2016: v0.9.3)), install it and add your new Pandora user/pass at the settings. I found it easier to add some stations to my pandora account from my pc first, then when i logged in Pandoki, i had those stations there ready to play.
Congrats, you got Pandora running on your Pi.
Final Notes / Thoughts
Pandoki is been used by countless people to use Pandora on their Pi. Its not a pirate app.