From bd1ce5ebaff510c3599f980c1b0624b6a7c49864 Mon Sep 17 00:00:00 2001 From: Amr Hassan Date: Tue, 1 Sep 2009 06:14:45 +0000 Subject: [PATCH] added order to Artist.get_images() --- .build | 2 +- pylast.py | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.build b/.build index 7813681..62f9457 100644 --- a/.build +++ b/.build @@ -1 +1 @@ -5 \ No newline at end of file +6 \ No newline at end of file diff --git a/pylast.py b/pylast.py index 220c4ff..9e9befc 100644 --- a/pylast.py +++ b/pylast.py @@ -94,6 +94,10 @@ COVER_LARGE = 2 COVER_EXTRA_LARGE = 3 COVER_MEGA = 4 +IMAGES_ORDER_POPULARITY = "popularity" +IMAGES_ORDER_DATE = "dateadded" + + USER_MALE = 'Male' USER_FEMALE = 'Female' @@ -1554,10 +1558,11 @@ class Artist(_BaseObject, _Taggable): return self.network._get_url(domain_name, "artist") %{'artist': artist} - def get_images(self, limit=None): + def get_images(self, order=IMAGES_ORDER_POPULARITY, limit=None): """ Returns a sequence of Image objects if limit is None it will return all + order can be IMAGES_ORDER_POPULARITY or IMAGES_ORDER_DATE """ images = []