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 11-08-2004, 11:17 AM
casperse casperse is offline
Sage User
 
Join Date: Oct 2004
Posts: 38
Exclamation Does Sagetv import XMLTV episode number?

Hi all

Finally got everything working just to find out that the episode numbering in the xml file isnt listed in Sagetv?

Can anybody help me out

This is the info I have in the file from TV2 DK:
*********************************************************
<programme start="20041110183500 +0100" stop="20041110190000 +0100" channel="002.tv.tv2.dk">
<title lang="da">Venner</title>
<title>Friends</title>
<desc lang="da">Amerikansk komedieserie. Phoebes date Parker tager med hende og resten af vennerne til hr. og fru Gellers 35-års bryllupsfest.
</desc>
<credits>
<actor>Courteney Cox</actor>
<actor>Jennifer Aniston</actor>
<actor>David Schwimmer</actor>
</credits>
<episode-num system="xmltv_ns"> . 187 . </episode-num>
<video>
<present>yes</present>
<colour>yes</colour>
<aspect>4:3</aspect>
********************************************************

As you can see the numbering is 187 not the best information (Ex S3xE02) but this is what I have and what I would like to see in SageTV
Im running a older 2.0 but if people say that upgrading it will solve my problem then I will do that just would like to know if its a XMLTV issue?

Cheers
Casperse

Last edited by casperse; 11-10-2004 at 04:45 AM.
Reply With Quote
  #2  
Old 11-08-2004, 01:00 PM
ChrisAllenFiz ChrisAllenFiz is offline
Sage User
 
Join Date: Nov 2004
Posts: 37
As far as I can tell the xmltv plugin I use does not use episode numbers, but instead uses the sub-title field as the episode name. you could either rewrite the plugin or rewrite the xmltv data I guess.

Chris
Reply With Quote
  #3  
Old 11-09-2004, 03:44 AM
casperse casperse is offline
Sage User
 
Join Date: Oct 2004
Posts: 38
I have read up on the XMLTV standard and as far as I can see the above is correct format of episode listings, so maybee you are rigth that the SageTv plugin dosent import it? OR it does import it but SageTv dosent use this </episode-num> in the Tv Guide?

I guess its not a Country matter since if you get the information like above its correct "formatted" to the standard.

So if anybody have episode numbering in SageTV please let me know? (c:
Reply With Quote
  #4  
Old 11-09-2004, 06:37 AM
nielm's Avatar
nielm nielm is offline
SageTVaholic
 
Join Date: Oct 2003
Location: Belgium
Posts: 4,496
you can look at the java source for the plugin (the .java file in the xmltv dir) -- I don't think any of them import episode-num and only some import sub-title...
Reply With Quote
  #5  
Old 11-09-2004, 06:49 AM
ChrisAllenFiz ChrisAllenFiz is offline
Sage User
 
Join Date: Nov 2004
Posts: 37
In general none of the Plugins is perfect, you just have to pick the least worst and go with that. On the upside, the code for the plugin is quite simple, and easy to rewrite. I am currently writing my own plugin based which will not use XMLTV but a more direct data entry, in order to try to combat slowdowns during epg importing. Anyone with a little programming knowledge should be able to fix the plugin for thier own needs.

Chris
Reply With Quote
  #6  
Old 11-09-2004, 10:01 AM
alon24 alon24 is offline
Sage Aficionado
 
Join Date: Jun 2004
Posts: 351
Quote:
Originally Posted by ChrisAllenFiz
In general none of the Plugins is perfect, you just have to pick the least worst and go with that. On the upside, the code for the plugin is quite simple, and easy to rewrite. I am currently writing my own plugin based which will not use XMLTV but a more direct data entry, in order to try to combat slowdowns during epg importing. Anyone with a little programming knowledge should be able to fix the plugin for thier own needs.

Chris
I am thinking about taking the previous work of someone who played around with xcerses2 and xmltv and make it work all the way for sage (take all the fields in), what is your solution? maybe I can help????
Reply With Quote
  #7  
Old 11-09-2004, 10:07 AM
ChrisAllenFiz ChrisAllenFiz is offline
Sage User
 
Join Date: Nov 2004
Posts: 37
I have my guide data in text form, and so am going to parse this file and create simple java objects on disk (using serializable) representing just the information needed for the epg, then the import plugin will simple read the serialized data off the disk and squirt it directly into sage (hopefully making the file size of the epg data smaller and the processing quicker) . For my case, using XMLTV as an intermediate step just slows things down. For those who download XMLTV data already, my solution doesn`t make much sense.
Reply With Quote
  #8  
Old 11-09-2004, 12:42 PM
casperse casperse is offline
Sage User
 
Join Date: Oct 2004
Posts: 38
Thanks for all the feedback Guys!

I think that XMLTV is okay and the use of it reaches alot of people world wide. And if you do get all the information in a "standard" xml file its much easier for other people to make for example a Java script that all users no matter what country you come from can use.

Just as long as the format of the ripped web-information is the same.

To bad im not a programmer, but maybee it will be part of the plugin in the future.

PS I dont think its that bad, I update the file every night at 2 a clock, and the file is max 6 mb works just fine...Just missing the last feat. like Genre and episode numbering but hey you cant get everything right....

Last edited by casperse; 11-10-2004 at 01:46 AM.
Reply With Quote
  #9  
Old 11-10-2004, 01:45 AM
casperse casperse is offline
Sage User
 
Join Date: Oct 2004
Posts: 38
Hi Nielm

If I try to change the Java script, that will not be enough will it?

SageTV needs to have a field dedicated to this dont it?

I also was wondering how sage can discard episodes from different channels if they are the same episode and it dosent know that? Wont it just tape the same episodes on all channels if I for Example put Friends in my favorites?

Sorry if my questings are stupid
Reply With Quote
  #10  
Old 11-10-2004, 02:27 AM
ChrisAllenFiz ChrisAllenFiz is offline
Sage User
 
Join Date: Nov 2004
Posts: 37
Your questions aren`t stupid.

the epg plugin information is here

http://www.sage.tv/2_papers/EPGPlugins.txt

when you add a show you call

public boolean addShowPublic(String title, String primeTitle, String episodeName, String desc, long duration, String category,
String subCategory, String[] people, byte[] roles, String rated, String[] expandedRatings,
String year, String parentalRating, String[] bonus, String extID, String language, long originalAirDate);

so indeed sage does have an episode name field. This is purely a display field. (Sage will then show you the episode name in the details panel). What you would really like is for the ExtID (which is a unique id used by sage to identify this show) to take account of the episode name, as this would then allow sage to recognise the episode, and would stop it re-recording the same episode over and over again. To calculate this is more complex though, requiring some knowledge of hashing functions (or at least how to use them).

Chris

NB: I have posted a thread in the customizations forum about possibly writing a new plugin and/or customisation program. Post on that thread if you want to see me do the work for you

NB: as an aside for programmers, the current XMLTV plugins use CRC32 to calculate the ExtId from a number of String fields. I`m not sure how efficient this is. Anyone have any better ideas?

Last edited by ChrisAllenFiz; 11-10-2004 at 03:14 AM.
Reply With Quote
  #11  
Old 11-10-2004, 04:08 AM
nielm's Avatar
nielm nielm is offline
SageTVaholic
 
Join Date: Oct 2003
Location: Belgium
Posts: 4,496
Your best bet would be some code which does:
If episode name (sub-title) is not present, and episode number is present, then use episode number as episode name.
Best to put this before the code which generates the EPGID hash
Also, always put the episode number(s) at the end of the description text...


Quote:
Originally Posted by ChrisAllenFiz
NB: as an aside for programmers, the current XMLTV plugins use CRC32 to calculate the ExtId from a number of String fields. I`m not sure how efficient this is. Anyone have any better ideas?
Nope!
The EPGID is the way Sage detects that 2 episodes of the same show are identical... The only way to do this in XMLTV is use showname/episodename, but this is too long for Sage and not in the correct EPxxx or Shxxxx format, hence the need for a hash...
One thing that could be improved is for shows that do not have episode numbers/names that the generated EPGID uses an SHxxxx id (hashed from the show name only) indicating that all episodes are unique. (currently it uses a hash on the showname/date )
Reply With Quote
  #12  
Old 11-10-2004, 04:10 AM
nielm's Avatar
nielm nielm is offline
SageTVaholic
 
Join Date: Oct 2003
Location: Belgium
Posts: 4,496
Quote:
Originally Posted by casperse
If I try to change the Java script, that will not be enough will it?
And compile it to a .class file
Quote:
I also was wondering how sage can discard episodes from different channels if they are the same episode and it dosent know that? Wont it just tape the same episodes on all channels if I for Example put Friends in my favorites?
Sage uses EPGIDs to uniquely define shows/episodes...
The XMLTV plugin uses a checksum algorithm to generate a EPGID from a showname/episodename... So if your identical episodes of friends have identical epsiode names, the EPGID will be the same and you will only get one recording.
Reply With Quote
  #13  
Old 11-10-2004, 04:44 AM
casperse casperse is offline
Sage User
 
Join Date: Oct 2004
Posts: 38
Thanks! ChrisAllenFiz I will look for your tread!

And thanks to Nielm I just realized if it generates a EPGID from the name field and wont record a program with the same EPGID then I have a serious problem!

As you can see the name field above is "friends" or "venner" in Danish and without the episode numbering all episodes will just be named Friends! = the same EPGID
I will check this when I get home.

Thanks Guys!
Reply With Quote
  #14  
Old 11-10-2004, 04:54 AM
nielm's Avatar
nielm nielm is offline
SageTVaholic
 
Join Date: Oct 2003
Location: Belgium
Posts: 4,496
Quote:
Originally Posted by casperse
And thanks to Nielm I just realized if it generates a EPGID from the name field and wont record a program with the same EPGID then I have a serious problem!

As you can see the name field above is "friends" or "venner" in Danish and without the episode numbering all episodes will just be named Friends! = the same EPGID
I will check this when I get home.
If there is no episode number the current plugins generate an EPGID from the showname and the date/time... so that every show will be seen as unique by Sage...
Reply With Quote
  #15  
Old 12-07-2004, 02:48 PM
Demideus's Avatar
Demideus Demideus is offline
Sage User
 
Join Date: Mar 2004
Posts: 66
Just updated my hack on the XMLTVInportPlugin. It now adds episode numbers to the episode name and the detail page. It also uses the episode number in the calculation of the show ID if the episode name is missing.

http://forums.sage.tv/forums/showthr...3378#post43378
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 04:02 PM.


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