http://rns.replaytv.net/cgi-bin/2.0/getcg2.pl?A20020314C16061Z1015010285_23676P1583_16715M1424_10424P689107The standard
If-Modified-Since
and If-None-Match
methods for avoiding redundant information aren't used; instead, equivalent information is encoded into the URL, separate for each channel in question.
The query string is AdateCtmsidabstime[_tmsidtime]*
tmsid is the TribuneMediaServicesID for a channel, as given by getheadend.pl. abstimeis a Z
followed by a TimeT style timestamp, which acts as an If-Modified-Since
header just for this channel. After the first channel, any number of additional channels can be requested, separated by underscores; in the additional channels, the times may be spcified either as an abstime or as a relative time; a relative time consists of a P
or an M
, followed by a number, indicating the number of seconds to add (for P = plus) or substract (for M = minus) from the previous channel's time.
Typically, The ReplayTV4k seems to request data for the day that's just starting, the next day, 2 days following that, 4 days following that, and 8 days following that. That gives a full two week's coverage, with increasingly accurate (or at least more up-to-date) data as days get closer.
The response is sent with Content-Encoding
gzip, Content-type
application/vnd.replay.cg; after uncompressing (either by a browser or other user agent that handles Content-Encoding
, the vnd.replay.cg format turns out to be a binary file consisting of a series of channel records.
Each channel record consists of a 12-byte header followed by a sequence of FixedProgramRecords.
The channel header is:
offset | size (bytes) | description |
---|---|---|
0 | 4 | timestamp, probably of the last modification of the show data |
4 | 4 | TribuneMediaServicesID of the channel |
8 | 4 | data length; skip this many bytes to get to the next channel header |
@
used in place of A
, :
used in place of C
, ,
used in place of Z
, +
in place of P
, -
in place of M
and ;
in place of _
. The reason for the change is not known, but may be to deal better with the transparent proxies that 4000 requests may be subject to (+
and ;
both have specific meanings in URLs).
Attachment: | Action: | Size: | Date: | Who: | Comment: |
---|---|---|---|---|---|
cg2-sample.dat | action | 19352 | 14 Mar 2002 - 00:54 | ToddLarason | A sample datafile (uncompressed) from getcg2.pl |
dump-cg2.c | action | 4723 | 14 Mar 2002 - 00:55 | ToddLarason | A simple program to parse & dump cg2 data |
Topic RnsGetCG2 . { Edit | Attach | Ref-By | Printable | Diffs | r1.13 | > | r1.12 | > | r1.11 | More } |
Revision r1.13 - 01 Apr 2003 - 04:47 GMT - TWikiGuest Parents: WebHome > RnsProtocol |
Copyright © 2001 by the contributing authors.
All material on this collaboration tool is the property of the contributing authors. Ideas, requests, problems regarding TWiki? Send feedback. |
Replay.RnsGetCG2 moved from Replay.RnsChannelGuide on 16 Mar 2002 - 07:42 by ToddLarason - put it back |