projects
/
jamaendo
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b81c724
)
why oh why doesn't it work from the desktop file
author
Kristoffer Grönlund
<kristoffer.gronlund@purplescout.se>
Fri, 1 Jan 2010 17:37:22 +0000
(18:37 +0100)
committer
Kristoffer Grönlund
<kristoffer.gronlund@purplescout.se>
Sat, 2 Jan 2010 23:37:45 +0000
(
00:37
+0100)
jamaendo/api.py
patch
|
blob
|
history
jamaui/__init__.py
patch
|
blob
|
history
jamaui/favorites.py
patch
|
blob
|
history
jamaui/featured.py
patch
|
blob
|
history
jamaui/playerwindow.py
patch
|
blob
|
history
jamaui/radios.py
patch
|
blob
|
history
jamaui/ui.py
patch
|
blob
|
history
jamaui/util.py
patch
|
blob
|
history
diff --git
a/jamaendo/api.py
b/jamaendo/api.py
index
74c96f7
..
df0f3c0
100644
(file)
--- a/
jamaendo/api.py
+++ b/
jamaendo/api.py
@@
-106,8
+106,8
@@
class LazyQuery(object):
return u"%s(%s)"%(self.__class__.__name__,
u", ".join(repr(v) for k,v in self.__dict__.iteritems() if not k.startswith('_')))
except UnicodeEncodeError:
return u"%s(%s)"%(self.__class__.__name__,
u", ".join(repr(v) for k,v in self.__dict__.iteritems() if not k.startswith('_')))
except UnicodeEncodeError:
- import traceback
- traceback.print_exc()
+ #import traceback
+ #traceback.print_exc()
return u"%s(?)"%(self.__class__.__name__)
class Artist(LazyQuery):
return u"%s(?)"%(self.__class__.__name__)
class Artist(LazyQuery):
@@
-217,7
+217,7
@@
class Query(object):
pass
def _geturl(self, url):
pass
def _geturl(self, url):
- print "*** %s" % (url)
+ #print "*** %s" % (url)
Query._ratelimit()
f = urllib.urlopen(url)
ret = simplejson.load(f)
Query._ratelimit()
f = urllib.urlopen(url)
ret = simplejson.load(f)
diff --git
a/jamaui/__init__.py
b/jamaui/__init__.py
index
2707976
..
d930ae4
100644
(file)
--- a/
jamaui/__init__.py
+++ b/
jamaui/__init__.py
@@
-23,5
+23,11
@@
#
import logging
#
import logging
+import sys
-logging.basicConfig(level=logging.DEBUG, format="%(name)-15s: [%(lineno)4d] %(levelname)-8s %(message)s")
+#logging.basicConfig(level=logging.DEBUG, format="%(name)-15s: [%(lineno)4d] %(levelname)-8s %(message)s")
+
+LOG_FILENAME = '/tmp/jamaendo.log'
+
+logging.basicConfig(filename=LOG_FILENAME,level=logging.DEBUG, format="%(name)-15s: [%(lineno)4d] %(levelname)-8s %(message)s")
+sys.excepthook = lambda *args: logger.critical('Exception:', exc_info=args)
diff --git
a/jamaui/favorites.py
b/jamaui/favorites.py
index
d607a8b
..
6eb07b6
100644
(file)
--- a/
jamaui/favorites.py
+++ b/
jamaui/favorites.py
@@
-117,7
+117,7
@@
enter your username</span>
def row_activated(self, treeview, path, view_column):
_id = self.results.get_album_id(path)
item = self.idmap[_id]
def row_activated(self, treeview, path, view_column):
_id = self.results.get_album_id(path)
item = self.idmap[_id]
- print _id, item
+ #print _id, item
self.open_item(item)
def open_item(self, item):
self.open_item(item)
def open_item(self, item):
diff --git
a/jamaui/featured.py
b/jamaui/featured.py
index
a012993
..
17f5791
100644
(file)
--- a/
jamaui/featured.py
+++ b/
jamaui/featured.py
@@
-95,7
+95,7
@@
class FeaturedWindow(hildon.StackableWindow):
treeiter = self.result_store.get_iter(path)
title, _id = self.result_store.get(treeiter, 0, 1)
item = self.idmap[_id]
treeiter = self.result_store.get_iter(path)
title, _id = self.result_store.get(treeiter, 0, 1)
item = self.idmap[_id]
- print _id, item
+ #print _id, item
self.open_item(item)
def open_item(self, item):
self.open_item(item)
def open_item(self, item):
diff --git
a/jamaui/playerwindow.py
b/jamaui/playerwindow.py
index
ceeb549
..
f7fe5b3
100644
(file)
--- a/
jamaui/playerwindow.py
+++ b/
jamaui/playerwindow.py
@@
-97,7
+97,7
@@
class PlayerWindow(hildon.StackableWindow):
postoffice.connect('album-cover', self.set_album_cover)
postoffice.connect('album-cover', self.set_album_cover)
- print "Created player window, playlist: %s" % (self.playlist)
+ #print "Created player window, playlist: %s" % (self.playlist)
def get_album_id(self):
if self.playlist and self.playlist.current_index() > -1:
def get_album_id(self):
if self.playlist and self.playlist.current_index() > -1:
@@
-157,7
+157,7
@@
class PlayerWindow(hildon.StackableWindow):
if item:
if not item.name:
item.load()
if item:
if not item.name:
item.load()
- print "current:", item
+ #print "current:", item
self.set_labels(item.name, item.artist_name, item.album_name,
self.playlist.current_index(), self.playlist.size())
postoffice.notify('request-album-cover', int(item.album_id), 300)
self.set_labels(item.name, item.artist_name, item.album_name,
self.playlist.current_index(), self.playlist.size())
postoffice.notify('request-album-cover', int(item.album_id), 300)
diff --git
a/jamaui/radios.py
b/jamaui/radios.py
index
4514f2c
..
11c6a07
100644
(file)
--- a/
jamaui/radios.py
+++ b/
jamaui/radios.py
@@
-84,7
+84,7
@@
class RadiosWindow(hildon.StackableWindow):
treeiter = self.result_store.get_iter(path)
title, _id = self.result_store.get(treeiter, 0, 1)
item = self.radios[_id]
treeiter = self.result_store.get_iter(path)
title, _id = self.result_store.get(treeiter, 0, 1)
item = self.radios[_id]
- print _id, item
+ #print _id, item
self.open_item(item)
def open_item(self, item):
self.open_item(item)
def open_item(self, item):
diff --git
a/jamaui/ui.py
b/jamaui/ui.py
index
7a8fc6d
..
8fc1997
100644
(file)
--- a/
jamaui/ui.py
+++ b/
jamaui/ui.py
@@
-85,6
+85,7
@@
class Jamaui(object):
self.app.add_window(self.window)
self.window.set_title("jamaendo")
self.app.add_window(self.window)
self.window.set_title("jamaendo")
+ self.window.set_icon('jamaendo')
self.window.connect("destroy", self.destroy)
self.CONFDIR = os.path.expanduser('~/MyDocs/.jamaendo')
self.window.connect("destroy", self.destroy)
self.CONFDIR = os.path.expanduser('~/MyDocs/.jamaendo')
@@
-241,7
+242,7
@@
JAMENDO is an online platform that distributes musical works under Creative Comm
dialog.destroy()
def open_link(self, d, url, data):
dialog.destroy()
def open_link(self, d, url, data):
- print "url: %s" % (url)
+ #print "url: %s" % (url)
import webbrowser
webbrowser.open_new(url)
import webbrowser
webbrowser.open_new(url)
@@
-294,9
+295,9
@@
JAMENDO is an online platform that distributes musical works under Creative Comm
result = dialog.run()
val = entry.get_text()
dialog.destroy()
result = dialog.run()
val = entry.get_text()
dialog.destroy()
- print val, result
+ #print val, result
if val and result == gtk.RESPONSE_OK:
if val and result == gtk.RESPONSE_OK:
- print "new user name:", val
+ #print "new user name:", val
settings.user = val
self.save_settings()
settings.user = val
self.save_settings()
diff --git
a/jamaui/util.py
b/jamaui/util.py
index
aa72c82
..
bd0c758
100644
(file)
--- a/
jamaui/util.py
+++ b/
jamaui/util.py
@@
-44,8
+44,8
@@
def get_platform():
platform = get_platform()
platform = get_platform()
-def jsonprint(x):
- print simplejson.dumps(x, sort_keys=True, indent=4)
+#def jsonprint(x):
+# print simplejson.dumps(x, sort_keys=True, indent=4)
def find_resource(name):
if os.path.isfile(os.path.join('data', name)):
def find_resource(name):
if os.path.isfile(os.path.join('data', name)):