From 706a34df5408b8362a67737e06ee23eff281e5d8 Mon Sep 17 00:00:00 2001 From: Amr Hassan Date: Tue, 14 Oct 2008 03:39:53 +0000 Subject: [PATCH] 0.2b11 --- INSTALL | 5 ++--- changes.txt | 3 +++ pylast.py | 16 ++++++++-------- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/INSTALL b/INSTALL index 88d206a..da9d859 100644 --- a/INSTALL +++ b/INSTALL @@ -1,3 +1,2 @@ -#!/bin/sh - -exec python setup.py install +1. cd into this directory +2. execute "python setup.py install". you'll probably need to add sudo to the beginning. diff --git a/changes.txt b/changes.txt index c7c685d..9f9f23d 100644 --- a/changes.txt +++ b/changes.txt @@ -1,3 +1,6 @@ +0.2b11 + * fixed: some unicode problems. + 0.2b10 * fixed: getURL now returns the link with it's parameters double quoted as it should. * Artist.getTopTags, Track.getTopTags, Album.getTopTags all now have a limit argument. diff --git a/pylast.py b/pylast.py index 0995e96..88da655 100644 --- a/pylast.py +++ b/pylast.py @@ -21,7 +21,7 @@ # http://code.google.com/p/pylast/ __name__ = 'pyLast' -__version__ = '0.2b10' +__version__ = '0.2b11' __author__ = 'Amr Hassan' __mail__ = 'amr.hassan@gmail.com' @@ -285,7 +285,7 @@ class Request(Exceptionable): data = [] for name in self.params.keys(): - data.append('='.join((name, urllib.quote_plus(self.params[name])))) + data.append('='.join((name, urllib.quote_plus(self.params[name].encode('utf-8'))))) try: conn = httplib.HTTPConnection(API_SERVER) @@ -1804,8 +1804,8 @@ class Library(BaseObject): """ params = self._getParams() - if limit: params['limit'] = str(limit) - if page: params['page'] = str(page) + if limit: params['limit'] = unicode(limit) + if page: params['page'] = unicode(page) doc = Request(self, 'library.getAlbums', self.api_key, params).execute() @@ -1837,8 +1837,8 @@ class Library(BaseObject): """ params = self._getParams() - if limit: params['limit'] = str(limit) - if page: params['page'] = str(page) + if limit: params['limit'] = unicode(limit) + if page: params['page'] = unicode(page) doc = Request(self, 'library.getArtists', self.api_key, params).execute() @@ -1866,8 +1866,8 @@ class Library(BaseObject): """Returns a paginated list of all the tracks in a user's library. """ params = self._getParams() - if limit: params['limit'] = str(limit) - if page: params['page'] = str(page) + if limit: params['limit'] = unicode(limit) + if page: params['page'] = unicode(page) doc = Request(self, 'library.getTracks', self.api_key, params).execute()