From 8e2d9a72e6e9dc500dbc0ace4be50a85ae222945 Mon Sep 17 00:00:00 2001 From: Justin Maggard Date: Fri, 15 Oct 2010 21:51:33 +0000 Subject: [PATCH] * If TiVo requests a negative ItemCount with no starting point, that means go to the end of the list. --- tivo_commands.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tivo_commands.c b/tivo_commands.c index a16cb44..7ff4026 100644 --- a/tivo_commands.c +++ b/tivo_commands.c @@ -612,6 +612,10 @@ SendContainer(struct upnphttp * h, const char * objectID, int itemStart, int ite " where %s and (%s)", which, myfilter); totalMatches = (ret > 0) ? ret : 0; + if( itemCount < 0 && !args.start ) + { + args.start = totalMatches + itemCount; + } sql = sqlite3_mprintf("SELECT o.OBJECT_ID, o.CLASS, o.DETAIL_ID, d.SIZE, d.TITLE," " d.DURATION, d.BITRATE, d.SAMPLERATE, d.ARTIST, d.ALBUM,"