View Full Version : TV listings in XML (XMLTV)
quixote
December 1st, 2004, 05:14 PM
Ok. new thread on the topic.
No problem. When you start that post, can you let me know if your ATI All in Wonder has a scheduling app included with it. Some tv cards have a scheduling app that uses a ".tvpi" or ".tvvi" file type to set scheduled recordings. If your card uses that too we can easily get the selected program's data into your scheduling app.
Chris
I looked at the program bundled with the ATI All-in-Wonder video card. It's called Gemstar. It seems that they've been very careful to make it as un-customizable as possible, so that you are forced to look at advertisements for a video card that you already bought. (idiots)
I also managed to find the XMLTV app on sourceforge. The latest packaged version (as of Dec. 1 2004) can be found at http://prdownloads.sourceforge.net/xmltv/xmltv-0.5.37-win32.zip?download
I downloaded it and ran it, and it asked me to configure it. While going through the configuration, it mentioned that I need to register at www.labs.zap2it.com. I also found a serial to use when registering displayed in the command window during configuration. So, after filling out the form and registering I ran the grabber again and got the updated listings.
I cannot find the .XML file however, even though I watched the progress meters through the whole process.
VaioUserChris
December 1st, 2004, 07:04 PM
Have you tried doing a search for ".xml" files? It should be something like "TVData.xml".
You're goal was to be able to search for a program in an XMLTV file, then schedule that program to record on your video card. Sounds like an interesting project - if you're up for it, so am I.
I'd break that project up into three pieces:
1) A program that searches through the xmltv file to find the program you want (which sort of exists here (http://www.promixis.com/phpBB2/viewtopic.php?t=9239&highlight=) - although it will require a bit of customizing)
2) A program that takes that output and schedules it for a future recording
3) A program that watches all scheduled recordings and starts the recorder at the appropriate time (since we can't use the scheduling program that was included with your card).
Let's tackle each of these one at a time. Let me know when you find your XMLTV file. Then we can start to work on the first piece.
Thanks,
Chris
P.S. Have you already taught Girder the commands to control your video recording software? Specifically:
a) open your video card's recording program
b) change the channel by typing in any channel number
c) start a recording
d) stop a recording
e) close the recording program
f) minimize the recording program (optional)
If not, I'd work on setting those up because eventually we'll need them.
quixote
December 2nd, 2004, 01:44 PM
Ihave searched for the .xml file, and it does not exist. Everytime I run the command line xmltv.exe tv_grab_na_dd, it goes through the whole routine, and I can pause the scrolling text to see that it is in fact the correct data, but after it finishes I still cannot find the file. I will try configuring it again and see if that helps.
As for opening the recording program etc. that should be quite easy. I will wait until I can ge the data and do various searches before I get into that because it will only take me an hour or so.
If possible, I would also like to implement something that would allow me to check what is on at a certain time on a certain channel and have it return the title and description.
I'll be right back...
VaioUserChris
December 2nd, 2004, 02:00 PM
I'm not sure if this will help, but here's the bat file that I used to configure and pull my first listings:
set tz=pdt
%1 tv_grab_na_dd --configure
%1 tv_grab_na_dd --output xmltv\TVDatapre.xml --days %2 --old-chan-id
%1 tv_sort --output xmltv\TVData.xml xmltv\TVDatapre.xml
exit After configuration, I used this code instead
set tz=pdt
rem %1 tv_grab_na_dd --configure
%1 tv_grab_na_dd --output xmltv\TVDatapre.xml --days %2 --old-chan-id
%1 tv_sort --output xmltv\TVData.xml xmltv\TVDatapre.xml
exit
Chris
quixote
December 2nd, 2004, 02:18 PM
The batch files did not work at all.
:-?
quixote
December 2nd, 2004, 02:34 PM
BINGO!
What I had to do was replace the 1%s with the full path of XMLTV.exe (in my case \XMLTV_Automate\XMLTV.exe, change the paths of the .xml files and I set the 2% as 1 for the number of days for now.
I now have the TVdata.xml file in the appropriate directory.
Thanks for the batch files.
VaioUserChris
December 2nd, 2004, 09:46 PM
Cool. Now on to searching...
First, you'll have to tweak my GML so it knows where to find your XMLTV file. Go to the command named "Search XMLTV Script" and change the following code so that it points to the directory where your XMLTV file resides, and matches the name of your XMLTV file:
-- First off we need to define where the XMLTV data resides
local openfilename1 = "C:\\Program Files\\TVHolic 1.9.2\\xmltv\\" -- directory where data resides
local openfilename2 = "TVData.xml"
local openfilename = openfilename1..openfilename2 Once you've done that, you should be able to run a test search by testing the "Search form - OSD" command.
Just enter your search terms and click the "Search" button.
The search is case sensitive but I have a tweak to fix that once we confirm it's running correctly on your system.
Try it out and let me know how it goes.
Thanks, Chris
quixote
December 3rd, 2004, 02:01 PM
Cool. I'll do that in a bit, but I just found the XMLTV plugin. Have you looked at it yet, Chris? It looks to be very useful. Here is a link discussing it:
http://www.promixis.com/phpBB2/viewtopic.php?t=9712&highlight=xmltv
Let me know what you think. It may offer a significant shortcut to what I'd like to do. Perhaps we can combine your method with curtis'?
curtiswren
December 3rd, 2004, 05:09 PM
I've just uploaded a new version of the XMLTV plugin that adds searching capability. I've attached it here to because I had to do a new upload rather than modify the existing one. I think they're still working the bugs out of the upload section.
Here's an example of how to use it. (this is in the readme). I ran this on a 27MB xml file, and it takes about 20 seconds to load, but then searching is instantaneous. The load time shouldn't be a problem. I have it setup to load on girder start up and then once a day at 4:00am.
Let me know if this works for you.
local str = "letterman"
local pgm = XMLTV_find( str )
while( pgm ) do
local ch = XMLTV_getChannel( pgm.channel );
print( "Channel " .. ch.number .. " " ..pgm.title .. " " .. " " .. pgm.start .. " " .. pgm.stop )
pgm = XMLTV_find( str, pgm.channel, pgm.start )
end
This produces output something like:
Channel 3 Late Show With David Letterman 20041203003500 20041203013700
Channel 3 Late Show With David Letterman 20041204003500 20041204013700
Channel 3 Late Show With David Letterman 20041207003500 20041207013700
Channel 3 Late Show With David Letterman 20041208003500 20041208013700
Channel 3 Late Show With David Letterman 20041209003500 20041209013700
Channel 212 Late Show With David Letterman 20041203003500 20041203013700
Channel 212 Late Show With David Letterman 20041204003500 20041204013700
Channel 212 Late Show With David Letterman 20041207003500 20041207013700
Channel 212 Late Show With David Letterman 20041208003500 20041208013700
Channel 212 Late Show With David Letterman 20041209003500 20041209013700
VaioUserChris
December 3rd, 2004, 07:15 PM
I have to say this looks pretty sweet. Nice job Curtis.
I'll download it and give it a shot when I have a bit of time.
Thanks,
Chris
quixote
December 4th, 2004, 06:34 AM
You guys are superheroes!
This is shaping up to be just what I wnated. Christmas came early this year. :D
on another note, I have just bought an artificial intelligence program that I am training to implement it in my home automation setup (my roommate jokingly calls it robot house), so I need to dedicate a little time to that today and train the voice recognition a little more, but as soon as I'm done I am going to start tinkering with xmltv again.
Talk to you guys a little later. Nice work!
VaioUserChris
December 4th, 2004, 12:52 PM
Curtis,
I attempted to load the "XMLTVGirder.dll" plugin but Girder gives me an error saying "Could not load the XMLTVGirder plugin".
I'm running Girder 3.3.4. All I did was drop it in the plugin folder, exit out of Girder, and restart the program. Am I doing something wrong?
Please advise.
Thanks, Chris
VaioUserChris
December 4th, 2004, 01:01 PM
My bad. I just saw your post on the other forum regarding needing the Visual C 7.1 runtime (post is here: http://www.promixis.com/phpBB2/viewtopic.php?t=9712&highlight=xmltv)
I downloaded those dll files, and also placed them into the girder plugin folder but now I get this error:
"Old plugin found; C:\...msvcp71.dll, you downloaded the incorrect version please make sure that you get the Girder 3.2 compatible version of this plugin."
Can you help? Again, I'm running Girder 3.3.4.
Thanks, Chris
Promixis
December 4th, 2004, 01:14 PM
Chris the files goes in the windows\system32 directory...
To avoid future problems, here is a mfc 7.1 installer http://www.promixis.com/download.php?ID=665
quixote
December 4th, 2004, 03:15 PM
Ok, so far I have the XMLTV.exe set up in a directory under Girder called \XMLTV and have been able to retrieve the XML file using Chris' batch file:
set tz=pdt
rem xmltv tv_grab_na_dd --configure
C:\girder\XMLTV\xmltv.exe tv_grab_na_dd --output C:\girder\XMLTV\TVDatapre.xml --days 1 --old-chan-id
C:\girder\XMLTV\xmltv.exe tv_sort --output C:\girder\XMLTV\TVData.xml C:\girder\XMLTV\TVDatapre.xml
exit
I have also downloaded and installed Curtis' plugin and the runtime library supplied by Mike, and took a look at the .GML supplied, but I can't make too much sense of it. I ran the script in the post above for the letterman search, but I get an error:
error: attempt to call global `XMLTV_find' (a nil value)
stack traceback:
1: main of string "?" at line 2
How do I load the XML file and what lines do I need to modify to point to my TVData.xml file in the c:\girder\xmltv directory?
Thanks.
quixote
December 4th, 2004, 03:20 PM
Sorry, I forgot to mention, I see references to Netremote peppered throughout the scripts. I don't have Netremote. That's not going to be a problem, is it?
curtiswren
December 4th, 2004, 03:23 PM
The first thing you need to do is load the xmlfile into memory. I do the following in GuideLoad:
local openfilename = "C:\\xmltv\\xmltv.xml"
XMLTV_load( openfilename )
print( XMLTV_numChannels() )
You'll need to modify the filename to match yours. If all works, it should print out the number of channels loaded.
The error message you mention in your post sounds like the plugin wasn't loaded, or you have the version prior to XMLTV_find being added. If you get the same error for XMLTV_load, then it's probably the plugin has not been loaded. If that one works, and XMLTV_find still doesn't, then you've got the old version. What's the timestamp on the file?
curtiswren
December 4th, 2004, 03:28 PM
No you don't need NetRemote. I use it to display a grid on my remote, but the girder plugin can be used stand alone
quixote
December 4th, 2004, 04:01 PM
Well, This is strange. I re-downloaded the .dll file from your other thread (the second time you posted the link with only the .dll in it) and in my settings in Girder it says "the plugin is loaded in memory (not sending events)" but I still get the error. I saw the girderopen trigger and I'm assuming that it is loading properly because I have a speech greeting that is triggered at the same time. Any other ideas?
curtiswren
December 4th, 2004, 04:14 PM
Did you try running a script with the following?
local openfilename = "C:\\xmltv\\xmltv.xml"
XMLTV_load( openfilename )
print( XMLTV_numChannels() )
curtiswren
December 4th, 2004, 04:22 PM
What version does it say from the Settings dialog? Should be 1.02.
quixote
December 4th, 2004, 05:48 PM
Ok. thanks for the version number. Apparently the link that I thought was correct was still V1.00. I went to the download page and re-downloaded it and the test search works! Also, I tried the script that you just posted and it successfully returns the number of channels.
This is great stuff! :)
VaioUserChris
December 4th, 2004, 09:35 PM
I agree - this is terrific Curtis. Thanks Mike for the link to the mfc 7.1 installer. With that, the plugin runs great.
Curtis, could I make a couple of feature requests. The title search works perfectly but can you add the ability to search for terms in any other program field as well (i.e. actor, director, subtitle, description)?
And would it also be possible to return the subtitle as one of the outputs?
Great job, Curtis. This is sweet! :D
Chris
quixote
December 5th, 2004, 08:20 AM
Chris, I was just trying to implement TVHolic into my setup. I remember that you mentioned it some time ago, and I tried it out and found it really cool. I may even take the time to change the colours in the near futurem so that the guide matches the rest of the skins on my computer. I seem to be having a little error problem, though. Very strange.
For those that don't know- TVHolic is a great little free app that can read XML TV Guide files. Here is the link: http://www.meedio.com/pub/Tools/TVHolic/Readme-TVHolic.htm
Rather than having TVHolic update for me, I have changed it to read the file that I retrieve with your batch file, so that I have more control over it. One thing that I'm wondering about is what a .TVVI file is. I'd like to be able to have Girder change channels on my TV when I click on "Watch it" instead of trying to find the .TVVI file. Do you think that there is a way of tricking the program?
quixote
December 5th, 2004, 09:00 AM
I found out what a .TVVI file is. The extension is assosiated with certain TV viewing programs. I opened the file program.tvvi in the TVHolic directory and it is an XML file with all of the info of the show that I clicked on:
<tv-viewer-info version="1.0">
<program>
<station>canz</station>
<tv-mode>cable</tv-mode>
<program-title>Robot Wars</program-title>
<program-description>"L'ultime conflit entre étoiles", Episode 6 of ., (2003-12-19), Game show/Entertainment/Series, </program-description>
<start-date>20041205</start-date>
<start-time>17:00</start-time>
<end-date>20041205</end-date>
<end-time>18:00</end-time>
<duration>01:00</duration>
<rf-channel>54</rf-channel>
</program>
</tv-viewer-info>
I have associated .TVVI files with notepad for now, so when I click on watch, it opens the .xml file in notepad. Do you know if there is a way to associate the file with girder and use the fields as variables, or will I need a plugin for that?
Also, the problem I'm having with TVHolic seems to be after a certain amount of time after updating and sorting the xml file. Can you tell me how to eliminate old data before running the App and I will see if that fixes it. When I rename my tvdata.xml file to tvdata1.xml and run the line:
C:\girder\XMLTV\xmltv.exe tv_sort --output C:\girder\XMLTV\TVData1.xml C:\girder\XMLTV\TVData.xml
It works again, but it takes a long time to sort it, So I need to avoid that. Thanks!
curtiswren
December 5th, 2004, 11:31 AM
Chris, I'll look at adding the features you requested. When I parse the file, I currently only store the fields that are returned. I was trying to make it as quick as possible originally, but I don't think it will make much of a difference if I add a bit more.
VaioUserChris
December 6th, 2004, 08:48 AM
Curtis, Thanks for looking into that. I hope it doesn't bog things down...
Quixote, I think there's an easier way to get TVHolic to change your channel for you. In the TVHolic settings, you can choose how TVHolic handles recordings and current TV viewing. Instead of generating the TVVI file for current programs, I set it up to trigger event.exe and send a gider eventstring and the channel number as parameters. This triggers a Lua script in girder which parses the channel number and 1) opens my tv watching program, 2) sends the channel number to it, and 3) sends the enter command to the TV program.
I'm not at that computer right now but later on I can post the configuration I used for TVHolic and the Lua script. You'll still need to work out the events to open your tv program, and send the channel number to it.
About eliminating old data, I haven't attempted that. You could write a lua script to read the file, eliminate all the programs that have past, then re-write that, but the delay in using TVHolic hasn't seemed very bad to me so I haven't resorted to this. TVHolic usually only takes less than 10 seconds to start up on my system. (My XMLTV file is 9 megs and covers 10 days of data).
Chris
quixote
December 6th, 2004, 09:53 AM
Quixote, I think there's an easier way to get TVHolic to change your channel for you. In the TVHolic settings, you can choose how TVHolic handles recordings and current TV viewing. Instead of generating the TVVI file for current programs, I set it up to trigger event.exe and send a gider eventstring and the channel number as parameters. This triggers a Lua script in girder which parses the channel number and 1) opens my tv watching program, 2) sends the channel number to it, and 3) sends the enter command to the TV program.
I'm not at that computer right now but later on I can post the configuration I used for TVHolic and the Lua script. You'll still need to work out the events to open your tv program, and send the channel number to it.
That would be great. That should help me to understand a little better.
About eliminating old data, I haven't attempted that. You could write a lua script to read the file, eliminate all the programs that have past, then re-write that, but the delay in using TVHolic hasn't seemed very bad to me so I haven't resorted to this. TVHolic usually only takes less than 10 seconds to start up on my system. (My XMLTV file is 9 megs and covers 10 days of data).
I'm obviously doing something wrong then. TVHolic is fine immediately after I update my XML file, but then after a half hour passes, it does not take that into account and just does not show anything on the grid, unless there are a few programs that span over an hour. IE.- It just makes the shows that are over invisible, but does not advance. Is there something in the configuration that you know of that I may have screwed up?
Thanks.
VaioUserChris
December 6th, 2004, 02:39 PM
Regarding the display problem, that's really odd. It doesn't do that on my system. How many days of data are you loading in your XMLTV file?
Chris
quixote
December 6th, 2004, 03:31 PM
I am loading 4 days of data. (That's the number that I put in the batch file, right?
C:\girder\XMLTV\xmltv.exe tv_grab_na_dd --output C:\girder\XMLTV\TVDatapre.xml --days 4 --old-chan-id
VaioUserChris
December 6th, 2004, 04:29 PM
I know it would be a pain but maybe you should reinstall TVHolic and see if it still repeats the problem.
Chris
quixote
December 6th, 2004, 06:33 PM
I've tried both doing a repair and reinstall, and neither worked, but I will try one more time.
I kept my settings so that It' doesn't try to update online. Could that be the problem? Maybe I'll totally start from scratch.
quixote
December 6th, 2004, 07:24 PM
&^#$&$^&%$
:evil:
Now it doesn't work at all. Do you know of any other options?
VaioUserChris
December 6th, 2004, 10:26 PM
I'm really sorry to hear that. I didn't anticipate it getting worse.
So you unistalled the program, then reinstalled and the program now crashes when you try to open it? Is that correct? If you can describe what it's now doing (or not doing) I'll try to help you troubleshoot it.
Under the assumption that we'll get it working again, here's how I use TVHolic to change channels.
1) Go to the "EPG-Settings.exe" and click on the recording tab.
2) Scroll down to the "'Watch TV' command to execute" field and enter the following:
C:\Program Files\girder\event.exe be sure to change that path to match where event.exe is located on your system.
3) Next in the "Parameters" field enter:
CHANGECHANNEL 18 [channel] -silent CHANGECHANNEL is the girder eventstring that will be triggered when you click on a current program, and TVHolic will send the channel number as a payload. The 18 is for Girder. Don't change that.
4) Now you need a script to take that payload and trigger the channel in your TV program. Here's the one I wrote for my computer (this will have an eventstring of "CHANGECHANNEL":
-- Here are the relevant Girder Eventstrings I set up to control my TV program
-- GIRDER EVENTSTRING TV PROGRAM COMMAND
--
-- GPC1 = Button 1
-- GPC2 = Button 2
-- GPC3 = Button 3
-- GPC4 = Button 4
-- GPC5 = Button 5
-- GPC6 = Button 6
-- GPC7 = Button 7
-- GPC8 = Button 8
-- GPC9 = Button 9
-- GPC0 = Button 0
-- GPENTER = Enter
-- GP_START = Start Gigapocket program (my TV program)
-- Here are a couple more commands that we'll need:
--
-- WAIT_2_SEC = Wait 2000 ms
-- This calls a girder command set to the Window tab, Wait, X/Timeout MS = 2000
-- WAIT_3_SEC = Wait 3000 ms
-- This calls a girder command set to the Window tab, Wait, X/Timeout MS = 3000
-- Now we begin
CHANNEL = pld1
if tonumber(CHANNEL)>999 then
CHANNEL = strsub(CHANNEL,1,3)
end
TriggerEvent("GP_START",18) -- Start my TV program
TriggerEvent("WAIT_3_SEC",18) -- waits 3 seconds for the computer to catch up
TriggerEvent("WAIT_2_SEC",18) -- waits 2 more seconds for the computer to catch up
-- The next section parses the channel number into single digits, then calls an eventstring
-- composed of "GPC" plus the digit - i.e. Ch 12 would send two commands
-- GPC1, then GPC2
for i = 1,strlen(CHANNEL)do
TriggerEvent("GPC" .. strsub(CHANNEL,i,i),18)
end
-- Finally I need to send an enter for my TV program. If you don't need to send that, you can
-- skip this step
TriggerEvent("GPENTER",18)
5) Finally, you need to set up corresponding Girder commands to control your TV program, and the associated eventstrings.
That's it. Hope that helps...
Let me know about the TVHolic problems and I'll try to help.
Thanks, Chris
quixote
December 7th, 2004, 04:24 AM
Thanks Chris, that's very kind of you. You seem to have way more patience than I do. I will try it again when I get home. Perhaps I'll have a more calm demeanor then.
The problem is that now when I run TVHolic it tries to configure itself, and when I get to the point where it asks me for my postal code, after I enter it, it zips through something and closes so fast that I can't even see what the problem is. It does not update my XML file.
VaioUserChris
December 7th, 2004, 06:35 AM
From what you describe, it looks like it's trying to update the XMLTV data. If you go to "EPG-Settings.exe" (within your TVHolic folder) and select the XMLTV tab, you can tell it that you don't want it to update your XMLTV file for you (since you're using XMLTV automate).
Next, try pointing TVHolic to your XMLTV file by entering the path in the "TV Data xml" field.
Hopefully it will then see your file and display it... I did say hopefully, right?
Let me know how that goes.
Thanks, Chris
quixote
December 7th, 2004, 01:47 PM
Hi Chris. I reinstalled again and used the EPG-settings.exe as you suggested. It is working again (sort of)
What's happening is when I reinstall, or resort the XML file it works perfectly until I close it, then if I open it again after half an hour has elapsed, it only shows the first few channels and only if those shows span an hour (therefore they are still on the grid) It's as if it is updating the grid, but just eliminating the shows that should have been shifted on the grid, and not shifting the ones that are long enough to remain on the grid. I am using version 1.9.2. Could that be a problem version? I will try that nice script that you posted once I figure this out.
VaioUserChris
December 7th, 2004, 02:08 PM
When you download your XMLTV data, are you running the "Sort Listings.bat" that was included with your TVHolic installation? (It should be in either the TVHolic main folder or one of the two "xmltv" folders).
Apparently TVHolic has display problems if you don't run that sort listings batch file and perhaps this is causing your issue. See the instructions in the "To manually use XMLTV file" section of the TVHolic Read Me page: http://www.meedio.com/pub/Tools/TVHolic/Readme-TVHolic.htm
I use TVHolic to update my listings directly so I haven't had the problem you describe but maybe using XMLTV Automate skips the sort and therefore creates the problem???
Just a thought.
Chris
quixote
December 7th, 2004, 04:34 PM
I removed the other XMLTV programs, uninstalled and reinstalled TVHolic with the link from the readme that you posted the link to, and tried configuring it. I paused it right before the command box shutdown and saw that it told me the zap2it is sending me a page without a service provider. Then it closes. Also I see that it is setting my time zone as cst, and I origianlly had it set to pdt. There are so many inconsistencies, I' m about to give up.
UPDATE:
I was using XMLTV as an .exe with a batch file but decided to install XMLTV_automate. I think the problem was that I overlooked the windows task scheduler for the update. :oops:
The grid still does not update properly, however, unless I sort them every half hour if I exit TVHolic.
VaioUserChris
December 7th, 2004, 06:22 PM
I feel bad for you. But I'll try to help if you're still interested.
I'd suggest you let TVHolic pull your data for you and see if that makes any difference. So here are the steps:
1) Go into the TVHolic folder, and open the "xmltv" folder
2) Edit "Run update TV listings - US.bat" to this:
set tz=pdt
%1 tv_grab_na_dd --configure
%1 tv_grab_na_dd --output xmltv\TVDatapre.xml --offset -1 --days 13 %2 --old-chan-id
%1 tv_sort --output xmltv\TVData.xml xmltv\TVDatapre.xml
exit
3) Place your "xmltv.dtd" and "xmltv.exe" files (from your XMLTV installer) into the xmltv folder
4) Go back into your root TVHolic Folder and double-click "UpdateTVHolic.exe"
5) Let it run and enter the appropriate information it asks for
6) If you've configured TVHolic to look at a specific location for your XMLTV file, run "EPG-Settings.exe" and point it to look at the "TVData.xml" file in TVHolic's "xmltv" folder
7) Check that you want it to automatically download the data for you and apply the changes
8) Run TVHolic and see if it works.
This is the same way that I grab my data so hopefully it will fix the problems for you.
Can you let me know how that goes?
Thanks, Chris
quixote
December 7th, 2004, 07:25 PM
I will try again after work. I just get flustered after a while, especially after a day of work. Thanks for your patience.
UPDATE: Couldn't mess around with it tonight, I was configuring my AI program and scripts and training the voice recognition. I almost have it......
quixote
December 9th, 2004, 01:17 PM
It works perfectly now, but I'm not sure how I got these results exactly. I appologize to anyone who is following this and having the same problem. I can say this: I changed the batch file, but I had to make modifications to your .bat file to get it to work. Here it is:
set tz=cst
rem %1 tv_grab_na --configure
%1 tv_grab_na --output xmltv\TVDatapre.xml --offset -1 --days 7
%1 tv_sort --output xmltv\TVData.xml xmltv\TVDatapre.xml
I now have it so that when I click on watch, it changes my TV channel to the appropriate station. If I want to do the same on my computer TV input, I am sure that I will be able to accomplish this thanks to your help.
There is one issue that I would like to resolve, and maybe use it to my benefit:
When I click on the watch butoon and it changes the chanel, it also opens a file in notepad called program.tvvi (I associated it with note a while ago to see the results). I there any way that I could have this file stored in variables for each field and maybe set it up to display them in an OSD with a keypress? This would be beyond what I set out to accomplish and very cool, indeed.
Here is the program.tvvi file format:
<tv-viewer-info version="1.0">
<program>
<station>cjnt</station>
<tv-mode>cable</tv-mode>
<program-title>Fear Factor</program-title>
<program-description>Game, Contestants must consume eggs containing partially developed duck embryos., Rated TV-PG</program-description>
<start-date>20041209</start-date>
<start-time>22:00</start-time>
<end-date>20041209</end-date>
<end-time>23:00</end-time>
<duration>01:00</duration>
<rf-channel>14</rf-channel>
</program>
</tv-viewer-info>
VaioUserChris
December 10th, 2004, 07:37 AM
I'm glad to hear that it works.
Regarding the TVVI file. Can you see if that file is saved to your system anywhere (just search for ".tvvi")? If it is, you could use your change channel script to also read that file and display the contents in an OSD.
If you want to improve the look, you could also search through the file to find just the data you want to display, then format it to your liking. For instance, you could search line by line for a field such as "<station>" and then just remove the field attributes from that line. So in your search for "<station>" you would take the matching line "<station>cjnt</station>", and cut out "<station>" and "</station>" - leaving you with the data you want to display "cjnt". Then it's just a matter of repeating that for each field you want to display...
You could also do this through an XML reader, but that would be more complex for such a simple file as this.
Chris
quixote
December 10th, 2004, 07:51 AM
I like your first suggestion. I'll give it a go, but is there anyway with TVHollic to keep the file from opening? It opens the file automatically and if the file is not associated with any program it asks me what to open it with. There has to be a way around this, unless I just have Girder automatically close notepad for me if that file is opened. The file is program.tvvi and it is saved in the TVHolic folder, I think. I'll have to check when I get home.
randy
December 11th, 2004, 05:53 PM
Im having some problems with the very last line of this code:
set tz=cst
%1 tv_grab_na_dd --configure
%1 tv_grab_na_dd --output xmltv\TVDatapre.xml --offset -1 --days 13 %2 --old-chan-id
%1 tv_sort --output xmltv\TVData.xml xmltv\TVDatapre.xml
The I see TVDatapre.xml created, the command that is supposed to generate TVData.xml just goes out of control using 98% CPU and getting as big as 180megs memory usage before I kill it. Is this normal? Im assuming not.
Any suggestions would be great!
EDIT: I changed the 13 days to 3 days, and this time it went through. Seems like had I kept it at 13 days, it would have needed to run longer but would have worked regardless. I should have waited another 10 mins before posting. thanks!
quixote
December 12th, 2004, 09:02 AM
I'm back to my previous problem of not having the grid updated. I just deinstalled and I'm taking a long break from this before I wreck something.
curtiswren
December 12th, 2004, 11:37 AM
I've just uploaded a new version of the XMLTVGirder plugin. It now returns all of the fields in the xml file. You can also search by any field. I've changed the way the searching is done. You now do something like:
XMLTV_setFilter( "Letterman", "title", "Tyra", "description" )
local pgm = XMLTV_first()
while( pgm != nil ) do
-- do something
pgm = XMLTV_next()
end
set filter can have any number of arguments. You pass in pairs of search strings and fields. If you leave the field blank, it searches all fields.
VaioUserChris
December 16th, 2004, 04:08 PM
Curtis,
Somehow I missed your last post. SWEET!!! :D :D :D :D :D :D
I can't wait to give this a try. Unfortunately I'm moving this weekend but when I get everything set up again I'll let you know how it works.
quixote - I can't understand why this program is giving your system so many problems. But the good news is that with Curtis' plugin here, we can at least do quick and easy searches through an XMLTV file, without using TVHolic. When I get all settled we can resume chatting about the task you originally outlined here...
Chris
quixote
December 16th, 2004, 07:54 PM
Sounds good, bro. Hope your move is quick and easy.
VaioUserChris
January 20th, 2005, 05:22 PM
Hi all,
I've taken Curtis' excellent plugin (and examples) and written a batch of scripts to display XMLTV data through Girder. The GML is attached. Assuming you have an XMLTV file and have already installed Curtis' plugin (which you can find in this thread) all you need to do is change the path to you XMLTV data in this script in the GML "Load XML Data".
The script allows you to see what's currently on TV on any of the stations in your XMLTV file. You can also scroll forwards and backwards in time, view the schedule of a specific station, and search for programs. The display is handled through the Lua Internet Explorer display that Mike C demonstrated and uses java scripting by Nate for the buttons.
By the way, you can roll over any title to see the program category and description (if available).
You may also notice in the outputs the terms "Past", "Watch" and "Program". Past means that the program has already happened. "Watch" means that it's currently on, and if you click that word, it will trigger a script named "Change Channel" and send the channel number as a payload to that script. I put that script in to allow you to customize it to launch your TV application and tune that channel.
"Program" means that the program is yet to occur. If you click that word it will send the program's parameters to the script "Schedule Recording". Again, you could customize that script to schedule the recording using whatever TV recording application you use.
I hope all this makes sense.
Enjoy. And thanks again Curtis.
Chris
VaioUserChris
January 20th, 2005, 05:24 PM
A few more screen shots...
Chris
quixote
January 20th, 2005, 06:33 PM
That is SO COOL!!!!!
Chris, you're the man. and so is Curtis. This is perfect and exactly what I was hoping to have at some point. Thanks for setting all of that up, guys! Finally a solution that is not dependent on a third party software like Sage or Snapstream's Beyond TV.
Excellent!
Haddood
January 24th, 2005, 01:41 AM
I am having a problem configuring XMLTV each time I run the configuraion mode I get a message saying to check postal code ... here is a capture of the screen ....
F:\XMLTV>xmltv tv_grab_na --configure
Timezone is -0500
Welcome to XMLTV 0.5.9 (tv_grab_na V2.20030331) for Canada and US tv listings
-----------------------------------------------------------------------------
Please report any problems, bugs or suggestions to:
xmltv-users@lists.sourceforge.net
For more information consult http://sourceforge.net/projects/xmltv
checking XMLTV release information..
Warning: failed to get current release information from:
http://sourceforge.net/projects/xmltv
If this problem persists, look for a new XMLTV release
starting manual configuration process..
how many times do you want to retry on www site failures ? (default=2)
how many seconds do you want to between retries ? (default=30)
what is your postal/zip code ?h1y 2a1
getting list of providers for postal/zip code h1y2a1, be patient..
zap2it failed to give us a form to choose a Provider
check with zap2it site postal/zip code h1y2a1 is valid
if someone can give me a north america .conf file i might be able to edit that manually and get things going ....
thanx for any suggestions
randy
January 24th, 2005, 07:57 AM
I am having a problem configuring XMLTV each time I run the configuraion mode I get a message saying to check postal code ... here is a capture of the screen ....
Warning: failed to get current release information from:
http://sourceforge.net/projects/xmltv
If this problem persists, look for a new XMLTV release
First thing to do is to follow the suggestion you pasted yourself and download the latest version. Give that a try and report back!
VaioUserChris
January 24th, 2005, 03:21 PM
Hi Haddodd,
I'd suggest using XMLTV version 0.5.38 or 0.5.37. I can't tell what version you're running based on your printout (I don't think there is a version 0.5.9 yet so I'm confused).
But I think your problem was in the zip code you entered:
what is your postal/zip code ?h1y 2a1
It looks like it wasn't able to find a zip code of "h1y 2a1". Could you retry it with your correct zip code and let me know if it works?
Thanks, Chris
Haddood
January 25th, 2005, 05:18 AM
thanx guys ..
it seems the problem was in the "latest version" as i was using version 0.5.9 ... then i switched to version 0.5.38 and it worked fine ...
Powered by vBulletin® Version 4.1.8 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.