1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Discovering the iPad interface

Discussion in 'TiVo Underground' started by wmcbrine, Jan 18, 2011.

  1. moyekj

    moyekj Well-Known Member

    11,141
    31
    Jan 23, 2006
    Mission...
    FYI, played around a little with season passes tonight. Changing priority works as in example:
    Code:
    {"type":"subscriptionsReprioritize","subscriptionId":["tivo:sb.549"],"priority":2516,"bodyId":"-"}
    You 1st need to get season pass Ids then specific data on Ids using "subscriptionSearch" to get the current priority numbers. i.e.:
    Code:
    {"type":"subscriptionSearch","format":"idSequence","noLimit":"true","bodyId":"-"}
    Then for each individual id:
    Code:
    {"type":"subscriptionSearch","objectIdAndType":"581641651692499","levelOfDetail":"medium","bodyId":"-"}
    You get the subscriptionId & priority numbers you need from that.

    (The highest priority doesn't start at 1 like one might expect).
    Also note if you are on the Season Pass Manager screen when you do this it won't show the changes until you exit and come back in (i.e. screen does not refresh).

    One can probably make a backup of all the information obtained in these queries and then use the data to re-create season passes, i.e. Like the crippled tivo.com method but hopefully implemented better. i.e. Finally a season pass backup procedure.
     
  2. orangeboy

    orangeboy yes, I AM orangeboy!

    4,083
    0
    Apr 19, 2004
    East Moline, IL
    You should be able to save a step and get subscriptionId and priority numbers by setting the levelOfDetail (medium or high) in the initial subscriptionSearch, and not specifying the idSequence format.

    As it happens, I too played around with this Request last night, but only had limited "success". It moved a Season Pass that I had in position 2 (priority=2472 for me) to position 29 (priority 2500). I initially set "priorty=2471" to see if it would just swap positions 1 and 2, but was surprised to see it way down the line. Subsequent tries with other values (2472, 1, -5) left the particular Season Pass at position 29.

    Oddly, my priorities were all initially sequential from 2471-2528, then jumped to 2569 for the very last one. After subscriptionsReprioritize, the order was 2471, 2473-2529, with two priorities at 2500. Attempts at creating a responseTemplate to gather only subscriptionId and priority only resulted in "Error parsing subscriptionSearch request". :mad:
     
  3. moyekj

    moyekj Well-Known Member

    11,141
    31
    Jan 23, 2006
    Mission...
    Yes it does seem a little strange. I too was unable to move back to its original place through programming after the initial move but didn't think much of it at the time and figured I just gave it wrong priority #. I can see already where if there are many changes at once things get complicated - probably why the tivo.com method screws things up too. I'm a little weary about experimenting too much as I don't want to screw things up.

    Still think season pass backup is worth investing more time. Probably good way to test that initially is setup a dummy season pass, save the data associated with it, delete it, then see if one can re-create it with saved data.
     
  4. orangeboy

    orangeboy yes, I AM orangeboy!

    4,083
    0
    Apr 19, 2004
    East Moline, IL
    I've got some Season Passes that are now expendable due to Series finales/cancellations (Smallville, V, The Event). Any one of those could "take one for the team". :D

    A couple posts back, I found that Wish List backups may also be possible, with their keywords being made available. Your earlier mention of "gold mine" may well be an understatement! I'm curious what the TiVo folks think about this thread (if they happen to wander away from the main forums)...
     
  5. orangeboy

    orangeboy yes, I AM orangeboy!

    4,083
    0
    Apr 19, 2004
    East Moline, IL
    This has really got me stumped.

    I've found that any reprioritization done through the RPC interface moves the first effected subscriptionId to a priority of 2500 (in my case). Setting a priority value in the request itself appears to have zero effect (at least none that I could observe). The order specified in subscriptionId= is the order of the new priorities, again, starting at 2500 (for me). Based on those observations, I culled all of the subscriptionId values, and placed them into the request, altering the order slightly. The result was the expected order, starting with priority 2500, and running sequentially and consecutively through 2558. OK, no big deal.

    The next thing I tried was to specify only 3 subscriptionId values. These were placed at or near the top of the list, and shared the same priority values with the original top 3 of the list. So I had (2) 2500 values, (2) 2501 values, and (2) 2502 values. Well huh. I used my YATR to rearrange the Season Passes back to their original order through the Premiere's GUI. When I rechecked, the priorities reset back to their original values, starting at 2471, and running through 2529!

    I noticed in arantius' samples, the priorities were 5008, 5013, and 2502. I'm just wondering if 2500 is some kind of magic number.
     
  6. moyekj

    moyekj Well-Known Member

    11,141
    31
    Jan 23, 2006
    Mission...
    I confirmed this worked tonight. I did the following:
    1. Obtained all season passes (using levelOfDetail=medium)
    2. Wrote the entire JSONArray to a file
    3. Read back in the file into a JSONArray
    4. On TiVo I manually removed my lowest priority season pass
    5. Used "subscribe" to schedule the last item in the array using the fields that were already available (loaded from file):
    recordingQuality,maxRecordings,keepBehavior,bodyId,idSetSource,showStatus
    I also had to add the following, otherwise if there are any conflicts scheduling fails:
    ignoreConflicts=true

    Checked Season Pass Manager again and verified it was scheduled in last priority spot and had upcoming recordings showing. Just for grins I also subscribed same one on my other Premiere and verified that worked as well.

    So looks like Season Pass backups are finally a reality for Premieres. Obviously this also serves as a way of copying season passes among TiVos.

    The fun part of this task is now over - now comes more tedious part to write a GUI around it to save to and load from files and selectively choose which ones you want to schedule on a TiVo.
     
  7. orangeboy

    orangeboy yes, I AM orangeboy!

    4,083
    0
    Apr 19, 2004
    East Moline, IL
    Cool! Since idSetSource is an array, what fields did you have to include? Just collectionId to identify the Series?

    ETA: Coupled with a gridRowSearch, I could see extending this function to include a user search option, with a user typing in a Series title and creating a Season Pass for items found in the (current) Guide Data.
     
  8. moyekj

    moyekj Well-Known Member

    11,141
    31
    Jan 23, 2006
    Mission...
    No, I used the entire JSON object as is for idSetSource (as originally read and dumped to file), which in my example was:
    Code:
    "idSetSource":{"collectionId":"tivo:cl.180357353","type":"seasonPassSource","channel":{"channelNumber":"722","channelId":"tivo:ch.9","isReceived":true,"isBlocked":false,"type":"channel","levelOfDetail":"medium","isHidden":false,"callSign":"USAHD","isDigital":true,"logoIndex":66057,"isKidZone":false,"bitrate":"-1476395008","name":"USA Network HD","sourceType":"cable","isFavorite":false,"stationId":"tivo:st.109673805"}}
    
     
  9. orangeboy

    orangeboy yes, I AM orangeboy!

    4,083
    0
    Apr 19, 2004
    East Moline, IL
    An unexpected nicety: videoPlaybackPositionSet works within the Netflix app! I've been working on incorporating the "scrubber" into YATR*, and happened to try it out with Netflix. I was pleasantly surprised to be able to very quickly move to the end of a stream. MUCH faster than the FF found on the physical remote.

    Unrelated, I was wondering about this, found in bodyConfigSearch:

    Code:
    'hasScheduler' : True
    What I was wondering was what hardware doesn't have a scheduler? The TiVo Preview?

    *A sneak-peek of YATR with a small scrub bar attached at the bottom:
    [​IMG]
     

    Attached Files:

    • YATR.jpg
      YATR.jpg
      File size:
      28.1 KB
      Views:
      404
  10. moyekj

    moyekj Well-Known Member

    11,141
    31
    Jan 23, 2006
    Mission...
    FYI, you can use following RPC call to get list of all classic UI destinations for "uiNavigate" calls:
    Code:
    {"levelOfDetail":"high","uiDestinationType":"classicui","noLimit":"true","type":"uiDestinationInstanceSearch","bodyId":"-"}
    
    The summary of uri's for my Premiere:
    Code:
    "x-tivo:classicui:disablehme"
    "x-tivo:classicui:enablehme"
    "x-tivo:classicui:livetv"
    "x-tivo:classicui:messages"
    "x-tivo:classicui:music"
    "x-tivo:classicui:photo"
    "x-tivo:classicui:timechannel"
    "x-tivo:classicui:history"
    "x-tivo:classicui:seasonpass"
    "x-tivo:classicui:settings"
    "x-tivo:classicui:standby"
    "x-tivo:classicui:systeminfo"
    "x-tivo:classicui:todolist"
    "x-tivo:classicui:troubleshooting"
    "x-tivo:classicui:wishlist"
    "x-tivo:classicui:showcase"
    "x-tivo:classicui:playback"
    "x-tivo:classicui:showcasegrid"
    "x-tivo:classicui:suggestions"
    
    Haven't figured out other valid values for uiDestinationType other than "hme" and "classicuI". There may be a way of getting a list of those values...
     
  11. moyekj

    moyekj Well-Known Member

    11,141
    31
    Jan 23, 2006
    Mission...
    To get full list of recordings that will not record:
    Code:
    {"noLimit":"true","state":["cancelled"],"format":"idSequence","type":"recordingSearch","bodyId":"-"}
    
    The above returns full set of IDs. You can then query individual items with levelOfDetail=medium/high to find out the reason why it won't record:

    Code:
    {"levelOfDetail":"medium","type":"recordingSearch","objectIdAndType":"509073884986635","bodyId":"-"}
    
    Then look for cancellationReason in returned JSON. For my list there were various cancellationReason values:
    Code:
    notFirstRun
    recordDifferentShowing
    programGuideChanged
    userCancelledSubscription
    expired
    explicitlyDeletedFromToDo
    gotBetterSuggestion
    programSourceConflict
    
    So now one can filter out reasons that usually we don't care about and only list important ones such as "programSourceConflict".
    Curiously I do not use/enable suggestions, so not sure why "gotBetterSuggestion" is in there...
     
  12. puffdaddy

    puffdaddy Member

    295
    0
    Mar 1, 2006
    Is this was what you were looking for?
    Code:
    livetv
    playback
    showcase
    showcasegrid
    wishlist
    todolist
    seasonpass
    history
    timechannel
    messages
    settings
    systeminfo
    troubleshooting
    networkhelp
    testconnection
    standby
    enablehme
    disablehme
    music
    photo
    demoMode
    repeatGuidedSetup
    externalDrive
    networkSetup
    connection
    watchclip
    channelList
    channelLineup
    restartDvr
    setupDialInNumber
    connectToService
    remoteControl
    suggestions
    thumbs
    myshows
    Unsupported screen identifier: %s
    *Edit* no, I think you were after whether there are any valid values other than "classicui" or "hme", and I don't see any strings evidence of values beyond those two.
     
  13. Fofer

    Fofer XenForo Rocks! TCF Club

    82,105
    293
    Oct 29, 2000
    Wow. Very, very nicely done. :up:
     
  14. moyekj

    moyekj Well-Known Member

    11,141
    31
    Jan 23, 2006
    Mission...
    FYI, I've just released a new version of kmttg (v0p8a) which takes advantage of some of these new discoveries, perhaps most notable the ability to backup season passes for Premieres.

    Thanks again 'arantius' for the reverse engineering, 'orangeboy' for some help testing and others in this thread that have made contributions. There is yet so much to unlock...
     
  15. Fofer

    Fofer XenForo Rocks! TCF Club

    82,105
    293
    Oct 29, 2000
    Thank you, moyekj!
     
  16. innocentfreak

    innocentfreak Active Member

    8,950
    3
    Aug 25, 2001
    Florida
    Nice thanks, downloading now.
     
  17. Fofer

    Fofer XenForo Rocks! TCF Club

    82,105
    293
    Oct 29, 2000
    moyekj, I have downloaded the new version of kmttg. I entered my MAK and I checked the box next to "Enable iPad style communications with this TiVo" and restarted it. Looks great, and works well, for the most part.

    I notice am able to backup my SP's and I am able to see the shows in my Premiere's NP list.

    But when I select a show to initiate playback (and hit the space bar to do so,) I get these errors: "No data available for findRecordingId" or "RPC error response: The active partner ID does not have access to the operation." Basically I am unable to initiate playback on the TiVo of any of these shows, as the release notes indicate I am supposed to be able to do. What am I missing, am I doing something wrong?

    Any help appreciated, and thanks for sharing your great work.
     
  18. moyekj

    moyekj Well-Known Member

    11,141
    31
    Jan 23, 2006
    Mission...
    There was a silly bug for playback which is now fixed with new release v0p8b.

    This one is tougher issue. In normal kmttg operation to download a show one needs a URL from TiVo which is only available through HMO. Hence the Now Playing list you see is still obtained using HMO method (http based).
    However for "iPad playback" functionality one needs a recordingId instead which can only be obtained using RPC calls. i.e. There are 2 different lists of data of the shows, and I have to try and find recordingId in 2nd list based on selection made in the 1st. This is done currently by matching up title, recording date & file size. If a match of all 3 of those is not found then you get above message. My guess would be is the title matching may be failing. Can you post the title of one that is failing? I may just have to re-do logic to not match up titles.
     
  19. Fofer

    Fofer XenForo Rocks! TCF Club

    82,105
    293
    Oct 29, 2000
    Got it working, thanks for the update. And I haven't seen the "No data available for findRecordingId" response again... I wonder if that was a one-time thing from before I clicked on the "Enable iPad style communications" checkbox.

    In any event, it's working now and I like it! Thank you.
     
  20. Jul 9, 2011 #140 of 366
    moyekj

    moyekj Well-Known Member

    11,141
    31
    Jan 23, 2006
    Mission...
    ReplayTV had the ability to identify all Season & Series premieres automatically which was a feature I really appreciated and used a lot. There has never been a good equivalent for TiVo. Finally I have been able to implement something for TiVo now using "gridRowSearch".

    The algorithm that works is:
    Limiting search to 1 channel at a time and then for each JSON entry returned in JSON array looking for:
    collectionType="series"
    episodeNum=[1]
    repeat=false (or no repeat flag present in JSON)
    seasonNumber=1 => series premiere
    seasonNumber>1 => season premiere

    Right now I limit my searches only to certain channels of interest, otherwise the search can take a very long time to complete (I use upcoming 12 days). I plan to release something related to this in next kmttg release, but a GUI for channel filtering is probably going to be needed which will be a pain - I'm really starting to hate GUI programming.
     

Share This Page