PDA

View Full Version : series TMSID->FSID?


angra
07-27-2002, 11:37 AM
Hi all,

I'm in the process of making a tool to do some minimalist backup and restores of user-space data on my tivo, and I'm (sort of) spinning my wheels on one problem.

One of the things I'm backing up is season passes - now, since the important data in a SP points to objects, I need something immutable to store for backups. In other words, storing a pointer to a particular object item (say, via a fsid) would not make sense, since, in the event of a catastrophic failure and rebuild, the series and station info might live at new FSID's (I assume...?).

So, what I was planning to do is to store tmsid's. These seem immutable. The only problem is, I cant find a direct way to go from a series/program tmsid to a fsid. Getting the station ID seems pretty easy, at least.

I looked in /GuideIndexV2/tms.index and /GuideIndexV2/tms.key, and that hasn't quite gotten me there yet. I have been reading through the index.itcl source included with the search module for tivoweb - they have a routine which does some parsing of program.key and program.index. unfortunately, the tms* files aren't quite analogous, or so it seems. Also, tms.index does not seem to have a constant record size(!), which confuses me further.

Anyway, I guess I am soliciting suggestions that will either help me understand /GuideIndexV2/tms.{index, key}, or another method to investigate to quickly translate a tmsid to a fsid for a series.

p.s. what tmsid types can a season pass be linked to? EP seems right out, SH is an obvious yes, but what about MV, and SP? Can those have season passes attached to them?

Thanks, all

TheDoctor
07-27-2002, 01:16 PM
The TMSid in a program record should be 4 bytes longer than a series id. The 4 bytes are the episode number following the series id. There are also TMSids of other lenths for station info etc, but I don't think those are what you are talking about.

angra
07-27-2002, 08:05 PM
on further review, I had a bad transfer - the record lengths in tms.index and tms.key are both constant length (16). for posterity, what I've found so far of the records:

bytes description
------------------------
0-1 tms type (EP, MV, SH, or SP)
2 0 for program, 1 for series (is it possible
for a SP to refer to a program, and not a series? So far
I think no)
3-10 ID# (on quick view, it looks like only bytes 7-10 are used,
except that some have a value in byte 6, but never
series)
11-15 FSID

on another topic, I discovered that the tms.index file I have on my tivo will _not_ transfer correctly via FTP - anyone have an idea why that would be, or how I can get around that?

angra
07-28-2002, 11:31 AM
Well, I'm almost done.

Can anyone suggest a good (automated) source of series TMSid's for testing/verification?

I'll post my routines up here when I've done verifying.