Permalink
Browse files

Add slice support to search result pager.

  • Loading branch information...
1 parent 2198d9e commit 86b54a14992a24c3f727efd5247842ee2d2393c3 @wagnerrp wagnerrp committed Apr 1, 2012
Showing with 5 additions and 1 deletion.
  1. +2 −0 tmdb3/pager.py
  2. +3 −1 tmdb3/tmdb_api.py
View
@@ -57,6 +57,8 @@ def __init__(self, iterable, pagesize=20):
self._pagesize = pagesize
def __getitem__(self, index):
+ if isinstance(index, slice):
+ return [self[x] for x in xrange(*index.indices(len(self)))]
if index >= len(self):
raise IndexError("list index outside range")
if (index >= len(self._data)) \
View
@@ -22,7 +22,7 @@
Preliminary API specifications can be found at
http://help.themoviedb.org/kb/api/about-3"""
-__version__="v0.4.4"
+__version__="v0.4.6"
# 0.1.0 Initial development
# 0.2.0 Add caching mechanism for API queries
# 0.2.1 Temporary work around for broken search paging
@@ -39,6 +39,8 @@
# 0.4.2 Improve cache file selection for Windows systems
# 0.4.3 Add a few missed Person properties
# 0.4.4 Add support for additional Studio information
+# 0.4.5 Add locale fallthrough for images and alternate titles
+# 0.4.6 Add slice support for search results
from request import set_key, Request
from util import Datapoint, Datalist, Datadict, Element

0 comments on commit 86b54a1

Please sign in to comment.