# Tivo Now Playing RSS Feed



## BOfH

I wanted an RSS feed for my Now Playing list that would load correctly inside the Safari RSS reader (and other aggregators). I couldn't find anything that did exactly what I wanted in this space, so I rolled my own...










It's a TivoWeb module that produces a valid XML/RSS feed for your Now Playing list. It includes the title, episode title, summary and correctly formats the date so your aggregator can sort by recording time.

More info and download here: Now Playing RSS

My TivoStatus Wordpress pluging here: TivoStatus


----------



## Gunnyman

VERY Cool
downloading now.
I wonder if there's a way to turn them into links that VLC will play.


----------



## Gunnyman

Oooh.
I get to ASK a tech support question for a change.
When clicking on either a show title or more info I get the following:



Code:


INTERNAL SERVER ERROR
--cut here--
action_showing '/805894/11' ''
invalid attribute: Date
    while executing
"dbobj $showing get Date"
    ("uplevel" body line 8)
    invoked from within
"uplevel $body"
    invoked from within
"transaction {uplevel $body}"
    (procedure "RetryTransaction" line 5)
    invoked from within
"RetryTransaction {
    if { [regexp {([0-9]*)/(.*)} $objectid junk fsid subobjid] } {
      set showing [db $db openidconstruction $fsid $subobjid]
  ..."
    (procedure "::action_showing" line 24)
    invoked from within
"::action_$action $chan $part $env"
    ("eval" body line 1)
    invoked from within
"eval {::action_$action $chan $part $env}"
--cut here--

I'm running the latest TWP and have done a FULL restart.


----------



## BOfH

Two things...

First: links to start VLC - good idea; I'll add a config option to allow it to do that.

Second: I don't use TivoWebPlus, just the stock 1.9.4 TivoWeb. When I click on an episode title from my nowshowing list (http://my.tivo/nowshowing/) I am taken to a URL of the form:

http://my.tivo/showing/$fsid/11

Where $fsid is, obviously, the ID of the show in question.

If someone can tell me the right URL for TivoWebPlus, I'll code it so it works for TWP too.

Is it possible to run TivoWeb and TivoWebPlus on the same box (on different ports)? It'd make debugging stuff like this easier.

*Update*: New Version (0.2) with tivo:// video streaming links. No fix for the other issue yet though.

Cheers,
Howard


----------



## Gunnyman

BofH,
you sure can run both tw and twp on a S1. Series 2 Dtivos are better running tivowebplus because it handles 2 tuners.
twp can be found at http://tivowebplus.sourceforge.net/
This project is awesome by the way.


----------



## BOfH

Gunnyman said:


> This project is awesome by the way.


Thanks! I wasn't sure if anyone else would even want such a thing, but as I'd written it I thought I may as well share!

I've checked the TivoWebPlus code, and it points to the same URL for show info (tivo/showing/fsid/11) so you shouldn't see any errors. Do you get that message for every show in the RSS feed?

Howard
(BOfH)


----------



## Gunnyman

yes I picked 10-15 links randomly they all did it.
is the format of the url correct? http://192.168.1.106/showing/801235/11
just noticed if I use the ui section in twp I get a url with a /12
edited the script replacing the /11 with /12 and all is well


----------



## Gunnyman

ok got new version 
added my /12
turned on vserver links.
what am I missing for those to work? I click on show title and get the infopage (aren't I a PAIN) 
oops spoke too soon
clicking on a show generates this error:
Safari cant open tivo://192.168.1.106/801232 because Mac OS X doesnt recognize Internet addresses starting with tivo:.


----------



## BOfH

Gunnyman said:


> Safari cant open tivo://192.168.1.106/801232 because Mac OS X doesnt recognize Internet addresses starting with tivo:.


Yup, OS X will do that. I have exactly the same issue on OS X. On Windows however I know how to configure IE/Firefox to launch VLC when you click a tivo:// link. Take a look at this guide here.

I've been unable to find a way to configure Safari (or Firefox on OS X for that matter) to behave the same way. If you work it out please let me know!

Those links will work on a Windows aggregator to launch VLC with the correct stream, it's just OS X that it breaks in for now. 

I'll update the code to use the /12 for TivoWebPlus - thanks for that pointer.

Howard


----------



## Gunnyman

Now that you've opened this can of worms 
there's a video enabled aggregator called DTV that is very very new. I've been unable to get my now playing list to show up there though.
check out http://dtvmac.com


----------



## Gunnyman

yet another post from me
I can only get this to work in safari for some reason.
Other aggregators I've tried have said not a valid feed


----------



## Gunnyman

thanks to drewster and more internet http://www.versiontracker.com/dyn/moreinfo/macosx/16066
I got vserver links working in safari!
Very very nice


----------



## bengalfreak

Safari is Mac only right?


----------



## BOfH

bengalfreak said:


> Safari is Mac only right?


Yep. But if you want vserver links working in Internet Explorer or Firefox on Windows, use the registry hack at the bottom of this guide.

I'm going to have to take a look at the feed my RSS module generates, as while it is valid for Safari, it does break other readers.  Time to dig out the official RSS 2.0 spec!

H


----------



## BOfH

Gunnyman said:


> thanks to drewster and more internet http://www.versiontracker.com/dyn/moreinfo/macosx/16066
> I got vserver links working in safari!
> Very very nice


Brilliant! Great find - thanks Gunnyman!


----------



## Gunnyman

Any thing for the ba$tard operator from Hell


----------



## Fofer

I installed this last night and it works like a charm. (Thanks for the inspiration, Gunny. And thanks for creating and sharing a wonderful module, BOfH!) I can view the RSS just wonderfully in Safari. And I was happily surprised to see that it even works when I connect from outside my home network, through a Orenosp Proxy I'd set up for security. :up:


I do notice however that the Series Name as well as the episode description shows... but not the episode title.

For example, last night's Family Guy says:

"Family Guy
Fofer's Tivo
Yesterday, 09:00 PM
Lois learns she has a brother she has never met (Robert Downey Jr.), so she brings him home from a mental institution to live with her family. Read more"

...but nowhere does it say "Fat Guy Strangler." 


And when I click "Read more" it actually starts playing the video via VLC. Which is nice, of course. (Any way to get that link to read "Stream Video" instead? Or is that built in to Safari's RSS rendering engine?)


----------



## BOfH

Fofer said:


> I do notice however that the Series Name as well as the episode description shows... but not the episode title.
> 
> ...
> 
> (Any way to get that link to read "Stream Video" instead? Or is that built in to Safari's RSS rendering engine?)


Hi Fofer - glad you like the module!

I'll take the last question first - the "Read More" is part of the Safari RSS renderer, so we can't change it unfortunately. I could alter the RSS to output a "view video" link at the end of the description, and leave the "read more" to be the link to the info page. What do you think?

As to missing episode titles... when you look at the info page for that Family Guy episode, does it show "Fat Guy Strangler" in the Episode Title row? If my code can't see a valid episode title it doesn't display anything - if it can, it places it in quotes at the front of the description. So you'd have seen:

Family Guy
"Fat Guy Strangler" blah blah description here blah blah _Read More_

If it finds nothing, or "No Episode Title" or "Not an Episode" it doesn't include the quotes.

If your Tivo *does* have an episode title for the show, then we have a problem, which I'm sure we can work out. Which Tivoweb are you using?

Cheers,
Howard
(BOfH)


----------



## Gunnyman

I would love an added video link myself. It would be nice to be able to "see more info" OR "play now"
Great project. I use it daily.


----------



## Fofer

BOfH said:


> I'll take the last question first - the "Read More" is part of the Safari RSS renderer, so we can't change it unfortunately. I could alter the RSS to output a "view video" link at the end of the description, and leave the "read more" to be the link to the info page. What do you think?


That would be great. Right now, clicking the Series name, "Fofer's TiVo," the date of the recording, or "Read More" on any of the entries all do the same thing - they open VLC and allow me to stream the video by clicking the play button. Which works great, BTW.

Not one of the links goes to an "info" page. It would probably make more sense if those thinks all went to an "Info" page... with a new link specifically titled "View Video" taking me to VLC.



BOfH said:


> If your Tivo *does* have an episode title for the show, then we have a problem, which I'm sure we can work out. Which Tivoweb are you using?


Yes, my TiVo does have episode titles for many (if not most) of my shows... but none appear in this RSS page. I am running TivoWebPlus Project - v1.2.1.

Gunny, do you get individual episode titles on your RSS feed?


----------



## Gunnyman

nope 
Law & Order
Living Room Tivo
Wednesday, 10:00 PM
Detectives investigate a series of seemingly random murders. Read more

is what mine says


----------



## bushman4

I'm getting episode titles on my S1 SA...

On another note, I ran my RSS feed through www.feedvalidator.org, and came up with a few problems:



Code:


Feeds should not be served with the "text/html; charset=utf-8" media type

I'm not sure if it's possible to change the media type of a returned page in TWP



Code:


line 2, column 0: This feed is an obsolete version
<feed version="0.3"




Code:


modified must be an W3CDTF date

<modified>2005-12-06 12:57:59</modified>

That should be trivial



Code:


 link must be a valid URI (187 occurrences)
<link rel="alternate" type="text/html" href="tivo://tivo/919360" />

I'm betting that FeedValidator doesn't recognize tivo:// as anything...



Code:


issued must be an ISO8601 date (187 occurrences) 
<issued>2005-12-06 06:00:00</issued>

Trivial as well.

I'm no TCL wiz, but I can take a look and see if I can get it to work right... I'm struggling to get the feed to work as a news feed in xAP News (www.mi4.biz)... it works fine in FeedDemon 1.5...

Bushman


----------



## Arcady

I have this working on my DirecTivo and Mac. It's really cool. However, I am also not seeing episode titles.


----------



## Gunnyman

I think we're seeing some differences between S2 Tivos and/or TWP and older tivoweb.


----------



## bushman4

Do either of you happen to run DailyMail? Do episode Names show up there?

Looking at the module, there is only one difference between how the two pieces of code get the title... DailyMail assumes that all programs are episodic (and hence have episode titles) unless explictly defined as non-episodic.

NowPlayingRSS assumes the oposite...

Try this:
Change this code:


Code:


set episodic [dbobj $series get Episodic]

to This code:


Code:


if {$series != ""} {
set episodic [defaultval 1 [dbobj $series get Episodic]]
} else {
set episodic 1
}

Maybe some of these items are not "episodic" or maybe the "episodic" value is bogus, or named something different.

HTH,

Bushman


----------



## bushman4

BTW, I am using a Series 1 Stand Alone, with the latest and greatest TiVoWebPlus.

And I get episode titles...

(It looks like the comonality has more to do with either Series 1 vs. Series 2, or DTV vs. SA, since Gunny and I are both on the same TWP)

Bushman


----------



## Gunnyman

bushman4 said:


> Do either of you happen to run DailyMail? Do episode Names show up there?
> 
> Looking at the module, there is only one difference between how the two pieces of code get the title... DailyMail assumes that all programs are episodic (and hence have episode titles) unless explictly defined as non-episodic.
> 
> NowPlayingRSS assumes the oposite...
> 
> Try this:
> Change this code:
> 
> 
> Code:
> 
> 
> set episodic [dbobj $series get Episodic]
> 
> to This code:
> 
> 
> Code:
> 
> 
> if {$series != ""} {
> set episodic [defaultval 1 [dbobj $series get Episodic]]
> } else {
> set episodic 1
> }
> 
> Maybe some of these items are not "episodic" or maybe the "episodic" value is bogus, or named something different.
> 
> HTH,
> 
> Bushman


That fixed it for me.
Nice work!


----------



## Fofer

Gunnyman said:


> That fixed it for me.
> Nice work!


Me too! Thanks!



Gunnyman said:


> I think we're seeing some differences between S2 Tivos and/or TWP and older tivoweb.


I was thinking Standalone vs. DirecTiVo. I recall reading some similar notes with other modules and how these units handled episode listings differently.

But here's another wrinkle. This change initially worked for me on one HDVR2 DirecTiVo, but not the other. I could see ep. titles on one, but not the other.  These machines are otherwise identical, modded the same. So I restarted TWP, I cleared my browser cache, etc. Still no episode titles in the RSS feed for unit #2.

Then I realized DTiVo #2 has mostly older recordings (lots of movies, some seasons of shows I am keeping around.) They were all recorded back when I was on 4.0.1b on that unit. (I am now on 6.2.) So I set up a quickie recording of something airing right now, that had an episode title.

Sure enough, the episode title now shows up in the RSS module!

So it's got something to do with SA/Combo, older OS vs. 6.2.

Glad to see it working now for me though.


----------



## Fofer

Just curious, how long after I delete a show from Now Showing should it disappear from the RSS feed?


----------



## bushman4

It will dissappear from the "feed" immediately...

How long it will kick around as a "news item" in your RSS aggregator application is a different story.

Does anyone know if there is a way to expire a news item in a feed? If so, I could add a piece of code to the module to send out expiration messages for each item in the deleted list...

I'm not an RSS whiz... maybe I'll dig out the spec and look into it.

Bushman


----------



## Fofer

bushman4 said:


> It will dissappear from the "feed" immediately...
> 
> How long it will kick around as a "news item" in your RSS aggregator application is a different story.


Ahh... gotcha.


----------



## bushman4

OK, I'm looking into the Spec, and answering a few more questions...

First off, to fix the Feed Modified date replace this line:


Code:


puts $chan "<modified>[clock format [clock seconds] -format "%Y-%m-%d %H:%M:%S"]</modified>"

with:


Code:


puts $chan "<modified>[clock format [clock seconds] -format "%Y-%m-%dT%H:%M:%S"]Z</modified>"

To fix the entry modified date, replace this line (in print_nsrow):


Code:


set timestr [clock format $seconds -format "%Y-%m-%d %H:%M:%S"]

with:


Code:


set timestr [clock format [clock seconds] -format "%Y-%m-%dT%H:%M:%S"]Z

And to deal with empty descriptions (since the summary section of each item should not be blank) replace this line:


Code:


puts $chan "\x5b$eptitle[strim [dbobj $program get Description]]\x5d\x5d>"

with this:


Code:


  set descrip  [dbobj $program get Description]
  set trimdescrip [strim $descrip]
if  {$trimdescrip == "" } {
    puts $chan "\x5b$eptitle No Description\x5d\x5d>"
} else {
  puts $chan "\x5b$eptitle[strim [dbobj $program get Description]]\x5d\x5d>"
}

FeddValidator.org now only complains about feed version and bad links... bad links are going to stay, since it doesn't recognize "tivo://" as a URI, but the version is a different story.

Speaking of that... is this supposed to be in RSS format, or in Atom format? It appears as though RSS feeds should all start with a "<RSS" tag, but this feed starts with "<feed"... I haven't looked into atom format yet, so maybe that's the answer.

More later...

Bushman


----------



## bushman4

BTW, do these changes make it readable in any of the readers that failed before? I'm trying to bring this feed into "spec" and maybe it will be more universally used...

Bushman


----------



## Fofer

bushman4 said:


> Does anyone know if there is a way to expire a news item in a feed? If so, I could add a piece of code to the module to send out expiration messages for each item in the deleted list...


That would be great. 

Because now that I've tested the "episode name" by recording 5 minutes of "Dragon Tales"... and them promptly deleted it... I'm stuck looking at "Dragon Tales" in my RSS feed.


----------



## Gunnyman

wow this has truely become a 'Community" Project!
Awesome.


----------



## Tenacious Lee

I'm not sure if it's because I haven't edited the tcl at all, aside from the variables I'm supposed to- but when I open the feed in Safari, it's just blank.

Any clue as to why?


----------



## ruexp67

I am getting a blank listing when I view it with WIZZ RSS in Firefox on my PC as well. HDVR2 TWP 1.2.1

Even at that, I cannot get this to stream at ALL. I can click on any link and get the TIVO:// link, but it simply will NOT play in VLC at all.  I cut and pasted the link into VLC as described in the blog link, but no joy. I tried disabling my personal firewall and no change.

FWIW I have not been able to get the .asx file to stream to WMP either.

I used the Zipper to hack the tivo. Is there a component I may be missing?


----------



## Gunnyman

vserver


----------



## bushman4

I just realized that the date format that I used in the Modified tags is wrong.

W3C format says (http://www.w3.org/TR/NOTE-datetime) that a date should be in the format:


> YYYY-MM-DDThh:mm:ssTZD (eg 1997-07-16T19:20:30+01:00)


and then give the examples:


> 1994-11-05T08:15:30-05:00 corresponds to November 5, 1994, 8:15:30 am, US Eastern Standard Time.
> 
> 1994-11-05T13:15:30Z corresponds to the same instant.


Since the TiVo's time is in GMT, there is no Time Zone offset... the RSS reader application should do the offset automatically, depending on where it is running (what time zone).

I will edit my other post to reflect the correct format, but essentially, the Global definition I mentioned can be removed again, and replace "[format "%+03d" [expr $tzoffset / 3600]]:00" with "Z"

Bushman


----------



## ruexp67

Gunnyman said:


> vserver


Both HackMan and ps both list vserver as running.

I'll keep digging, thanks for the suggestion though.


----------



## Tenacious Lee

Ditto. Just started up TiVoTool and was able to pull a listing of shows. vserver is running fine.

Hmm.


----------



## bushman4

Are you using TiVoWeb or TiVoWebPlus?

Do you have the TiVoWebPlus variable set correctly?

Bushman


----------



## Tenacious Lee

bushman4 said:


> Are you using TiVoWeb or TiVoWebPlus?
> 
> Do you have the TiVoWebPlus variable set correctly?
> 
> Bushman


Yep and yep.


----------



## Tenacious Lee

Here's a sample of the rss feed generated, which I can view in Firefox/MSIE from work. It looks like a great deal of the variables are somehow getting skipped over, although I can't find where in the code the problem is.



Code:


<?xml version="1.0" encoding="utf-8"?>
<feed version="0.3"
xmlns="http://purl.org/atom/ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xml:lang="en">
<title>Tivo Now Playing</title>
<link rel="alternate" type="text/html" href="http://zaphod.homedns.org/tivo/nowshowing" />
<tagline>What's on Jae's Tivo?</tagline>
<modified>2005-12-08 22:21:09</modified>
<copyright>Copyright 2005</copyright>
<generator url="http://blog.durdle.com/nowplayingrss/" version="0.3">NowPlayingRSS</generator>
The Tyra Banks Show^12/8^Salvaging quick marriages.^A couple who wed just weeks into their relationship and a couple whose shotgun wedding was a disaster try to salvage their marriages.
King of the Hill^12/8^Be True to Your Fool^After Bill gives lice to the other guys, they refuse to drink beer with him.
Yoga Zone^12/8^No Episode Title^
Late Night With Conan O'Brien^12/8^Lindsay Lohan; Colin Hanks; Coldplay.^Actress Lindsay Lohan; actor Colin Hanks; Coldplay performs.
The Simpsons^12/7^The Strong Arms of the Ma^Marge retreats to the basement to lift weights after she is mugged.
</feed>


----------



## bushman4

OK, I did a fair bit of research about Feed Formats.

Turns out, the original BoFH version is really an ATOM 0.3 format, not a RSS 2.0 format...

I did a re-write to convert it from ATOM format to RSS 2.0... now the only issue that FeedValidator.org has with it is the MIME type of the returned feed, which I'm not sure if it's possible to change in TWP.

Major Changes:
1. the Publish Date of each "news item" is the record date of the show, rather than "now"
2. The "more info" link is set to take you to the TWP info page for the show.
3. The bottom of the description has a "-View-" link that should launch VLC or whatever your tivo:// URI handler prefers.
4. All times are in GMT, since that is the native time of the TiVo... your RSS client should then convert it to local time for you...

If you want to run both modules in parallel, you will need to modify the existing module to have a different name. I did this:

* rename nowplayingrss.itcl to nowplayingatom.itcl
* change the last line from:


Code:


register_module "nowplayingrss" "Now Playing RSS" "Now Playing List as RSS"

to:


Code:


register_module "nowplayingatom" "Now Playing ATOM" "Now Playing List as ATOM"

Then upload this new module (after saving it and removing the .txt extension) to your TivoWeb Modules directory, and do a quick restart.

If someone could check this out with other readers, I'd appreciate it.

Thanks,

Bushman

PS, all props to BoFH for his intial work on this module... without him, I never would have thought to modify it...

*EDIT: New version posted on Feb 8, 2006. See post #72 in this thread for more info. The version attached to this message is the updated version*


----------



## Tenacious Lee

Hmm. Just tried your version, bushman and I'm still getting no articles. Very strange.


----------



## Gunnyman

go into teh script and make sure the variable for tivourl is changed to match your tivo's IP.


----------



## Fofer

New one workin' for ya, Gunny? I'll try it out when I get home.


----------



## Tenacious Lee

My tivo's address is 192.168.1.222. I have this mapped in NetInfo Manager to 'tivo'.
I've tried setting the variable in nowplayingrss.itcl to 'tivo' ,'192.168.1.222', and 'mydomain.com/tivo'

Apache has a VirtualHost/proxy set up to send connections at mydomain.com/tivo to the TiVo.

TiVoWeb+ has a prefix set to tivo in tivoweb.cfg, because otherwise the css didn't take (not sure why)

When I connect to http://tivo and then click on nowplayingrss from the menu, it actually takes me to http://tivo/tivo/nowplayingrss, which gives safari a problem (it thinks for a second, then goes to feed:http:// and gives me an error that it could not be located)

If I go to feed://192.168.1.222/nowplayingrss directly, it pulls up the rss page- only it says there are no articles.

Looking at the code I pasted from yesterday, I'm very confused why none of the channel or item information for each show is included when outputting the data (which only shows up in _not_ safari)


----------



## Gunnyman

Fofer said:


> New one workin' for ya, Gunny? I'll try it out when I get home.


yep and it works in my RSS widget too


----------



## bushman4

People who have tried the RSS version, do the item titles show up correctly in your RSS Reader? Not the episode names (ie, the problem that was happening before... Dragon Tales anyone?  ) but the title portion of the RSS items.

In FeedDemon, the encoded titles show up fine, but in the homebrew xAP News application, the titles are blank because of the encoding...

Just curious if your readers are OK with the encoded title. It's in the spec that they should handle encoded titles...

Thanks,

Bushman


----------



## TubaMan-Z

bushman4,

I've installed your RSS-corrected nowplayingrss.itcl module and am trying it out as a Firefox Live Bookmark. In general things work well. However, for those shows that I have marked SUID, I get the info screen that Gunnyman reported back on 11-16-05 (post #3 in this thread). All of my SUID shows are older than the oldest non-SUID show with my newest SUID show being recorded on 12/5 and the oldest non-SUID show recorded on 12/10.

FYI - Using Live Bookmarks for this is not the best. All I get is a list of the same icons - no text at all.


----------



## 11274

Is there a way to actually use this with Firefox Live Bookmarks? Firefox doesn't seem to like the utf-8/CDATA encoding of the Titles.


----------



## bushman4

Sure...

Change:


Code:


  puts -nonewline $chan "<!"
  puts -nonewline $chan "\x5b"
  puts -nonewline $chan "CDATA"
  puts -nonewline $chan "\x5b"
  puts -nonewline $chan "$title"
  puts -nonewline $chan "\x5d\x5d"
  puts $chan ">"

to:


Code:


  puts -nonewline $chan "$title"

and then do a quick restart...

Bushman


----------



## 11274

bushman4 said:


> Sure...
> 
> Change:
> 
> 
> Code:
> 
> 
> puts -nonewline $chan "<!"
> puts -nonewline $chan "\x5b"
> puts -nonewline $chan "CDATA"
> puts -nonewline $chan "\x5b"
> puts -nonewline $chan "$title"
> puts -nonewline $chan "\x5d\x5d"
> puts $chan ">"
> 
> to:
> 
> 
> Code:
> 
> 
> puts -nonewline $chan "$title"
> 
> and then do a quick restart...
> 
> Bushman


Thanks for the tip! However, it turns out that the CDATA is really needed because of the "&" that often appear in Titles and Descriptions.

The issue is really that firefox is sensitive to any white space preceeding CDATA and the easiest fix to satisfy firefox is

116c116
< puts $chan ""
---
> puts -nonewline $chan ""
127c127
< puts $chan "<description>"
---
> puts -nonewline $chan "<description>"


----------



## 11274

By the way, I think the comment

# Are you using TivoWebPlus? 1 if yes, 0 if no.
set tivowebplus 1

is not really correct. What it controls is whether fsid/11 or fsid/12 is used for the link to the showing. That's not a Tivoweb issue at all, it really speaks to the structure of the MFS on the tivo, which is dependent on the version of the tivo software not tivoweb.

For example, on my tivo series 1 with 2.0 software, the correct setting would be 0 even with TivoWebPlus.


----------



## bushman4

Do you know when to use each one? I only have a S1 SA, with 3.0 software, and TWP... that setting was there from when the Bastard wrote the original script.

If someone can provide me with rules, I can program them in...

Bushman


----------



## twynne

Really looking forward to getting this working, but having a couple of teething problems:

1. In my RSS reader (I'm trialing Greatnews if it matters), the date shows up correctly but the time is showing 12:00am on every recording. Any ideas what causes this and if it can be fixed??

2. Like someone else in this thread, I can't get streaming to work for anything. I've installed/run vserver, and get the message 'waiting for connections on port 8074' when run manually from a telnet prompt. Tivo:// links do launch VLC, but it just does nothing. I have downloaded and installed the latest plugins for VLC. Is there anything else I'm missing?

Many thanks,

Tom

Oh, this is a UK S1 Tivo running 2.5.


----------



## twynne

twynne said:


> Really looking forward to getting this working, but having a couple of teething problems:
> 
> 1. In my RSS reader (I'm trialing Greatnews if it matters), the date shows up correctly but the time is showing 12:00am on every recording. Any ideas what causes this and if it can be fixed??
> 
> 2. Like someone else in this thread, I can't get streaming to work for anything. I've installed/run vserver, and get the message 'waiting for connections on port 8074' when run manually from a telnet prompt. Tivo:// links do launch VLC, but it just does nothing. I have downloaded and installed the latest plugins for VLC. Is there anything else I'm missing?
> 
> Many thanks,
> 
> Tom
> 
> Oh, this is a UK S1 Tivo running 2.5.


Quick update - got streaming working. Turns out it was the vstream modules for VLC not being the correct version. I had VLC 0.8.4a and modules 0.8.2. Managed to find the correct version of the modules and it works fine.

Now if I could just sort out the time showing incorrectly in my RSS reader. Does anyone else have this problem with the RSS module, or do you think it's an issue with my reader?

Cheers,

Tom


----------



## twynne

bushman4 said:


> If you want to run both modules in parallel, you will need to modify the existing module to have a different name. I did this:
> 
> * rename nowplayingrss.itcl to nowplayingatom.itcl
> * change the last line from:
> 
> 
> Code:
> 
> 
> register_module "nowplayingrss" "Now Playing RSS" "Now Playing List as RSS"
> 
> to:
> 
> 
> Code:
> 
> 
> register_module "nowplayingatom" "Now Playing ATOM" "Now Playing List as ATOM"
> 
> Then upload this new module (after saving it and removing the .txt extension) to your TivoWeb Modules directory, and do a quick restart.
> 
> If someone could check this out with other readers, I'd appreciate it.
> 
> Thanks,
> 
> Bushman
> 
> PS, all props to BoFH for his intial work on this module... without him, I never would have thought to modify it...


Bushman - I thought I'd try your updated version to see if it resolved my 'time' issues (see above) but I can't even get it to work in Tivoweb. I first tried running the two in parallel. When that failed I removed both and added the new version alone - still no joy. I then removed it and put the old version back and it works fine.

Is there any possibility that this only works with TWP?

Cheers,

Tom


----------



## twynne

Doh - nevermind my last post. I had assumed because clicking the link to the new version in TW was doing nothing (where the old version would actually display within IE) that it wasn't working. Not only is it working but appears to have resolved the time issue... hurrah!


----------



## bushman4

Excellent.

The version I posted follows the RSS 2.0 spec religiously, except for the fact that it is sent out using the incorrect Mime Type, but I don't think TWP has the ability to send out other MIME types.

I will edit the version posted to include the "remove whitespace" changes that were suggested for the title tag. Look for a repost.

Bushman


----------



## thepicman

We use this plugin (Bushman's version) to send the Now Playing list to my wife's WordPress blog. As we did not want to have dead links for the descriptions and did not want the links back to our TiVo to actually work  We made two small changes. (Obviously if you have TivoWeb rather than TivoWebPlus you would need to change the top entrylink value)

* if {$tivowebplus == 0} { 
set entrylink "http://$tivourl/showing/$fsid/11" 
} else { 
set entrylink "http://search.tv.yahoo.com/tvtitlesearch?p={$title}&fsid=$fsid" *

to send the link to the Yahoo tv listing and
*
puts $chan "http://www.tivocommunity.com/tivo-vb/</link>"
puts $chan "<description>Visit the TiVo Community Forums</description>"*

to send the main Now Playing link to the TiVo forums.

Now we have to wonder why anybody would care whats on our TiVo and why we would want to tell them .

We have the WordPress TiVo Status plugin working on a 2 tuner DTiVo as well

http://www.tivocommunity.com/tivo-vb/showthread.php?t=268780

TPM


----------



## bushman4

Glad it works out for you...

Bushman


----------



## Markman07

So what am I doing wrong here.

I see the feed (actually using IE 7 beta preview 2)... and Sage also in Firefox

I see a clickable link on the top called "Tivo Now playing list" that when clicked brings me to the TWP now playing list where I can click View and play the video using TYSHOW.

Below that link are all my shows with a brief description under it. I can click any of the shows in the list and it brings me to a screen again in TWP

(like http://192.168.1.150/showing/85395/12)

I do see a -view- right under each show's description but I can't click on it. I also never see any READ MORE links like I see in the OP.

I am using the Bushman's file found later in this thread. Any ideas?

UPDATE: Installed the VLC media player on my PC now. The View links open the player but nothing shows. ALSO using the VIEW (mplayer) in the TWP Now Playing List does work (using Vserver).


----------



## bushman4

Did you install TyShow as well? That is the codec used to decode the stream...

Bushman


----------



## Markman07

Yes as stated in the prior post - "I see a clickable link on the top called "Tivo Now playing list" that when clicked brings me to the TWP now playing list where I can click View and play the video using TYSHOW." 

In other words I can click the VIEW link when viewing the Now Playing List in TWP (per activating this feature in tivoweb.cfg" and having Vserver running along with the Tyshow installed) This worked before I even found out about this RSS feature...

In my Firefox Sage RSS reader I can click the View button and it launches the VLC media player yet nothing ever happens after that. If I go into the TWP Now Playing List I can click the View link and it launches the TyShow enhanced Windows Media Player and plays the show fine.


----------



## bushman4

Sorry... missed that.

Right click on each of the "view" links (the one in Sage and the one in TWP), copy the shortcut, and paste them into a new post... I'll debug from there.

Bushman


----------



## bushman4

Another question: I guess I misunderstood before. Are you saying that the individual -view- links are not "clickable"?

Sounds like you need to enable hotlinks in messages, but I don't use either reader that you mention.

A feed can have a URL... that is what is taking you to the TWP Now Playing List when you click on the feed title. But items can also have links, which is how the "view" links work.

For debugging, would you try a reader that we know has the ability to have clickable article text, like FeedDemon or something like that?

LMK,

Bushman


----------



## Markman07

Now with SAGE yes I can click the View links but the VLC application launches but nothing happens.

From SAGE - The link properties are tivo://192.168.1.150/80291 for one example.

I will install FeedDemon and try that out.

UPDATE: I got the View link to launch the VLC player now and it works. The VLC was version 8.4 and the Binaries plugins from http://[email protected]#[email protected]@.com now match.


----------



## Leddy

Great script. Here's a few things that I would like to suggest:

1.) Strip out windows EOL (^M) 
2.) Take a look at zNowShowing.itcl on how they decode episode links.
i.e. you use /12 for everything on the "View Article" and most of the time it is wrong. Mine bounce back and forth between 12/13 and on occasion some weird random number. This makes it very difficult to always get information on an episode.

FYI Wizz rss doesn't show any information on feed, but you can click on it and get (in my case) a broken /showing page. However it works beautifully in Outlook 12


----------



## bushman4

Here is a new version with some fixes.

Changes:

Trim whitespace on the Title and Description tags - as requested by KM, these will all be on one line, with no line feeds between the and tags (and the description tags too)
UNIX format - Don't know how that happened before, but it's fixed now.
More Info links - I took Leddy's advice and looked at the ui.itcl (where I get MY Now Playing list from...) for how they constructed their episode links. Because of this, it eliminated the need for the TiVoWebPlus variable to be set, since that was only changing the More Info URLs from /11 to /12.

I'd be interested to see if it works in RSS Agravators that it didn't work in before...

TIA,

Bushman


----------



## Leddy

Well it looks like it is doing something different at least. I am seeing 12's and 13's 

However it gives this error before finishing the page load in FF

INTERNAL SERVER ERROR
--cut here--
action_nowplayingrss '/' ''
can't open object (0x30007)

while executing
"db $db openid $fsid"
("uplevel" body line 2)
invoked from within
"uplevel $body"
invoked from within
"ForeachMfsFileTrans fsid name type $nowshowingdir "" 15 {
set rec [db $db openid $fsid]
print_nsrow $chan $rec
}"
(procedure "::action_nowplayingrss" line 43)
invoked from within
"::action_$action $chan $part $env"
("eval" body line 1)
invoked from within
"eval {::action_$action $chan $part $env}"
--cut here--

I think FF may be re-writing the text and adding ^M. The new version still had them. However I just downloaded through lynx and ftp'd it over to the tivo.


----------



## Luv2DrvFst

twynne said:


> Like someone else in this thread, I can't get streaming to work for anything. I've installed/run vserver, and get the message 'waiting for connections on port 8074' when run manually from a telnet prompt. Tivo:// links do launch VLC, but it just does nothing. I have downloaded and installed the latest plugins for VLC. Is there anything else I'm missing?
> 
> Quick update - got streaming working. Turns out it was the vstream modules for VLC not being the correct version. I had VLC 0.8.4a and modules 0.8.2. Managed to find the correct version of the modules and it works fine.


I know I'm missing something obvious but I just can't figure this out. I've reached this same point and can't seem to get VLC to play. The RSS feed works just fine, and when I click on 'View' VLC opens but does nothing. If I click 'play' then I get this error in VLC:

main: no suitable access module for `tivo://192.168.1.201/2734868'

And the debug log has this:

main debug: adding playlist item `2769369' ( tivo://192.168.1.201/2769369 )
main debug: creating new input thread
main debug: waiting for thread completion
main debug: thread 43228160 (input) created at priority 37 (src/input/input.c:230)
main debug: `tivo://192.168.1.201/2769369' gives access `tivo' demux `' path `192.168.1.201/2769369'
main debug: creating demux: access='tivo' demux='' path='192.168.1.201/2769369'
main debug: looking for access_demux module: 0 candidates
main warning: no access_demux module matched "tivo"
main debug: creating access 'tivo' path='192.168.1.201/2769369'
main debug: looking for access2 module: 4 candidates
access_file warning: 192.168.1.201/2769369: No such file or directory
macosx debug: input has changed, refreshing interface
cdda warning: could not open 192.168.1.201/2769369
main warning: no access2 module matching "tivo" could be loaded
main error: no suitable access module for `tivo://192.168.1.201/2769369'
main debug: thread 43228160 joined (src/input/input.c:386)
main: nothing to play

This is the same thing that happens if I try to click 'View' in the ui screen in TWP. So there must be something wrong with my VLC setup. I am running VLC 0.8.4a but I can't find any other plug-in modules than 0.8.2 (from vlc-082-ty-mac-r45.tar.bz2). My vserver has a date of 8-4-05 (can't find a version number anywhere). Help!

Jim


----------



## bushman4

Leddy,

What version of TW (or TWP) are you running?

I only have TWP to test on... I should install the old TW to see how it reacts as well.

Bushman


----------



## bushman4

Mr. Speeding Ticket,

Do you have tyshow installed? I assume so, since VLC actually opens, so the tivo:// URI is obviously working...

I can't check my settings until I get home...

Bushman


----------



## Markman07

"This is the same thing that happens if I try to click 'View' in the ui screen in TWP. So there must be something wrong with my VLC setup. I am running VLC 0.8.4a but I can't find any other plug-in modules than 0.8.2 (from vlc-082-ty-mac-r45.tar.bz2). My vserver has a date of 8-4-05 (can't find a version number anywhere). Help!"

Yes I had the same problem until I found the two DLL (version .84) on the site we can't talk about. If you can find the .84 files then copy them over the two on your computer (located in the c:\program files\VideoLAN\VLC\plugins"

HINT - Post 15 when you find the thread


----------



## Leddy

bushman4 said:


> Leddy,
> 
> What version of TW (or TWP) are you running?
> 
> I only have TWP to test on... I should install the old TW to see how it reacts as well.
> 
> Bushman


TW+ 1.2.1 on an HDVR2 DTivo


----------



## bushman4

And that message is consistant? Or was it a case of the TiVo having that particular program locked for mainenance of something?

Slightly stumped...

Bushman


----------



## Leddy

bushman4 said:


> And that message is consistant? Or was it a case of the TiVo having that particular program locked for mainenance of something?
> 
> Slightly stumped...
> 
> Bushman


Well it was consistent. Now it's working. Musta been a locked program.

On the plus side. Wizz reader for Firefox now displays the show titles and descriptions. I also get no broken links when clicking on show titles.

GOOD WORK!

Now if I can figure out how to get outlook to open my password protected feed 

Rock on I tried the old http://user:[email protected]/nowplayingrss


----------



## Luv2DrvFst

Thanks, Markman! Everything is all fixed with 'view' and the RSS feed is great! Thanks to bushman and BOfH for the script.

For the record... running Tiger 10.4.4 on a Mac with Safari using More Internet to define tivo:// 

Jim


----------



## Gunnyman

more internet ROCKS!
For some reason the feed is broken in my safari. Works fine in newsfire, and shiira which is odd since shiira uses webkit too.

here's the error:


Code:


Safari cant open the page feed:http://. The error was: unknown error (NSURLErrorDomain:-1) 
Please choose Report Bug to Apple from the Safari menu, note the error number, and describe what you did before you saw this message.


----------



## bushman4

Gunny,

Did that message resolve itself, or are you still having problems?

Bushman


----------



## Gunnyman

still having problems.
What's odd is, it used to work just fine
I think Apple did something to safari.


----------



## Gunnyman

and I THINK I just figured it out.
The rss feed doesn't seem to like using my hostname (livingroom) to get to the tivo
it works just fine if I browse tivoweb using the actual IP.
newsfire works fine using the hostname though.


----------



## pdawg17

Is there a way to use WMP when clicking on a show in the RSS feed?


----------



## Leddy

Hopefully this project is still alive. Have an issue with PPC rss reader. Was hoping you could take a look at it.


----------



## bushman4

Sure...

What is the problem? Is it the lack of Episode Title in the list? Or is it the squares at the end of each line?

Thanks for the (inadvertent) pointer on an RSS reader for pocket PC... it even supports authenticated feeds, which is a requirement if you have your TiVo behind a reverse proxy...

Bushman


----------



## Leddy

I don't mind the title thing. Once you click on it you see all.

I just don't like seeing the square 

You're welcome.They have a number of good RSS readers, but this one is great, especially for free


----------



## bushman4

To get rid of the square, either download and install this new version (attached) or just change one line.

Find this block of code:


Code:


  puts -nonewline $chan "<title>"
  puts -nonewline $chan "<!"
  puts -nonewline $chan "\x5b"
  puts -nonewline $chan "CDATA"
  puts -nonewline $chan "\x5b"
  puts -nonewline $chan "$title"
  puts -nonewline $chan "\x5d\x5d"
  puts $chan ">"
  puts $chan "</title>"

and modify the second to last line:


Code:


  puts -nonewline $chan "<title>"
  puts -nonewline $chan "<!"
  puts -nonewline $chan "\x5b"
  puts -nonewline $chan "CDATA"
  puts -nonewline $chan "\x5b"
  puts -nonewline $chan "$title"
  puts -nonewline $chan "\x5d\x5d"
  puts -nonewline $chan ">"
  puts $chan "</title>"

You just need to modify the second to last line, and add a "-nonewline" to it, to remove the carriage return/line feed between the actual title and the "Close Title ()" tag.

HTH,

Bushman


----------



## Leddy

Editing the file worked awesome!!

Thanks


----------



## lloyd

Has anyone got nowplayingrss working with google reader? I can't seem to make it recognise the output from my Tivo as an rss feed.

Lloyd


----------



## luder

anyone know how to play tivo://tivo.ip/2893099 from tivowebplus?

*edit*

I have change the now playing list links to the above link but, unable to have a rss aggregator to view the shows anyone have any ideas please pm thanks


----------



## ruexp67

bushman4 said:


> Another question: I guess I misunderstood before. Are you saying that the individual -view- links are not "clickable"?
> 
> Sounds like you need to enable hotlinks in messages, but I don't use either reader that you mention.
> 
> A feed can have a URL... that is what is taking you to the TWP Now Playing List when you click on the feed title. But items can also have links, which is how the "view" links work.
> 
> For debugging, would you try a reader that we know has the ability to have clickable article text, like FeedDemon or something like that?
> 
> LMK,
> 
> Bushman


I just had the same problem. I got -View- to appear in the feed using IE7 as the reader, but it is not a link. I tried it with FeedDemon and the link is there. It looks like IE7 does not support embedded links.

I am going to continue to research this, and see if there is a way to turn on Embedded links in IE7 RSS feeds.


----------



## jack

Does this stuff still work? I have a DTV Tivo with 6.2 on it. I download the last 
version of this posted here and I get: 


Code:


http://tivoa/nowshowing What's on Living Room Tivo? en-us Fri, 31 Aug 2007 08:58:15 GMT http://www.tivocommunity.com/tivo-vb/showthread.php?t=271578 NowPlayingRSS (http://blog.durdle.com/nowplayingrss/)

INTERNAL SERVER ERROR
--cut here--
action_nowplayingrss '' ''
can't read "cache_ns_rec": no such variable
    while executing
"lsearch $cache_ns_rec $fsid"
    (procedure "print_nsrow" line 121)
    invoked from within
"print_nsrow $chan $rec"
    ("uplevel" body line 7)
    invoked from within
"uplevel $body"
    invoked from within
"ForeachMfsFileTrans fsid name type $nowshowingdir "" 15 {


set rec [db $db openid $fsid]


print_nsrow $chan $rec


}"
    (procedure "MOD::action_nowplayingrss" line 127)
    invoked from within
"$cmd $p1 $p2 $p3"
    (procedure "do_action" line 19)
    invoked from within
"do_action $action $chan $part $env 1"
--cut here--

when I try and use it.

Thanks - jack


----------



## BOfH

Hi,

I wrote the Now Playing code when I was using a Series 1 UK Tivo - a long discontinued device which is now gathering dust in my attic.

If anyone wants to take the code and ensure it works for later models (including all the new spiffy HD models you get in the US) then feel free. Maybe, if we're very lucky, we might some day get Tivo back in the UK, but I somehow doubt it.

Cheers,
Howard


----------



## BTUx9

jack said:


> Does this stuff still work? I have a DTV Tivo with 6.2 on it. I download the last
> version of this posted here and I get:


You're running an external module with TWP2. 2 problems with that:

1) TWP2 clearly states it broke compatibility with external modules... only those that specifically state they run on TWP2 work

2) TWP2 already has the rss feed rolled into it

try deleting the module and then running "update" within TWP to load the latest version


----------



## jack

BTUx9 said:


> You're running an external module with TWP2. 2 problems with that:
> 
> 1) TWP2 clearly states it broke compatibility with external modules... only those that specifically state they run on TWP2 work
> 
> 2) TWP2 already has the rss feed rolled into it
> 
> try deleting the module and then running "update" within TWP to load the latest version


your right.. I'm a idiot.... I removed the added module, restarted TWP 2.x and 
see the RSS link now. it works.

Sorry.


----------

