SageTV Community  

Go Back   SageTV Community > SageTV Products > SageTV EPG Service
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

SageTV EPG Service Discussion related to the SageTV EPG Service used within SageTV. Questions about service area coverage, channel lineups, EPG listings, XMLTV, or anything else related to the service or programming guide data for SageTV should be posted here.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 04-13-2006, 05:08 PM
rsagetv99's Avatar
rsagetv99 rsagetv99 is offline
Sage Fanatic
 
Join Date: Nov 2004
Posts: 766
Updated XMLTV How To

I took the sticky at the top copied it, and updated a few things. Comments are welcome, if you want me to add/change anything let me know.

Step 1

Download and install XMLTV v0.5.16 (the Win32 zip file):

http://sourceforge.net/project/showf...group_id=39046

I unzipped mine in the root of c: drive. So I have an XMLTV folder in the c: drive and the xmltv.exe is located at c:\xmltv\xmltv.exe. The .BAT file code I supply further down assumes this is where you have XMLTV installed. If not, the .BAT file code will have to be changed to reflect the proper drive and pathnames for your setup. Bottom line...if you are not familiar with .BAT code then you should install XMLTV on the c: drive as I did

Step 2

Download an XMLTV importer. Demedius' importer is the most flexible, and allows for importing multiple XMLTV files.

http://forums.sagetv.com/forums/show...edius+importer

Unzip it to your SageTV folder. So you should end up with an xmltv directory inside the SageTV folder something like this: c:\Program Files\SageTV\SageTV\xmltv

In the SageTV folder, open the Sage.properties file and look for the following line:

epg/epg_import_plugin=

and change it to:

epg/epg_import_plugin=xmltv.XMLTVImportPlugin

Before going into back into SageTV to test the plugin, make sure you have an XML listings file from XMLTV. And make sure you supply this XML listings in the SageTV directory and that it is named epgdata.xml. If you use my .BAT file code below (See Step 5) for XMLTV, then it will put your listings in the SageTV directory properly.

If you use Demedius' importer, you will need a file called xmltv.properties, that's how you configure the importer. You actually don't have to have one, but if you want to use my channel numbering script then you have to create one. It is very easy once you get the basics. Whatever you don't configure is either uses a default setting or if it is an optional setting if you don't configure it then it won't be enabled. Here is an xmltv.properties file similar to what I use.

Quote:
configurations=xmltv.properties
provider.name=DVB-S
provider.id=1

xmltv.files=SOURCE1.XML,SOURCE2.XML,MT.XML

run.before=C:\\xmltv\\UpdateMTData.bat

max.stars=4

max.subcategories=1
translate.category.film=Movie
translate.category.Sport=Sports event
translate.category.News=News

rating.*.NR=NR

title.add.year=false
episode.name.add.episode.number=false
episode.name.add.part.number=true
report.missing.translate.category=true
rerun.after.date=8
rerun.after.date.categories=*
categories.for.star-rating=Movie
rerun.no-date.categories=Series

include=xmltv_channel_ids.txt

Step 3 (optional, but if you want your channels to be numbered correctly you will need it)

Get my channel-numbering script and the Kixtart command processor:
http://forums.sagetv.com/forums/showthread.php?t=16139

There are now two scripts, use the single version if you only have one XML file to parse, use multi if you will be parsing multiple XML files from different providers. This script works with Zap2-it Data Direct XML files and with the MyTheatre XML eporter by DPLU. I have not tested it with XML files from other sources, but if you post a few lines of your file I will tell you if it will work.

1. Download the Kixtart command processor from Kixtart.org (it's free).
2. Extract the files to c:\kixtart\ (you can put it somewhere else, but these instructions assume you installed it in c:\kixtart\)
3. Download my scripts into C:\kixtart\
4. Edit the script to match the path and file-name(s) of your downloaded XML EPG files.
5. Edit Demedius' xmltv.properties, add to the bottom of the file:
include=xmltv_channel_ids.txt
6. Manually you can now go to Start-Run c:\kixtart\kix32 c:\kixtart\<script>
where <script> is the name of the file the script that you are using (multi or single depending on your needs).

This will output a file called xmltv_channel_ids.txt to c:\program files\SageTV\SageTV\.

That's it, when you add the new XML source the channels will be mapped with the channel numbers listed in the XML file. If you already have the XMLTV source configured, then the next time your EPG updates it will import the new channel mapping.


Step 4

Get the Xerces XML parser file:

http://www.myhtpcresource.net/downloads/xerces.jar


Xerces.jar should be copied into the jre/lib/ext directory of your Java JRE/SDK directories. For example, C:\Program Files\Java\j2re1.4.1_01\lib\ext\ and if you installed the SDK you also need to put it in the SDK directory in c:\j2sdk1.4.1_01\jre\lib\ext\. If you are having problems with this try copying the xerces.jar file to your SageTV installation directory, C:\Program Files\SageTV\SageTV\.

Step 5

There is a .BAT file that installs with XMLTV called 'Run update TV listings - US.bat'. You can alter this .BAT file by replacing all of the original code with the new code below (or you can create a new .BAT file with any name/location with the code below) and add it to your Windows Task Scheduler to automatically grab your TV listings and copy the listings to your SageTV directory. The code here is assuming you installed SageTV and SageTV XMLTV plugin to their default locations at c:\Program Files\SageTV\SageTV and that XMLTV is installed at c:\xmltv. If this is the case, then your .BAT file would look something like this:


Here is the main batch file I use, I have it scheduled to run nightly, it downloads 13 days worth of Guide data from Zap2it.
Before you can run this the first time you have to run the "xmltv tv_grab_na_dd --configure" command which will ask you some questions and create a .conf file in a folder called c:\xmltv\.xmltv\, I moved the file to c:\xmltv\, and renamed it SOURCE1.conf or SOURCE2.conf depending on which one I just configured. You need one per Zap2it EPG provider.

Quote:
c:
cd \xmltv
xmltv tv_grab_na_dd --configure -config-file c:\xmltv\SOURCE2.conf --auto-config add
xmltv tv_grab_na_dd --config-file c:\xmltv\SOURCE2.conf --days 9 --output c:\xmltv\SOURCE2.xml
xmltv tv_grab_na_dd --configure -config-file c:\xmltv\SOURCE1.conf --auto-config add
xmltv tv_grab_na_dd --config-file c:\xmltv\SOURCE1.conf --days 9 --output c:\xmltv\SOURCE1.xml
xcopy "C:\xmltv\SOURCE2.xml" "c:\Program Files\SageTV\SageTV\" /Y
xcopy "c:\xmltv\SOURCE1.xml" "c:\Program Files\SageTV\SageTV\" /Y
exit
If your XMLTV and SageTV apps are installed in different locations other than the locations I mentioned above, you will need to change the drive letters and directories in this code to match your setup. If you need help, PM me with the locations of the SageTV directory and your xmltv.exe file and I'd be happy to help

Use Windows Explorer to go to the directory where you put the .BAT file and double click it to run it. If this is the first time you've run XMLTV, you will be prompted for some info about your location and cable or sat service. Subsequent runs shouldn't require user interaction unless your cable or sat service changes. If you don't use the North America grabber (tv_grab_na) then substitute your grabber instead. Now the listings should download and sort. This may take a while depending on how many days worth of data you download and how many channels you are downloading data for. Once completed (the command window will automatically close), verify that the epgdata.xml file is located in your SageTV folder. If not, either you made a mistake somewhere or I goofed up these instructions Double check your pathnames and look for errors. Once the epgdata.xml file is in the SageTV folder, move on to the next (and final) step.

Step 6

Setup SageTV using the Setup Wizard. From SageTV main menu, press Setup, then Setup Wizard. You will need to complete this step for each tuner card you have. Click Setup Wizard, select 'Add or Modify a Source', select the tuner you want to configure, enter TRIAL as your access code, enter 00000 as your zip code (press enter), Press Select (enter) to continue, select XMLTV Lineup, choose Basic Service (basic/standard) or Extended Basic Service (digital/premium service)...if you're not sure, just pick Basic Service, I don't think it really matters. Then toggle off all of the channels you know you don't have or can't get on your TV tuner and press the right arrow when done. Next select the input you have the source connected to on the tv tuner card. For example, if you have coax from the wall outlet going directly to your tuner card, you would select 'TV Tuner - Cable' or if you have S-Video or Composite out from your cable box to your tv tuner, you would select either S-Video or Composite respectively. Once all tuners have XMLTV Lineup source (if that's what is desired for multiple tuner setups) press Complete Setup, then press Enter, and now you should be good to go.

Last edited by rsagetv99; 04-15-2006 at 12:19 AM.
Reply With Quote
  #2  
Old 04-13-2006, 06:11 PM
grooves12 grooves12 is offline
Sage Aficionado
 
Join Date: Feb 2006
Posts: 303
Thanks for taking the time to compile this info...

A couple of notes: your link to download XMLTV.exe is broken, and you forgot a step in the step2 section, which would be to download the xmltvimporter and where to get it from.

The other thing I would like to see are step by step instruction for actually getting the xmltv files from Mytheatre exporter to round things out.

Last edited by grooves12; 04-13-2006 at 09:52 PM.
Reply With Quote
  #3  
Old 04-13-2006, 09:40 PM
rsagetv99's Avatar
rsagetv99 rsagetv99 is offline
Sage Fanatic
 
Join Date: Nov 2004
Posts: 766
Quote:
Originally Posted by grooves12
Thanks for taking the time to compile this info...

A couple of notes: your link to download XMLTV.exe is broken, and you forgot a step in the step2 section, which would be to download the xmltvimporter and where to get it from.

The other thing I would like to step are step by step instruction for actually getting the xmltv files from Mytheatre exporter to round things out.
OK thanks for the input. I updated the first two items, I'll have to work on the XMLTV exporter instructions. If someone decides to beat me to it I will add it to the instructions.
Reply With Quote
  #4  
Old 04-14-2006, 12:34 AM
ctothej ctothej is offline
New Member
 
Join Date: Oct 2005
Posts: 5
Following these instructions I only get a file named SOURCE1.XML in my SageTV directory, not one called epgdata.xml. Is there a step I'm missing?

Thanks.
Reply With Quote
  #5  
Old 04-14-2006, 01:48 AM
grooves12 grooves12 is offline
Sage Aficionado
 
Join Date: Feb 2006
Posts: 303
Ok, I am working through getting this running... as I thought it would be the perfect solution to adding in the PPV info from Dish w/ the XMLTV info.

But, it seems the downloaded XMLTV info is a LOT messier, and includes a lot less info. Mainly, it is missing the Original Air Date setting, and as a result almost everything is marked or should I say MISmarked as first run... and things don't seem to record properly with favorites... w/ some 1st run episodes not being scheduled even though they are both marked and TRULY ARE first runs.

Is this something that I should be experiencing?? Or... should it be seemless like the built-in Sage program data. Isn't the data coming from the same place??

Last edited by grooves12; 04-14-2006 at 02:55 AM.
Reply With Quote
  #6  
Old 04-14-2006, 02:57 PM
rsagetv99's Avatar
rsagetv99 rsagetv99 is offline
Sage Fanatic
 
Join Date: Nov 2004
Posts: 766
Quote:
Originally Posted by grooves12
Ok, I am working through getting this running... as I thought it would be the perfect solution to adding in the PPV info from Dish w/ the XMLTV info.

But, it seems the downloaded XMLTV info is a LOT messier, and includes a lot less info. Mainly, it is missing the Original Air Date setting, and as a result almost everything is marked or should I say MISmarked as first run... and things don't seem to record properly with favorites... w/ some 1st run episodes not being scheduled even though they are both marked and TRULY ARE first runs.

Is this something that I should be experiencing?? Or... should it be seemless like the built-in Sage program data. Isn't the data coming from the same place??
Make sure you set the rerun after days parameter in the xmltv.properties file. I set mine to 8. The problem exists because some shows do not give the rerun flag so this checks the original airdate and sets it as a rerun if it is older than x number of days. The original airdate is not being imported to the detailed info, but it is being used.
Reply With Quote
  #7  
Old 04-14-2006, 02:59 PM
rsagetv99's Avatar
rsagetv99 rsagetv99 is offline
Sage Fanatic
 
Join Date: Nov 2004
Posts: 766
Quote:
Originally Posted by ctothej
Following these instructions I only get a file named SOURCE1.XML in my SageTV directory, not one called epgdata.xml. Is there a step I'm missing?

Thanks.
SOURCE1.xml was just an example, you can call it whatever you like, and specify it in the xmltv.properties file. If you are only importing one XMLTV file, then you could name it epgdata.xml to make it easier - epgdata.xml is the default name that the importer looks for...
Reply With Quote
  #8  
Old 04-14-2006, 07:35 PM
ctothej ctothej is offline
New Member
 
Join Date: Oct 2005
Posts: 5
Thank you, I've just about got it. The only thing left is I don't actually have a file named "xmltv.properties", and that's holding up the channel numbering script which I'm setting up with your instructions in Step 3. Everything else works, I see program data, it's all perfect, however all the channels are mis-mapped.

Thanks again for your work.
Reply With Quote
  #9  
Old 04-14-2006, 10:15 PM
grooves12 grooves12 is offline
Sage Aficionado
 
Join Date: Feb 2006
Posts: 303
Quote:
Originally Posted by ctothej
Thank you, I've just about got it. The only thing left is I don't actually have a file named "xmltv.properties", and that's holding up the channel numbering script which I'm setting up with your instructions in Step 3. Everything else works, I see program data, it's all perfect, however all the channels are mis-mapped.

Thanks again for your work.
You have to create it, the settings that it accepts are are listed in the thread where you download the XMLTVImport plugin.
Reply With Quote
  #10  
Old 04-15-2006, 12:22 AM
rsagetv99's Avatar
rsagetv99 rsagetv99 is offline
Sage Fanatic
 
Join Date: Nov 2004
Posts: 766
Quote:
Originally Posted by ctothej
Thank you, I've just about got it. The only thing left is I don't actually have a file named "xmltv.properties", and that's holding up the channel numbering script which I'm setting up with your instructions in Step 3. Everything else works, I see program data, it's all perfect, however all the channels are mis-mapped.

Thanks again for your work.
I updated the instructions with a sample xmltv.properties file.
Reply With Quote
  #11  
Old 04-15-2006, 12:21 PM
grooves12 grooves12 is offline
Sage Aficionado
 
Join Date: Feb 2006
Posts: 303
rsagetv99:

It sounds like you have a similar setup as mine in that you are use the Mytheatre DVB Network encoding plugin, and pulling some of the channel info from XMLTV and some from the internal Dish guide from the MT2XMLTV exporter.

I have 2 problems.
1) It seems that the ShowID is different between channels on the MT stuff for the same episodes. So, because I have a TON of local channels it sees a handul of them as different unique episodes and tries to record them even though that show has already been recorded/watched.
2) The Episode ID/Part Number is being prepended/appended to the Episode title, even though I have set it not to in the xmltv.properties.

Are you having or did you have either of these problems, and is there a solution or workaround for this??
Reply With Quote
  #12  
Old 04-15-2006, 08:05 PM
technazz's Avatar
technazz technazz is offline
Sage Aficionado
 
Join Date: Jul 2004
Location: Hamilton, ON, CA
Posts: 499
Quote:
Originally Posted by grooves12
rsagetv99:

It sounds like you have a similar setup as mine in that you are use the Mytheatre DVB Network encoding plugin, and pulling some of the channel info from XMLTV and some from the internal Dish guide from the MT2XMLTV exporter.

I have 2 problems.
1) It seems that the ShowID is different between channels on the MT stuff for the same episodes. So, because I have a TON of local channels it sees a handul of them as different unique episodes and tries to record them even though that show has already been recorded/watched.
2) The Episode ID/Part Number is being prepended/appended to the Episode title, even though I have set it not to in the xmltv.properties.

Are you having or did you have either of these problems, and is there a solution or workaround for this??
I have the same issue. I solved it by getting rid of all of the locals from the MT2XMLTV and move them to Sages Internal EPG tuner and editing my Favorites to record only once channel. The XMLTV data does NOT have any show ID so the XMLTV importer genrates a random one.

You'll have to add another network encoder to have Sages Internal guide to handle the locals but point it to the Same IP and Port


Technazz
Reply With Quote
  #13  
Old 04-15-2006, 08:20 PM
grooves12 grooves12 is offline
Sage Aficionado
 
Join Date: Feb 2006
Posts: 303
Quote:
Originally Posted by technazz
I have the same issue. I solved it by getting rid of all of the locals from the MT2XMLTV and move them to Sages Internal EPG tuner and editing my Favorites to record only once channel. The XMLTV data does NOT have any show ID so the XMLTV importer genrates a random one.

You'll have to add another network encoder to have Sages Internal guide to handle the locals but point it to the Same IP and Port


Technazz
I thought once you setup up the XMLTV plugin, that you lose Sage's internal Guide data.

Also, if you were to do that, wouldn't it see the 2 network encoders as two different tuners, and thus problems could arise if a program is scheduled to record on one of each tuner at the same time??

Last edited by grooves12; 04-15-2006 at 08:37 PM.
Reply With Quote
  #14  
Old 04-15-2006, 09:09 PM
technazz's Avatar
technazz technazz is offline
Sage Aficionado
 
Join Date: Jul 2004
Location: Hamilton, ON, CA
Posts: 499
Quote:
Originally Posted by grooves12
I thought once you setup up the XMLTV plugin, that you lose Sage's internal Guide data.

Also, if you were to do that, wouldn't it see the 2 network encoders as two different tuners, and thus problems could arise if a program is scheduled to record on one of each tuner at the same time??

Not true as of the last few betas there is a disable_plugin=true or false properties that will allow you to disable the XMLTV plugin . You'll have to look at this thread http://forums.freytechnologies.com/f...ad.php?t=16858

Yes its true if you have 2 network encoders with the Same IP address you may have conflicts but Im able to manage this just fine. I limit the channels on the second network encoder and set priority to the first which uses the internal EPG Data.

The best solution is if we could mix internal and external EPG sources for one tuner.

Technazz
Reply With Quote
  #15  
Old 04-16-2006, 04:26 PM
johnnytyler johnnytyler is offline
Sage Advanced User
 
Join Date: Jan 2006
Posts: 82
Quote:
Originally Posted by technazz
Not true as of the last few betas there is a disable_plugin=true or false properties that will allow you to disable the XMLTV plugin . You'll have to look at this thread http://forums.freytechnologies.com/f...ad.php?t=16858

Yes its true if you have 2 network encoders with the Same IP address you may have conflicts but Im able to manage this just fine. I limit the channels on the second network encoder and set priority to the first which uses the internal EPG Data.

The best solution is if we could mix internal and external EPG sources for one tuner.

Technazz
Technazz you have a private message, Thanks
Reply With Quote
  #16  
Old 04-16-2006, 09:51 PM
rsagetv99's Avatar
rsagetv99 rsagetv99 is offline
Sage Fanatic
 
Join Date: Nov 2004
Posts: 766
Quote:
Originally Posted by grooves12
I thought once you setup up the XMLTV plugin, that you lose Sage's internal Guide data.

Also, if you were to do that, wouldn't it see the 2 network encoders as two different tuners, and thus problems could arise if a program is scheduled to record on one of each tuner at the same time??
You can use the internal EPG and an XMLTV plugin on two different tuners. You can trick Sage into thinking one tuner is two different tuners, but you are right you could have problems if you set it up the way technazz has it and two shows air at the same time on the two versions of the same tuner.

Due to this limitation, and the fact that I can manipulate the XMLTV EPG data with scripts, I decided to use XMLTV exclusively.
Reply With Quote
  #17  
Old 04-17-2006, 07:27 AM
grooves12 grooves12 is offline
Sage Aficionado
 
Join Date: Feb 2006
Posts: 303
Quote:
Originally Posted by rsagetv99
You can use the internal EPG and an XMLTV plugin on two different tuners. You can trick Sage into thinking one tuner is two different tuners, but you are right you could have problems if you set it up the way technazz has it and two shows air at the same time on the two versions of the same tuner.

Due to this limitation, and the fact that I can manipulate the XMLTV EPG data with scripts, I decided to use XMLTV exclusively.

With the problem of not having proper showid's for the episodes from the XMLTV exporter it causes too many conflicts for me if I enable those channels. I can live without PPV guide data... so I just went back to the internal guide data for now. But, it is kind of annoying that not EVERYTHING is working.

Plus, I couldn't figure out how to get the plugin to stop prepending the episodeID to the episode title. I entered the settings into the xmltv.properties, but it is still doing it. And when I would run my batch file to download the new guide data from zap2it, it would hang Sage...

What scripts are you running to modify the data??

Last edited by grooves12; 04-17-2006 at 07:30 AM.
Reply With Quote
  #18  
Old 04-17-2006, 07:54 AM
rsagetv99's Avatar
rsagetv99 rsagetv99 is offline
Sage Fanatic
 
Join Date: Nov 2004
Posts: 766
Quote:
Originally Posted by grooves12
With the problem of not having proper showid's for the episodes from the XMLTV exporter it causes too many conflicts for me if I enable those channels. I can live without PPV guide data... so I just went back to the internal guide data for now. But, it is kind of annoying that not EVERYTHING is working.

Plus, I couldn't figure out how to get the plugin to stop prepending the episodeID to the episode title. I entered the settings into the xmltv.properties, but it is still doing it. And when I would run my batch file to download the new guide data from zap2it, it would hang Sage...

What scripts are you running to modify the data??
This is the line I used to get rid of the episode number in the title episode.name.add.episode.number=false , it works for me. Maybe you needed to delete your source and add it again, sometimes you will not see a change you made to certain elements unless you delete the source and add it again, not sure if that was the problem.

Before Demedius added the rerun.after.date element I had a script that added the <previously shown> tag to shows older than 8 days.

Last edited by rsagetv99; 04-19-2006 at 03:44 PM.
Reply With Quote
  #19  
Old 04-17-2006, 09:56 PM
grooves12 grooves12 is offline
Sage Aficionado
 
Join Date: Feb 2006
Posts: 303
That is the same settings I have listed... but it is still not working for me.

Does it show that string in your xmltv.log... or does it show it as "true"??? because for me in the log it shoes as "true" even though in the properties file it says false.
Reply With Quote
  #20  
Old 04-17-2006, 10:59 PM
grooves12 grooves12 is offline
Sage Aficionado
 
Join Date: Feb 2006
Posts: 303
Never mind... I was missing a period in the string and no matter how many times I looked at it, I didn't see it. It is processing th titles properly now.

BUT, I am still having the problem of SageTV hanging if I run the XMLTV update while it is running, which is obviously an unaceptable situation. Has anyone wlse experienced this, any ideas on how to workaround this??

It seems it is just using too much processing power between, Mytheatre, Sage, XMLTV.exe, Dirmon, and showanalyzer... and when it hits 100% CPU usage SageTV hangs and won't recover.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 12:09 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.