X-Git-Url: https://disinclined.org/git/?a=blobdiff_plain;f=likes_pandora.py;fp=likes_pandora.py;h=c7878636d349573aa5b56ec415ec9e3803230afa;hb=bad942a65c4dbc72457bf548701c8baecee0461d;hp=cd066e880a58ad79a68885c9a9b001d3c3a59012;hpb=8e57a07a7ec649864e8152b8d3e1e1a1e5fba14f;p=i_like_pandora.git diff --git a/likes_pandora.py b/likes_pandora.py index cd066e8..c787863 100644 --- a/likes_pandora.py +++ b/likes_pandora.py @@ -6,21 +6,22 @@ __license__ = "BSD" USER = 'alphabethos' DIR = '/home/dylan/pandora/' YT_DL = '/usr/bin/youtube-dl' # Path to youtube-dl -NOTIFICATIONS = True +NOTIFICATIONS = True # False DEFAULT_ICON ='/usr/share/icons/gnome/48x48/mimetypes/gnome-mime-application-x-shockwave-flash.png' YT_OPT = '--no-progress --ignore-errors --continue --max-quality=22 -o "%(stitle)s---%(id)s.%(ext)s"' # END OF SETTINGS +from BeautifulSoup import BeautifulSoup import urllib import urllib2 -from BeautifulSoup import BeautifulSoup import pynotify import tempfile import string -import hashlib -import os -import shlex, subprocess -import re +if NOTIFICATIONS: + import hashlib + import os + import shlex, subprocess + import re def fetch_stations(user): """ This takes a pandora username and returns the a list of the station tokens that the user is subscribed to. """