# How do I start developing a PC Program for TiVo?



## BertPre (Nov 19, 2016)

I want to develop a program to run on a PC which accesses and downloads the whole Program Guide to a PC so I can sort it like my old Series 2 Tivo used to in the "Find Programs by Title" section. I am not sure where to begin. I need to get much of the functionality of kmttg in terms of accesing the data, then save it to a text database where I can deal with it in VB (a language I am very experienced in). But the front end will have to be in Java I assume. Have heard there are SDKs out there, and I saw the developer.tivo.com site, but I am not looking to commercially develop a product, I just cant STAND how the newer Tivo's (like my new bolt) deal with sorting... cant find what shows are on cable like I used to. Frustrated enough to write my own program despite the difficulty with the front end.... rear end would be a piece of cake if I could get the data in text form (channel guide, program data, metadata, thumbs ratings for each show, etc).
Any help or advice would be appreciated.


----------



## Dan203 (Apr 17, 2000)

The problem with anything like this is that it requires a certificate. The developer of kmttg extracts the one he uses from the TiVo iOS app, but from what I understand it's really difficult and TiVo makes it even more difficult with each new app release. The one in kmttg expires next year and after that who knows if he'll be able to do it again.

That being said there are certificates and sample code available out there in both Java and python. I personally tried to get it working in C# but had some trouble and never figured out how to get it working properly. Although that's not to say it can't be done. There is a Windows phone app out there that does it, which is written in C#, so it's possible. I just couldn't personally get it to work.


----------



## BertPre (Nov 19, 2016)

I guess the only thing to do is send my tivo back before 30 day window expires... it is almost useless to me if I cant use it to mine out shows/movies I didnt know of to get my monies worth out of a $200/month cable bill. Probably be just as well off with Cox Contour as far as season passes and the like... smh... just cant believe Tivo screwed that feature up... enjoyed all these years (up till end of last November)... hoped they would have improved it... not eliminated it...


----------



## Dan203 (Apr 17, 2000)

Have you tried any of the online services like titantv or tvguide?


----------



## lpwcomp (May 6, 2002)

Just modify kmttg for your own use.


----------



## BertPre (Nov 19, 2016)

That is what I was thinking of doing, but Dan was talking about the need for certificates. Was digging into Netbeans and Java today until I saw his comment and figured it was a waste of time (not experienced in Java... good excuse to learn). I just wanted to modify kmttg to generate a super large 'text dump, comma delimited' file of the guide and use VB6 to deal with the actual sorting (I am quite good at programming in VB6).


----------



## BertPre (Nov 19, 2016)

Dan203 said:


> Have you tried any of the online services like titantv or tvguide?


Yes... I actually posted in another thread originally but none of those panned out to be equivalent.
*Confused and Irritated New Bolt Customer *


----------



## BertPre (Nov 19, 2016)

I find it hard to believe that nobody else has done this. I mean, the original Tivo pitch back in the late 90's/early 2k's was 'free yourself from the cable companies TV schedule' (to paraphrase) ... and that wasnt just hype... it REALLY worked... if you learned to really use Tivo for the power it had. It took me 5 years before I realized the power it really had... but being able to know with certainty that i was catching even the most obscure show or movie every week and didnt care when it was on or on what channel... just watching shows on MY SCHEDULE and NEVER having to browse thru live TV in 17 years made me rave about Tivo to everybody I met.... but it looks like nobody else realized the power this thing had like I did. The way it is now, the 2 to 3 hr search I would do every Wednesday evening would take like 20 or 30 hours... a PT Job... I cant do that.


----------



## BertPre (Nov 19, 2016)

Just breaks my heart they screwed this up so bad... the ONLY product I ever was truly FANATICAL about...
Dont get me wrong, I like some of the other features of the Bolt, but in the end, I am not a WHOLE lot better off than I was with a dead Tivo Series 2 and a 'no service' Replay TV being used for a dumb DVR.... at least not $750 worth of better off anyway.


----------



## lpwcomp (May 6, 2002)

BertPre said:


> That is what I was thinking of doing, but Dan was talking about the need for certificates. Was digging into Netbeans and Java today until I saw his comment and figured it was a waste of time (not experienced in Java... good excuse to learn). I just wanted to modify kmttg to generate a super large 'text dump, comma delimited' file of the guide and use VB6 to deal with the actual sorting (I am quite good at programming in VB6).


I think Dan was talking about what you would need to do to develop and run your own program from scratch. It is quite possible to build and run a locally modified kmttg although, _*IIRC, *_I had to extract the certificate from the jar file and add it to the build path.

I use Eclipse for modifying and building.


----------



## Dan203 (Apr 17, 2000)

The python script that VAP uses might be easier to use. But it depends one which language you're more comfortable with.


----------



## BertPre (Nov 19, 2016)

Dan203 said:


> The python script that VAP uses might be easier to use. But it depends one which language you're more comfortable with.


Python might be easier to figure out than Java I would imagine.... since I am coming from a heavy VB background it is all a bit confusing


----------



## BertPre (Nov 19, 2016)

lpwcomp said:


> I think Dan was talking about what you would need to do to develop and run your own program from scratch. It is quite possible to build and run a locally modified kmttg although, _*IIRC, *_I had to extract the certificate from the jar file and add it to the build path.
> 
> I use Eclipse for modifying and building.


I would love to check out the source files to kmttg.... not quite sure where it is located (found older version v1.1r from 2015 on sourceforge) . Installed Netbeans, but could try it on Eclipse also (dont know how to use either GUI yet)... again, new to Java.


----------



## Dan203 (Apr 17, 2000)

Have you tried just using Wish Lists?


----------



## BertPre (Nov 19, 2016)

Dan203 said:


> Have you tried just using Wish Lists?


The problem with wishlists is that it tends to give me EVERY occurrence of a given episode of a show... so really I am not much better off than just using a 'filtered guide' which is the closest I can come to Series 2 functionality on the Bolt... I really need them in alphabetical order... or at LEAST to where it shows only one occurrence... that is why it takes 10x longer now than it used to (I used to dread spending 3 hrs on it each week LOL).


----------



## BertPre (Nov 19, 2016)

It would be a real simple to do program in VB if I just had the raw data to work with.... so close but so far... very frustrating after being deprived of my Series 2 for 5 months.


----------



## BertPre (Nov 19, 2016)

I am sure it would be at least a couple hundred megabytes of text if the guide, thumbs ratings, metadata, genre, etc were converted... perhaps 10x that... but that could be broken up in a channel-by-channel manor perhaps if it was too large for VB to deal with. Could attempt some sort of binary file, but that might cause a lot of brain damage (on the Java side that is).


----------



## Dan203 (Apr 17, 2000)

It's been a long time since I used a S2 but IIRC it allowed you to filter the search by title list by category didn't it? I'm not an expert on the mind/RPC API but I think you'd have to perform several calls to get the data you want and then you'd have to manually filter it. Could be much more involved, and slower, then you'd think. 

Newer TiVos don't use the downloaded data for any of the search/browse functions. They use the mind/RPC API too. That's why when your internet connection goes out all the search/browse functions are disabled. That could be why TiVo didn't move the functionality over. Because replicating the feature would be too complex using the new API.


----------



## lpwcomp (May 6, 2002)

BertPre said:


> I would love to check out the source files to kmttg.... not quite sure where it is located (found older version v1.1r from 2015 on sourceforge) . Installed Netbeans, but could try it on Eclipse also (dont know how to use either GUI yet)... again, new to Java.


kmttg / Wiki / eclipse_project


----------



## BertPre (Nov 19, 2016)

Dan203 said:


> It's been a long time since I used a S2 but IIRC it allowed you to filter the search by title list by category didn't it? I'm not an expert on the mind/RPC API but I think you'd have to perform several calls to get the data you want and then you'd have to manually filter it. Could be much more involved, and slower, then you'd think.
> 
> Newer TiVos don't use the downloaded data for any of the search/browse functions. They use the mind/RPC API too. That's why when your internet connection goes out all the search/browse functions are disabled. That could be why TiVo didn't move the functionality over. Because replicating the feature would be too complex using the new API.


Yea it wouldnt surprise me if I had to do many, many queries to extract the data (even if the db were still on the Tivo).. but that could be automated and I could wait for the data (even if it took 24 hours to complete). But your observation wouldnt surprise me given that this is all transacted on the net these days ... no dial up anymore (havent had the Bolt long enough to know what happens in an internet outage yet...but that is a dead giveaway). Even extracting the data out of kmtty's channel guide is a start (again, would have to automate with some sort of loop logic in Java). 
After the data were rendered in my would-be VB program, it would be a fairly quick affair to search it. 
Might dump it into an Access db in VB or might just deal with it as a 'by genre' sorted list in a set of structures or arrays that can then be further filtered within that genre as desired (like being able to filter out movies/shows I have already seen (that are thumbs rated)... that would cut my old 2-3 hr once a week search time down to 30 minutes max....daydreamed about being able to do that for years). As long as it were not impossible, it is worth doing... that is how important the feature was to me.
I could PERHAPS attempt to extract from and control kmttg externally from VB using the Win API... but it would be tricky given VB6's 'arms length' no pointers operation with the Win API, plus I am very rusty at that and it would be a mess and I am sure the Win API has changed a lot in the 15 years since I dealt with it. I know getting the hooks of an external program was a tricky thing even back then... cant imagine the nightmare it would be today.


----------



## BertPre (Nov 19, 2016)

lpwcomp said:


> kmttg / Wiki / eclipse_project


Oh hell YEA... that is cool... thanks


----------



## Allanon (Nov 2, 2005)

I feel your pain, I find myself using Tivo Online to search and setup recordings more than the actual Tivo.


----------



## BertPre (Nov 19, 2016)

Allanon said:


> I feel your pain, I find myself using Tivo Online to search and setup recordings more than the actual Tivo.


I agree... tivo online is better in many ways. I was able to rebuild my entire season pass lineup since it allows you to SP shows that arent yet airing (in off season). However, that is also a weakness. When looking for unusual films or shows, it doesnt work so well since MANY of the shows and PARTICULARLY movies have a "not available" tag... which infuriates me.... I ask myself 'who cares... I want to know what I can watch IN THE NEXT 2 WEEKS on CABLE' LOL  In all seriousness it does irritate me a bit... not because it does that, but because it DOES NOT do what I want it to in ADDITION to that. I mean, it is a website, they can make it have a Simple setting for beginners and an Advanced setting for Advanced users.
This brings up a good point btw. Dan was saying something to the effect that Tivo may actually import its program listings on the fly over the internet (if I understood him correctly).... and said that is probably why they didnt impliment that feature on newer Tivo boxes... but I thought "well then, why doesnt Tivo just serve up the sorted data either to their Internet 'tivo online' site, or directly to the Tivo itself... giving me back the lost functionality????". When I first logged onto Tivo Online, I was really hoping to see the missing functions there, but alas, no. WTH Not? This is a rudimentary database operation... really shouldnt be that tough for them to at LEAST offer it on the internet.


----------



## Dan203 (Apr 17, 2000)

The data they use for the ToDo list is still local and gotten from a daily download. However the search and browse features are dynamic and require an active internet connection to work.

As for why they can't do it the way they use to... IIRC the mind/RPC interface only returns a rudimentary amount of data per show. You have to make a secondary call with a specific show's ID to get details like categories. So the data is simply not indexed the same way as it was on the old system, which makes creating a list of every show/movie airing in the next 2 weeks and then filtering it by categories nearly impossible. At least in a reasonable time frame. The old TiVos used only the local data for everything, which included all the extended details for every show. So it was much easier to do it on those units.


----------



## BertPre (Nov 19, 2016)

Dan203 said:


> The data they use for the ToDo list is still local and gotten from a daily download. However the search and browse features are dynamic and require an active internet connection to work.
> 
> As for why they can't do it the way they use to... IIRC the mind/RPC interface only returns a rudimentary amount of data per show. You have to make a secondary call with a specific show's ID to get details like categories. So the data is simply not indexed the same way as it was on the old system, which makes creating a list of every show/movie airing in the next 2 weeks and then filtering it by categories nearly impossible. At least in a reasonable time frame. The old TiVos used only the local data for everything, which included all the extended details for every show. So it was much easier to do it on those units.


How about this... do you think it would be possible to have it return a 'filtered guide' (like for instance Filter (Movies:SyFy) like in the guide... then just grab the whole returned data set from the search (thru modded kmttg).. then pass that to vb or the like to further eliminate redundancies and refine into alphabetical order... or is this beyond the SDK's abilities. I assume that the guide is done thru a local sort of the local data along with other query's to the db. 
That way, the Tivo would do a raw 'genre' enumeration for you (by air time)... you just have to pass it the filter cryteria and 'prod it' for more and more data until whole two weeks for that genre is given over... then strip out the unwanted data (dont need date, time or redundant shows or movie listings). Perhaps a query could be sent from vb to kmttg to Tivo for other details when desired such as show description, etc.
Of course, this would be repeated for each genre of interest until the whole database is converted.


----------



## eherberg (Feb 17, 2011)

It sounds like you would be happier using the raw data you can get from Schedules Direct. Schedules Direct


----------



## mdavej (Aug 13, 2015)

eherberg said:


> It sounds like you would be happier using the raw data you can get from Schedules Direct. Schedules Direct


This is the answer.

If Rovi data had what your proposed program is supposed to pull out and fix all your issues, then the existing One Passes would work and you wouldn't need a custom program. Point is, with Rovi's worthless data, your program is doomed to fail.

Also consider the time you are going to spend writing this program. I bet it's going to be far more than the time you typically spend deleting a couple of programs that shouldn't have been recorded. Just go to your recording list and press Clear to delete in one shot.


----------



## BertPre (Nov 19, 2016)

mdavej said:


> This is the answer.
> 
> If Rovi data had what your proposed program is supposed to pull out and fix all your issues, then the existing One Passes would work and you wouldn't need a custom program. Point is, with Rovi's worthless data, your program is doomed to fail.
> 
> Also consider the time you are going to spend writing this program. I bet it's going to be far more than the time you typically spend deleting a couple of programs that shouldn't have been recorded. Just go to your recording list and press Clear to delete in one shot.


You seem to be posting to this thread in error.


----------



## BertPre (Nov 19, 2016)

eherberg said:


> It sounds like you would be happier using the raw data you can get from Schedules Direct. Schedules Direct


Thats interesting... dont yet know how specific I can get the data for my local cable co (Cox), but it could be an alternate approach should modding kmttg not work out....


----------

