|
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. |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
||||
|
||||
Error in XMLTV plugins?
Hi,
I've been having a big problem with xmltv plugin for some months now, so I did some tests. Description of the problem: When a show does not have a subtitle, XMLTV plugin generates identical ShowIDs when the title is identical. This should not happen because the original programmer of the plugin included some code to prevent this: (this thread is about show.java): Code:
if (this.episodeName != null) { crc.update(this.episodeName.getBytes()); } else { if (this.startString != null) { crc.update(this.startString.getBytes()); } } Code:
public void writeLog(String msg) { try { File outputFile = new File("C:/Program Files/Frey Technologies/SageTV/xmltv/log.txt"); FileWriter out = new FileWriter(outputFile, true); //append to file out.write(msg); out.close(); } catch (IOException ioe) {} } Code:
writeLog("title= '"+this.title+"'\n"); if (this.episodeName==null) writeLog("Episode= null\n"); if (this.episodeName=="") writeLog("Episode= empty\n"); if (this.episodeName!="" && this.episodeName!=null) writeLog("Episode= '"+this.episodeName+"'\n"); My solution: replace "!=null" with ".length()!=0" : Code:
if (this.title.length() != 0) crc.update(this.title.getBytes()); if (this.episodeName.length() != 0) { crc.update(this.episodeName.getBytes()); } else { if (this.startString.length() != 0) { crc.update(this.startString.getBytes()); } } if (this.desc.length() != 0) crc.update(this.desc.getBytes()); I did much more logging so I saw that I got identical ShowIDs on shows with identical titles and empty subtitles. The startString has never been considered. After my changes the log showed perfectly different ShowIDs for shows without subtitles because in these cases the startString has been considered. Attached you'll find the changed plugin with sources. I hope my English is clear enough Any comments on this? Oliver
__________________
Oliver Kötter ------------ Check this thread for importing German TV Data into SageTV Using SageTV 7.1.9, Java 1.6.0_24 Win7 Home Premium on an Asus M4N78-AM Mainboard, AMD Athlon II X2 215, 4 GB RAM, 500 GB HDD, 2xTechnoTrend S-2400 as Network Encoder (LM DVB Smart Recorder), ATI Radeon HD 3450 with analog TV-Out on good old CRT TV (100Hz) My avatar shows the world's best composer!!! Last edited by owilsky; 05-14-2005 at 06:26 AM. Reason: Uploaded new version of xmltv plugin |
#2
|
||||
|
||||
I not seen a problem like this: I always get shows with no episode-name/sub-title recorded separately... Do your XMLTV *files* contain programmes with empty <sub-title> elements? -- it should be that the parser will not populate the episode name with anything (meaning that it will be ==null) if there is no <sub-title> in the <programme>... This fix will probably cause an NPE in programmes with no <sub-title>
But yes, it is probably an oversight that empty sub-titles are included and should be corrected: Perhaps it should be: Code:
if ( this.episodeName !=null && this.episodeName.trim().length() != 0)
__________________
Check out my enhancements for Sage in the Sage Customisations and Sageplugins Wiki |
#3
|
||||
|
||||
Quote:
Quote:
Oliver
__________________
Oliver Kötter ------------ Check this thread for importing German TV Data into SageTV Using SageTV 7.1.9, Java 1.6.0_24 Win7 Home Premium on an Asus M4N78-AM Mainboard, AMD Athlon II X2 215, 4 GB RAM, 500 GB HDD, 2xTechnoTrend S-2400 as Network Encoder (LM DVB Smart Recorder), ATI Radeon HD 3450 with analog TV-Out on good old CRT TV (100Hz) My avatar shows the world's best composer!!! |
#4
|
||||
|
||||
I think that an empty sub-title is not allowed inthe XMLTV spec -- maybe passing it through tv_cat or tv_sort mught clean it up
(the plugin should still cope with slightly out-of-spec data)
__________________
Check out my enhancements for Sage in the Sage Customisations and Sageplugins Wiki |
#5
|
||||
|
||||
OK, I updated the plugin:
- checks if xmltag.trim().length() !=0 - checks if xmltag != null I updated the upload on post #1 for those who are interested. Works much better for me now if subtitle is empty. Oliver
__________________
Oliver Kötter ------------ Check this thread for importing German TV Data into SageTV Using SageTV 7.1.9, Java 1.6.0_24 Win7 Home Premium on an Asus M4N78-AM Mainboard, AMD Athlon II X2 215, 4 GB RAM, 500 GB HDD, 2xTechnoTrend S-2400 as Network Encoder (LM DVB Smart Recorder), ATI Radeon HD 3450 with analog TV-Out on good old CRT TV (100Hz) My avatar shows the world's best composer!!! |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|