# NowPlaying + Play (send keys)



## alan_m_2004 (Jan 6, 2005)

Hi all,

I vaguely remember a discussion about having a link in the (tivoweb) nowplaying list that would trigger playing the recording on tivo, presumably via sendkeys. I think I even contributed to the discussion but can't find it now 

Does anyone have any pointers to this thread or a nowplaying list with 'play' enabled?

Note - I do not want to stream the recording, I want it to play on the tv.

Thanks in advance,

Alan.


----------



## Pete77 (Aug 1, 2006)

The http://tivo.lightn.org/ official support page for TivoWeb shows a Now Playing module just over half way down the page that there is a link to and that is supposed to let you play items in Now Playing directly from TivoWeb.

However I installed it and couldn't get it to work.

I don't know if this is because it doesn't support our UK Tivo 2.5.5 software and expects V3 of the Tivo software or even higher.

I tried emailing the American author Anthony Minessale but got no reply.

If you understand TCL script you might want to investigate the content of the module and see why it doesn't appear to want to work with TivoWeb 1.9.4 and our UK Tivo S1 PVR10UK Tivos. No one ever seems to have mentioned this module or trying to get it working in the Tivo UK section of the forum.


----------



## mikerr (Jun 2, 2005)

Well the script was written nearly 5 years ago in 2002 - he may have moved jobs etc by now 

I just altered a few lines to get it to work on UK Tivos (see attached).

[edit] see post #25  here for an upgraded version with keyword searching & sorting (but without the batchplay)


----------



## Pete77 (Aug 1, 2006)

mikerr said:


> How many screens of recordings do most people have?
> I had to get it to "pageup" to the top of now-playing ... is a max of 40 screens enough (280 recordings) ?


Good work on getting it to function on a UK S1 Tivo.

However I have around 600 recordings here, which is approximately 90 pages of recordings with 7 recordings per page in Now Playing. So you at least need to allow for 100 screens. In theory a 1000Gb Tivo (2 x 500Gb) could have 200 screens of programs at 7 programs per page, although anyone with that much capacity would probably record everything in Best or Mode 0 as the Now Playing menu slow down with 600 recordings is already quite bad.

Any chance you can rework this for at least 100 screens or even 200 screens? My Tivo does ususally remember all the keys sent to it, even though it may take quite a while to act on them.


----------



## mikerr (Jun 2, 2005)

[edit] no limits anymore


----------



## Pete77 (Aug 1, 2006)

mikerr said:


> Ok, I've upped it to 100.
> 
> Test the worst case:
> navigate to the bottom of your now-showing list on tivo,
> then select the last recording on the list to play in tivoweb.


Is your revised version now the one in your zip file a couple of posts above?

If we can get this working properly I can see it being worth adding to the Wikipedia list of TivoWeb modules and it being very popular with TivoWeb users with larger hard drives and a lot of recordings. The thing is the more recordings you have in Now Playing, the more useful this play from TivoWeb option is although the longer it takes to operate......................

What exactly did you have to change from the original version to get it to work on our UK PVR10UK Tivos?


----------



## Pete77 (Aug 1, 2006)

Good news mike as this basically works on my Tivo and keeps playing the correct recording each time. I felt sure it wouldn't do because Autospace suddenly cut in and was doing its thing with getting the top of screen graphic up but as the Tivo IR buffer remembers all the IR input it has received it still ended up playing the correct program. Some I tried playing were a couple of hundred recordings back and it worked!  :up: :up: :up:

The only snag was that it didn't show me my whole Now Playing list but only around 290 items of the 600 or so programs and at the top of the Now Playing screen before the program list it showed this Internal Server Error.



> INTERNAL SERVER ERROR
> --cut here--
> action_now_playing '/' ''
> no such object:
> ...


Did you post your revised version of the itcl that can handle up to 100 pages of programs yet? Or was this it and it still had a problem for some reason. I only downloaded your zip file a few minutes ago so it would have included your revisions if you had posted them yet?

Also the list of programs is basically in date order going backwards (ie conventional Now Playing order from the Tivo itself) but in American date format with MM/DD rather than DD/MM Its basically listing stuff from now back to last August in my case, but I actually have stuff back all the way to 2003 on there, being sad enough to have hung on to programs I especially like. And yes i know I am supposed to archive them to DVD with Ty ThingAMeBob.

Do you know what the TAG box column with 1 in it against each item is about or ditto the tick box next to that? I just clicked the play hyperlink to get each program I wanted to see playing.

For those of us with huge hard drives and loads of programs on them this is a really big improvement in functionality if we can get it to work fully. What did you have to do to the original module written for US S1 Tivos to get it working properly on our Tivos?


----------



## alan_m_2004 (Jan 6, 2005)

Thanks MikeErr - you beat me to the punch as I was about half way through updating the old script for my config. I'll try it tomorrow and report back.


----------



## Pete77 (Aug 1, 2006)

alan_m_2004 said:


> Thanks MikeErr - you beat me to the punch as I was about half way through updating the old script for my config. I'll try it tomorrow and report back.


Calling it "Play from Tivoweb" as a module name rather than Now Playing or Now Showing would be an improvement as I already have Ljay's Now Playing with Sort module installed.

And being able to sort the programs alphabetically rather than only in date order going backwards would be a further big improvement, if of course that's not a huge amount of additional work (which it very probably is).

It seems strange nobody has spotted this old module or tried to do anything with it up to now. Of course you do need to have a big hard drive with lots of recordings like I do for it to become especially useful.


----------



## Pete77 (Aug 1, 2006)

I got away with changing the item name displayed in TivoWeb and the description by changing the bottom line of the ITCL (about the only part of it that's not all Greek to me). This worked and I got Tivoweb Play to appear along with Now Playing Direct from TivoWeb in the TivoWeb menu.

But when I changed the name of the itcl itself as well as changing the reference to the itcl in the bottom line of the itcl file (to make it appear in alphabetical order in TivoWeb) I got:-



> It's about to print out a 404 error. I can tell by the intolerable air of smugness it suddenly generates. It's tivoweb's pleasure to render a page for you and their satisfaction to close the socket afterwards with the knowledge of of a job well done. Thank you tivoweb programmers, "let's not write new features; let's waste a ton of memory on 404 messages" they said. I'm a 404 prototype. You can tell can't you? I hate 404 messages. I'm not getting you down am I?


Another of those amusing little HitchHikers Guide to the Galaxy style error messages that the Tivoweb creators so favoured and that I have met before.............


----------



## TCM2007 (Dec 25, 2006)

mikerr said:


> Ok, I've upped it to 100.
> 
> The problem is as it stands it has to send 100 keypresses to ensure its at the top of nowshowing, and then another 100+ if it has to play the bottom recording !
> 
> ...


There are means of programmatically getting what screen the TiVo is on and what item is selected, but unfortunately there's a bug in the TiVo software in 2.5.5 which you have to patch before it will work.


----------



## Pete77 (Aug 1, 2006)

TCM2007 said:


> There are means of programmatically getting what screen the TiVo is on and what item is selected, but unfortunately there's a bug in the TiVo software in 2.5.5 which you have to patch before it will work.


Setting us a puzzle I see TCM. Perhaps you can elucidate as to what the bug in the 2.5.5 software that needs to be overcome actually is?

However the more crude method of going through Now Playing screen by screen does seem to work 100% reliably. The only limitation at present is waiting while it does this. I don't mind that - what I hated was having to press page down 50 times myself and then usually over shooting. Also having to go back to the top of the list afterwards manually with numerous button presses.


----------



## TCM2007 (Dec 25, 2006)

No puzzle, you're just way off needing that level of detail. Search for "mwstate bug" if you really want to know.


----------



## Pete77 (Aug 1, 2006)

TCM2007 said:


> No puzzle, you're just way off needing that level of detail. Search for "mwstate bug" if you really want to know.


And patching the Tivo software is, in any case, no doubt something we should only really be discussing in the Database of Deals?


----------



## TCM2007 (Dec 25, 2006)

No, you can discuss it here. Many have.


----------



## Pete77 (Aug 1, 2006)

TCM2007 said:


> No, you can discuss it here. Many have.


So its only video extraction talk that must be discussed in The Other Place. Plus of course anything that might involve trying to obtain Tivo service without actually paying for it. Not of course that I would condone anybody trying to engage in the latter practice.


----------



## TCM2007 (Dec 25, 2006)

Thay won't condone stealing TiVo service in DD either.


----------



## Pete77 (Aug 1, 2006)

TCM2007 said:


> Thay won't condone stealing TiVo service in DD either.


No obviously not, although where it gets interesting is if someone wanted to legitimately run a Tivo S3 in the UK and Tivo is refusing to provide an EPG service that the customer is perfectly willing to pay for.............

I wonder how much work does need to be done on Tribune's S1 Tivo database in order to let it adequately support a Tivo S3?


----------



## TCM2007 (Dec 25, 2006)

I doubt there are sigbnificant changes oin the guide data - after all the US data goes out to S1 units too.


----------



## mikerr (Jun 2, 2005)

TCM2007 said:


> There are means of programmatically getting what screen the TiVo is on and what item is selected, but unfortunately there's a bug in the TiVo software in 2.5.5 which you have to patch before it will work.


Yes, mine is actually patched for the mwstate bug, in order to use your (excellent) now-playing sync accross tivos. Most people aren't going to patch their tivos for a tivoweb module though.



pete77 said:


> And being able to sort the programs alphabetically rather than only in date order going backwards would be a further big improvement, if of course that's not a huge amount of additional work (which it very probably is).


Well I can see a use for that for myself, together with a first few letter search - so it might get done.



> Did you post your revised version of the itcl that can handle up to 100 pages of programs yet?


 Current version no longer has any limit (apart from memory). You have this version if you hover over the play link and the browser status bar says something other than "chanup:100"



> Do you know what the TAG box column with 1 in it against each item is about or ditto the tick box next to that? I just clicked the play hyperlink to get each program I wanted to see playing


The tick box is to play each recording in sequence, and the number that appears in the tag box is the playback order in the queue (it makes a script).

To play one recording instantly, just press the play button as you guessed.


----------



## Pete77 (Aug 1, 2006)

mikerr said:


> Yes, mine is actually patched for the mwstate bug, in order to use your (excellent) now-playing sync accross tivos. Most people aren't going to patch their tivos for a tivoweb module though.


Not even most typical Tivoweb users? How hard is it to do? Surely it only involves some Mount and UnMount commands in Telnet followed by some FTP? What other benefits does implementing this patch bring if any?



> Well I can see a use for that for myself, together with a first few letter search - so it might get done.


Ok sounds good news if you can manage to do it.



> Current version no longer has any limit (apart from memory). You have this version if you hover over the play link and the browser status bar says something other than "chanup:100"


It says chanup:86 here but then has select:2',100,100 later on in the line. In practice though the module only manages to show the equivalent of about 43 7/8 item Now Playing screens (the last item being repeated on the next page each time you page up or down) compared to my 90 or so pages worth. Is this why I get the Internal Server Error? 43 pages at 7 items a page is 301 recordings. However I find TivoWeb can show the whole Now Playing list with all 600 items in it with Ljay's Now Playing with Sort or with User Interface/Now Playing modules, so I can't see where in practice this memory restriction comes from?



> The tick box is to play each recording in sequence, and the number that appears in the tag box is the playback order in the queue (it makes a script).
> 
> To play one recording instantly, just press the play button as you guessed.


So these options are not really likely to get much use in the real world, unless wanting to show a bunch of short cartoon programs to the kids in sequence.


----------



## mikerr (Jun 2, 2005)

> It says chanup:86 here


Thats ok then, it means you have 86 pages of recordings, and the latest version of the script.

Does the last recording it shows, or the one after it, have any strange characters in the title? (I doubt its really a memory limit).



> So these options are not really likely to get much use in the real world, unless wanting to show a bunch of short cartoon programs to the kids in sequence.


 I think it was there for batch archiving to a dvd recorder (for those who don't want to go the unmentionable route).


----------



## Pete77 (Aug 1, 2006)

mikerr said:


> Does the last recording it shows, or the one after it, have any strange characters in the title? (I doubt its really a memory limit).


No it just ends with "Seawatch" "Not an Episode" "Wed" "8/2" (2nd Aug) and a nice neat square end to the table. The INTERNAL SERVER ERROR is at the top of the page before the table of programs you can play starts. I get the same result in IE7 and Firefox 2, although IE7 makes you wait until the whole page is finished before you cand see any of it.



> I think it was there for batch archiving to a dvd recorder (for those who don't want to go the unmentionable route).


Or possibly even bulk archiving to VCR in those far off days.


----------



## Pete77 (Aug 1, 2006)

I have now installed the original unmodified version of this module with Tivoweb and whilst unlike your revised version it can't managed to start items playing on my Tivo its listing of my Now Playing screen cuts off at exactly the same Seawatch program last August as your revised version of the module.

Does this still sound like an out of memory issue to you or perhaps something else?


----------



## mikerr (Jun 2, 2005)

Rewritten, more or less from scratch now, as old one was a mess.
Should be no more arbitrary limits in there.

Features:

"Instant" sorting by title, episode or date
"Instant" searching by keyword on title

..and of course direct playback of shows on tivo.

[edit] version 0.22 now searches & displays descriptions too

Bugfix for slower tivos (larger HDDs with no cachecard/ram)


----------



## ColinYounger (Aug 9, 2006)

Hey Mike - dontcha just love users?


----------



## Pete77 (Aug 1, 2006)

mikerr said:


> Rewritten, more or less from scratch now, as old one was a mess.
> Should be no more arbitrary limits in there.
> 
> Features:
> ...


Mike,

As one of those mere annoying *"users"* without the necessary TCL coding skills to do this myself I can now report back as follows in terms of testing of the new module on a Tivo with around 600 items in Now Playing.

1. Firstly I can report total success in terms of managing to list all 600 items in a long Now Playing list without making the module crash. You seem to have possibly achieved this by getting rid of the large Green/Yellow/Blank/Red status icon graphic and also selecting a smaller font size? I notice that you have also dropped the TAG column, as we agreed that this was not really serving a useful function. I also notice that even in Firefox 2.0 the Now Playing list is not shown until the whole list is produced, as was always the case in IE7, whereas before it was produced gradually starting from the top down in Firefox in the old version of this module and also in other versions of Now Playing in Tivoweb.

2. On the rather less positive side I can report that you somehow seem to have accidentally lost the final step in the process which presses the Play button to play the recording. The module now navigates to the recording and selects it but then does not manage to press the play button. This was true for all of the recordings I tested.

3. Navigation to and selection of the recording item to be played back does not now seem to be completely accurate for the programs at the bottom of my admittedly long Now Playing list. My tests so far indicate that the logic works with programs in the top half of the list but then fails with those near the bottom of the 600 so that a program near by in the list but only 3 or 4 away from the desired recording is instead selected.

4. So far as the column sorting function is concerned this only seems to work on the Program (name) column and this only agrees to sort once in reverse sort order from Z to A, at which point the column headers all disappear and the Back button to the previous module listing state does not work. Instead hitting Back takes you back to the main home TivoWeb menu. It is also not possible to sort at all on the Episode or the Date columns, although the list does of course first appear in date order from newest to oldest in any case. I could also see no sign of the search by Keyword function option that you mentioned being available?

So in summary very good progress so far but a little more work still needed to turn this into something that can be proudly shown on the Wikipedia listing of TivoWeb add on modules.

Many thanks for all your hard work on this so far.


----------



## mikerr (Jun 2, 2005)

Pete, I think you downloaded the _cut down test version_, which was on the above post before I updated it and uploaded the fulll version.

The cut down version was _only_ to test reading a very long list of shows >300 , as I see it does now work- everything else didn't work properly as the code had been stripped out.

The full version with searching and sorting was uploaded shortly after and is available in post #25 above.


----------



## randap (Jan 21, 2003)

This is bl00dy brilliant!! Thanks!!


----------



## alan_m_2004 (Jan 6, 2005)

Yes - I'd like to add my thanks to Mikerr for updating the code and also to Pete77 for the initial pointer in the right direction and feedback from his usage.

Sadly work has got me swamped again so I haven't had the chance to install and do any testing myself


----------



## mikerr (Jun 2, 2005)

I've updated it to work better with slower tivos (without cachecard RAM)

get it in post #25 here


----------



## Pete77 (Aug 1, 2006)

mikerr said:


> I've updated it to work better with slower tivos (without cachecard RAM)
> 
> get it in post #25 here


Hi Mike,

Many thanks for trying to improve this module further for us users with slow Tivos. In my case the slowness is due to 600 Now Playing recordings, even though I do have a Cachecard and 512MB of RAM.

Unfortunately I must report little change in performance from behaviour by your earlier revised version (which I meant to give user feedback on and then never did).

Basically if I pick items near the bottom of my list of 600 Now Playing items it seems to get it right for the first item I choose (if my Now Playing list was previously near the top in its focus) but then seems to be out by a handful of recordings if I try to go from one Now Playing Item I have picked and that is playing directly to another.

Also the module does not seem fully reliable about managing to get the item you have selected playing automatically unaided. For instance when I picked the very bottom item out of my 600 plus items today your utility did manage to navigate to it and select it but did not set it off playing. But when I then selected other items near the bottom of the Now Playing list while already playing another one at the bottom of the list although your utility then selected the wrong items by 2 or 3 programs it did manage to set it off playing.

To be honest all of the above is pretty much how your module was performing after the last revision and I can't see many differences.

In essence I can at least save time with your module to get somewhere near the item I want to play at the bottom of my long list without having to cursor down manually 90 times but I still have to do the final selection manually by hand. However a useful feature to add to your module and not presently available would be a function to auto return the Now Playing selection focus to the top of the list.

So far as the title of the module is concerned I already have Ljay's module entitled "Now Playing" with the description "Now Playing with Sort" so in order to differentiate your module from it properly by name it would be good to call it something like "Play From Tivoweb" with the description "Start Now Playing Items Direct From TivoWeb").

Anyhow leaving aside my other minor suggestions on module title and the addition of an auto return to the top feature unfortunately I must report that for my 600+ item Now Playing list but with Cachecard and 512MB of RAM and also using autospace in Now Playing your module still doesn't seem to be working totally reliably, even though it is so nearly almost there.


----------



## mikerr (Jun 2, 2005)

It seems tivo is sometimes missing/discarding kepresses if there is a lot of disk activity (like displaying the now-showing list). I have it 100% reliable on my cachecard tivo with ram, but less reliable on my ram-less tivo....

Bottom of the list just has more keypresses to get to it, so higher chance of failure. It may just be a matter of adding some delay between keypresses.
There is a logic error for the bottom 7 items where its off by one though

BTW going to the url:
http://tivo/now_playing/tivo/select/chanup:100
will move the now-playing to the top.

I'll be doing some work on it tonight, possibly adding mwstate version which bypasses the need for keypresses.


----------



## Pete77 (Aug 1, 2006)

mikerr said:


> I'll be doing some work on it tonight, possibly adding mwstate version which bypasses the need for keypresses.


I think the mwstate approach without the numerous keypresses would be the solution if you are able to get it to work.

Although with its very long Now Playing list my Tivo does sometimes take a long time to respond to IR remote input it does normally always seems to accept all the input and act on it eventually without missing any key strokes so I don't know why this happens with your module when no real IR is involved.

I wasn't aware of the logical error problem for the bottom 7 items in the list so will now focus my testing efforts more on items not in the bottom 7 of the list.


----------



## mikerr (Jun 2, 2005)

Your remote IR might send 1 keypress per second, the script often sends over 100-200 keypresses to select a show, poor tivo gets swamped


----------



## alan_m_2004 (Jan 6, 2005)

Hi Mikerr,

Is there any way to include logging in the code? I finally got around to using this in anger and everything seems to work (delete, search etc) up to the send keys portion.

My tivo url is http://192.168.1.10/tivo/ (noting the suffix). I'm running TivoWebPLus v1.3.1.

If I go to http://192.168.1.10/tivo/now_playing/tivo which I hoped would send the tivo key not much happens beyond opening the now showing screen. Similarly if I use the play link, I get a popup with noplaying inside.

I have changed the SendKeys line to an absolute path /var/hack/TivoWebPlus/bin_ppc/SendKey $key
running this from a command line generates the expected response from tivo (eg /var/hack/TivoWebPlus/bin_ppc/SendKey tivo presses the tivo button)

Also as an aside I do have mwstate bug fix installed if you need a tester but as you might have noticed I haven't got much free time at the moment (w*rk  )

Thanks in advance,

Alan.


----------

