TiVoWeb Module : Manual Record

Discussion in 'TiVo Underground' started by cwingert, Jun 12, 2003.

  1. Apr 2, 2005 #141 of 287
    asantaga

    asantaga New Member

    44
    0
    Nov 12, 2004

    Advertisements

    Hi,

    Yes (number of times!), just did it again, just to be sure it wasnt setting to BST because of something else.. but no

    I've also noticed that my other windows box, (with cygwin) when I do "$ date" i get

    Sun Apr 3 01:40:49 GMTDT 2005
    whereas the tivo
    Sun Apr 3 00:41:15 localtime 2005

    Is that the problem??

    Angelo
     
  2. Apr 2, 2005 #142 of 287
    asantaga

    asantaga New Member

    44
    0
    Nov 12, 2004
    I think I've found it.. As previously said when i print out tzoffset in manrec, I get zero..
    looking around the mfs, I see the following

    Setup 1418973/10 {
    Version = 856
    ServiceInfo = 1418973/11
    CallWaitingPrefix = {}
    ....
    ThumbsLogMagicNumber = 810666704
    DialPrefix = {}
    TimeZone = 7
    DaylightSavingsPolicy = 0
    Complete = 7
    BannerTimeout = 250
    ....

    Is this the problem???

    Angelo
     
  3. Apr 3, 2005 #143 of 287
    john1980

    john1980 New Member

    179
    0
    Jun 17, 2004
    New Zealand
    This should probably be set to 0 when running in GMT. The attached script should do this for you. It is also interesting to note that to set a US (3.0) unit to GMT the timezone setting is '7', but this is held in /State/LocationConfig/TimeZoneOld.
     

    Attached Files:

  4. Apr 3, 2005 #144 of 287
    asantaga

    asantaga New Member

    44
    0
    Nov 12, 2004
    Thanks!

    Yep the script (kindof) worked... Initially it didnt work as tivoweb still reported the timezone offset (DST) to be zero. however after some hacking/trawling through tivoweb's source code (http-dd.tcl to be precise), I found that I needed to set DaylightSavingsPolicy to 2..

    Why 2, Im not sure, a value of "1" would have made sense, but the code checked for 2.. so 2 it was...

    Anyway, now it works! and I wont miss programs again...

    Im not sure why te timezone was set to 7 im not sure....

    Thanks again!
    Angelo
     
  5. Apr 3, 2005 #145 of 287
    asantaga

    asantaga New Member

    44
    0
    Nov 12, 2004

    Advertisements

    Hi,

    On a different subject Im working on a pet project to create a webinterface which will eventually call manrec to create a recording.. So far so good, but Im having trouble with the "Single Showing Date" field.

    I've worked out that its epoch time, seconds since 1-jan-1970, but my calculations dont work out..

    Is it seconds since 1-jan-1970, or is there a timezone element to it??

    Angelo
     
  6. Apr 7, 2005 #146 of 287
    dgilbert

    dgilbert New Member

    73
    0
    Sep 1, 2001
    Royersford, PA
    I recently installed the Manual Record module, but I have a couple questions about how it works. What does the "Repeat Options" do if you don't specify to create a SP? In other words, if I schedule a time slot and set the repeat to Every Sunday and set "Create Season Pass" to No, how many times will the time slot be recorded? Also, if I set "Create Season Pass" to Yes, does this module create a manual recording season pass the same as if I did it from the Tivo? Thanks for any help.
     
  7. Apr 7, 2005 #147 of 287
    john1980

    john1980 New Member

    179
    0
    Jun 17, 2004
    New Zealand
    It will create a manual recording repeating for "ToDo Repeat Weeks" which is not linked to a Season Pass.

    It will schedule a recording on Sunday for the number of weeks you have specified under "ToDoRepeat Weeks" (defaults to two weeks). It will not be linked to a Season Pass, so you will not be able to rotate (or limit) the number of episodes that are recorded. For example if you chose "Every Sunday" and set "ToDo Repeat Weeks" to "four months" then in four months time you would end up with 16 episodes on your TiVo (assuming you had the space to store them all).

    The option to not create a Season Pass was added as people without full subscriptions were unable to create a manual recording more than two weeks in advance (see previous posts in this thread). It also keeps things quite a bit cleaner if you mix a number of manual recordings with real SeasonPasses/Wishlists.

    If "Create Season Pass" is yes, then it mimics exactly what would happen if you were to schedule a recording via the TiVo GUI.
     
  8. Apr 8, 2005 #148 of 287
    dgilbert

    dgilbert New Member

    73
    0
    Sep 1, 2001
    Royersford, PA
    Thanks for the answers. :)
     
  9. john1980

    john1980 New Member

    179
    0
    Jun 17, 2004
    New Zealand
    Sorry for the tardy response... I seem to have missed this message in the past. The answer to your questions can be found in the code for manrec.itcl. The "Single Showing Date" field is called 'wodatetz' and is calculated as the number of seconds since 1-JAN-1970 until the start of the day in localtime (eg with timezone adjustment).

    So to use todays date the calculation would be:
    Code:
    set wodatetz [expr ([clock seconds] + $tzoffset) - (([clock seconds] + $tzoffset) % 86400)]
    
    If you wanted to use a different date you could replace "clock seconds" with a "clock scan ..." statement.
     
  10. asantaga

    asantaga New Member

    44
    0
    Nov 12, 2004
    thanks John ( I assume its John).

    As soon as I have this little app working I'll email to the group.

    Angelo
     
  11. ThurstonX

    ThurstonX New Member

    70
    0
    Jan 28, 2005
    VA
    FWIW,
    those using manrec.itcl on dual-tuner-enabled D*TiVos may find the following useful. From manrec.cfg:

    set recqual 100
    set titlestr "Forcing a Rec will delete any previously scheduled Rec!"
    set descriptionstr "Have you double-checked the To Do list?"

    The first sets quality to "Best" though I imagine D*TiVos just ignore any quality settings. The second two will serve as a reminder to check the To Do list for any conflicting recordings, as forcing a manual recording will remove any previously scheduled recordings that fall anywhere in the manual recording's range.

    Edit the values of set titlestr & set descriptionstr to suit yourself.

    On a related note, does anyone with TCL'ing TiVo experience (John1980? WyngNut?) think it might be possible to add the ChannelGrid's dual tuner functionality, specifically the tuner conflict code, to manrec.itcl? Or am I wasting my time? I'm going through both now, but I ain't no programmer. If I stumble across success, I'll pick myself up, dust myself off, and let y'all know.

    [Edit] Now I'm beginning to think the D*TiVo conflict resolution in TWP is handled somewhere in the "core" TWP distribution, rather than in ChannelGrid. Please correct me if I'm wrong. Just thinking out loud here...[/Edit]
     
  12. john1980

    john1980 New Member

    179
    0
    Jun 17, 2004
    New Zealand
    This could make things rather complex... I have no access to a dual tuner unit so have no idea how to schedule a recording on a particular tuner... I am guessing that it is just a field in the database entry. You might want to browse the MFS to see what that extra field may be... and what values it supports. The following is an entry from the MFS database (/Recording/Active) from a single-tuner unit to compare against.
    Code:
    Recording 1504139/10 {
      Version        = 1
      BitRate        = 0
      ErrorString    = {Manual Todo by Wyngnut}
      ExpirationTime = 0
      ExpirationDate = 12919
      RecordQuality  = 75
      Score          = 0
      SelectionType  = 5
      StartDate      = 12913
      StartTime      = 83100
      State          = 6
      StopDate       = 12913
      StopTime       = 87300
      Showing        = 1504139/11
      IndexUsed      = 1504139/11
      IndexPath      = /Recording/Active/4:12913:83100:1504139
    }
    
    Then you need to figure out if the unit will optimise it's tuner use... for example if you wish to record channel 1 from 7:00-7:30 and channel 2 from 7:30-8:00 then will it use a single tuner for that, or will it place the recordings on differnet tuners?
    This could cause an issue as if you wish to create a Manual recording from 7:00-8:00 then you would need to try move the existing recordings, or prompt for which one to cancel.

    Essentially it would make things very complex, and I think the best option would be to manually resolve the conflict? Still... if you have a play with the various options then you might be able to find something that works pretty well.
     
  13. ThurstonX

    ThurstonX New Member

    70
    0
    Jan 28, 2005
    VA
    Yes, it would :) But aren't you the same john1980 who modified Wyngnut's ChannelGrid mod? Apologies if I'm mistaken. That mod, or something that mod calls (something already built into TWP 1.1-pre2?), knows how to handle dual-tuners. In ChannelGrid, if I click on an epsiode, then Record, then from the Recording Options screen I click Conflicts, whatever code that is looks for scheduled recordings on both tuners (maybe that's the wrong way to think about it programmatically) and says either:

    "Conflicts exist for only one tuner. Continuing will not cancel anything listed."
    or
    "Conflicts exist for both tuners. Continuing will cancel all listed conflicts.
    To avoid having all conflicts deleted, please free up one of the tuners by
    manually deleting one or more of the conflicts and try again."

    [these @, e.g., http://tivo/conflicts]

    So there's a check done, but the "Force" option of manrec.itcl would seem to be in affect here, since this method of scheduling a recording would also whack both, just like manrec.itcl.

    If that tuner conflict check functionality is not part of ChannelGrid but is some standard TWP code, couldn't manrec.itcl be modified to make the same call, or is that not possible?

    Maybe I'm missing something, but given the above example, the conflict resolution strategy seems to be, Warn User of Two Conflicts, Suggest Manual Deletion of One, or Let User Whack Both in Favor of This One.

    The manual resolution is the only option available right now to the dual-tuner-enabled D*TiVo crowd, and it's rather a pain. To use manrec.itcl, we must first identify the conflicting recordings, and rechedule it (or one of them if both get whacked) after forcing manrec.itcl to schedule its recording, which is what does the whacking.

    There are only a few instances where I use manrec.itcl, but one is with the MLS DirectKick package. DirecTV just schedules huge blocks of time for a game, so using standard TiVo scheduling methods is wasteful, at best (6 or 8 hours for a 2 hour game). Scheduling it through the TiVo interface using Record by Channel (so, a manual recording) works, of course, but where's the fun in that? Also, that's not possible when accessing it from work, for example. The beauty of TWP.

    Anyway, thanks for the advice. Please correct any false assumptions in the above.
     
  14. john1980

    john1980 New Member

    179
    0
    Jun 17, 2004
    New Zealand
    It seems it is the ui.itcl module that performs the dual tuner conflict resolution. Rather than re-invent the wheel, I might see how easy it would be to provide a hyperlink to this module when a conflict is detected under manrec.itcl.
     
  15. ThurstonX

    ThurstonX New Member

    70
    0
    Jan 28, 2005
    VA
    Thanks for investigating that. Got pulled away into other things. If you could make that mod, you'd likely make more than a few D*TiVo owners happy.
     
  16. john1980

    john1980 New Member

    179
    0
    Jun 17, 2004
    New Zealand
    This version checks to see if you are running a dual-tuner unit and if you are then it will be a little smarter on the way it handles conflicts. It should ignore "conflicts" if a free tuner is available to record the show. If there are no tuners available to record the show then the conflicting shows will be displayed, and if you "force" the recording then all conflicts will still be removed.

    The dual-tuner support will only work for TivoWebPlus users.... while with a little more coding it would be possible to get this working for TivoWeb-1.9.4 users, there seems little point as the dual-tuner support in TivoWebPlus would make moving to it a very good idea for DTiVo users.

    [I have no way of testing this so please let me know if it works and I will remove the beta status]

    UPDATE: Final version now posted here.
     

    Attached Files:

  17. Jul 1, 2005 #157 of 287
    linenoise

    linenoise GOD

    11
    0
    Aug 18, 2004
    Would there be a possibility of adding a feature that removes the "manual recording" tag automatically?
     
  18. Jul 1, 2005 #158 of 287
    rbautch

    rbautch User

    3,629
    0
    Feb 5, 2004
    Chicago, IL
    Very cool module. The greatest use for me will be that I can record the naked channel and give it my own title, like "rebuilding carburators" so my wife will never notice it in the Now Playing list. Anyway, all worked fine except for the way it handles conflicts. Even though there was only one conflict, it would not schedule the recording on the other tuner. Let me know if I can be of any help troubleshooting this.

    not sure if it makes a difference, but the one conflict happened to be a manual recording initiated by this module.

    edit: Actually, this is precisely the problem I was encountering. The module handles conflicts fine for shows that were scheduled through the Tivo user inteface. It also handles conflicts with a manually scheduled recording (entered with this module) just fine, but only if that recording is already under way. The bottom line is that you cannot create 2 manually scheduled recordings to occur in the same time slot with this module, until one of them has already begun recording. Hope this makes sense. Not a big issue anyway.
     
  19. Jul 1, 2005 #159 of 287
    ThurstonX

    ThurstonX New Member

    70
    0
    Jan 28, 2005
    VA
    John, sorry for the delay in getting back to you. Somehow I missed your post from 4/27. Did a few tests. Here are the scenarios and results.

    With only one program scheduled, the module reports:

    <Program> on <Channel> conflicts.
    No recording scheduled!


    With two programs scheduled, the module errors out with:

    INTERNAL SERVER ERROR
    --cut here--
    action_manrec '' 'set "titlestr" "1.8 beta mod test";set "descriptionstr" "Two recordings scheduled.";set "chnsel" "9506";set "repeat" "once";set "weeks" "2";set "wodatetz" "1120176000";set "wotimetz" "22";set "womin" "30";set "durationstr" "60";set "ratingstr" "1";set "recqual" "100";set "forcerecord" "0";set "createSP" "0";set "submit" "Record";'
    can't read "db": no such variable
    while executing
    "db $db openid $conflict"
    ("uplevel" body line 2)
    invoked from within
    "uplevel $body"
    invoked from within
    "transaction {uplevel $body}"
    (procedure "RetryTransaction" line 5)
    invoked from within
    "RetryTransaction {
    set rec [db $db openid $conflict]
    set showing [dbobj $rec get Showing]
    set showingfsid "[dbobj $showing fsid]/[dbobj $s..."
    (procedure "RecConflictsList_Dual" line 15)
    invoked from within
    "RecConflictsList_Dual $starttime $endtime "
    (procedure "::action_manrec" line 232)
    invoked from within
    "::action_$action $chan $part $env"
    ("eval" body line 1)
    invoked from within
    "eval {::action_$action $chan $part $env}"
    --cut here--


    Hope that helps. Thanks for your efforts.
     
  20. Jul 1, 2005 #160 of 287
    rbautch

    rbautch User

    3,629
    0
    Feb 5, 2004
    Chicago, IL
    Here's a few other quirky errors I get, depending on what conflicts are encountered:
    Code:
    INTERNAL SERVER ERROR
    --cut here--
    action_manrec '' 'set "titlestr" "Magnum, P.I.";set "descriptionstr" "Manual Recording";set "chnsel" "4318";set "repeat" "once";set "weeks" "2";set "wodatetz" "1120176000";set "wotimetz" "23";set "womin" "";set "durationstr" "25";set "ratingstr" "4";set "recqual" "75";set "forcerecord" "0";set "createSP" "0";set "keepdays" "6";set "keepmost" "5";set "submit" "Record";'
    syntax error in expression "1120176000 + ( 23 * 3600 ) + (  * 60 )"
        while executing
    "expr $wodatetz + ( $wotimetz * 3600 ) + ( $womin * 60 )"
        (procedure "convert_time" line 5)
        invoked from within
    "convert_time $wodatetz $wotimetz $womin $durationstr "
        (procedure "::action_manrec" line 223)
        invoked from within
    "::action_$action $chan $part $env"
        ("eval" body line 1)
        invoked from within
    "eval {::action_$action $chan $part $env}"
    --cut here--
    and this one:

    Code:
    INTERNAL SERVER ERROR
    --cut here--
    action_manrec '' 'set "titlestr" "Magnum, P.I.";set "descriptionstr" "Manual Recording";set "chnsel" "4318";set "repeat" "once";set "weeks" "2";set "wodatetz" "1120176000";set "wotimetz" "22";set "womin" "30";set "durationstr" "90";set "ratingstr" "4";set "recqual" "75";set "forcerecord" "0";set "createSP" "0";set "keepdays" "6";set "keepmost" "5";set "submit" "Record";'
    can't read "db": no such variable
        while executing
    "db $db openid $conflict"
        ("uplevel" body line 2)
        invoked from within
    "uplevel $body"
        invoked from within
    "transaction {uplevel $body}"
        (procedure "RetryTransaction" line 5)
        invoked from within
    "RetryTransaction {
    		  set rec [db $db openid $conflict]
    		  set showing [dbobj $rec get Showing]
    		  set showingfsid "[dbobj $showing fsid]/[dbobj $s..."
        (procedure "RecConflictsList_Dual" line 15)
        invoked from within
    "RecConflictsList_Dual $starttime $endtime "
        (procedure "::action_manrec" line 232)
        invoked from within
    "::action_$action $chan $part $env"
        ("eval" body line 1)
        invoked from within
    "eval {::action_$action $chan $part $env}"
    --cut here--
    
    hope this helps...
     

Share This Page

spam firewall

Advertisements