Free the mouse Replay RnsGetCG2
Home | Changes | Index | Search | Go requests

These queries get information about what shows are scheduled to be broadcast.

A separate query is done for each 24-hour period, but all of the channels are queried at once. This leads to exceedingly long URLs, a small fraction of which looks like:

The 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 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/; after uncompressing (either by a browser or other user agent that handles Content-Encoding, the 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

Pre-4000 systems use slightly different URLs, with @ 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).


Thanks to Ian Prest (Ijprest at AvsForum) for explaining the relative timestamp system; I was going down a completely wrong path on that. The pre-4000 information is also from his documentation.

-- ToddLarason - 13 Mar 2002, restructured 22 Mar 2002

Your post will appear before this form in chronological order (newest at bottom)

Attachment: Action: Size: Date: Who: Comment:
cg2-sample.dat action 19352 14 Mar 2002 - 00:54 ToddLarason A sample datafile (uncompressed) from
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