MediaPortal Forums HTPC/MediaCenter

Sponsored Ads

Go Back   MediaPortal Forum » MediaPortal 1 » Main Features (talk, share your ideas, get support) » Electronic Program Guide » xmlTV

xmlTV everything related to xmlTV in here

Reply
 
LinkBack Thread Tools Display Modes
Old 2008-04-25, 22:45   #1 (permalink)
mbb
Portal Member
 
Join Date: Nov 2004
Posts: 144
Thanks: 0
Thanked 2 Times in 2 Posts

Country:


fixed TVServer Import error episode-num field

since my tvguide provider add some new feature the TVguide.xml import fail.

status:tvguide.xml:Invalid XML file:Input string was not in a correct format.;

After some investigation, it seems that MP doesnt handle well the episode-num field.
I asked my provider about this and he claims that he respects the xmltv.dtd standard about this: XML: XMLTV - DTD for TV listings

I did some some test by replacing some string:
xmltv_ns">.. by xmltv_ns">
..</episode-num> by </episode-num>
xmltv_ns">0.. by xmltv_ns">0
and the same for 1.., 2.., 3.., etc

It works, and seems to confirm that the episode-num field parsing have something wrong.

I upload the file to test and some logs

Thanks
mbb
Attached Files
File Type: zip xmltv.zip (7.8 KB, 21 views)
mbb is offline   Reply With Quote
Old 2008-04-29, 22:30   #2 (permalink)
mbb
Portal Member
 
Join Date: Nov 2004
Posts: 144
Thanks: 0
Thanked 2 Times in 2 Posts

Country:


fixed

Ok I take time to run it in debug mode and I found the problem ... and the the solution

in XMLTVImport.cs the code doesnt work for this example 3..38/40 because it presume that p as only one digit, but 38 have 2 digits

we have to replace
Code:
 
int p = 0;
int t = 0;
if (Convert.ToInt32(episodePart.Substring(0, 1)) == 0)
{
    p = Convert.ToInt32(episodePart.Substring(0, 1)) + 1;
}
else
{
    p = Convert.ToInt32(episodePart.Substring(0, 1));
}
t = Convert.ToInt32(episodePart.Substring(2, 1));
episodePart = Convert.ToString(p) + "/" + Convert.ToString(t);
by
Code:
 
int p = 0;
int t = 0;
if (Convert.ToInt32(episodePart.Substring(0, episodePart.IndexOf("/", 0))) == 0)
{
    p = Convert.ToInt32(episodePart.Substring(0, episodePart.IndexOf("/", 0))) + 1;
}
else
{
    p = Convert.ToInt32(episodePart.Substring(0, episodePart.IndexOf("/", 0)));
}
t = Convert.ToInt32(episodePart.Substring(episodePart.IndexOf("/", 0) + 1, episodePart.Length -  episodePart.IndexOf("/", 0) + 1)));
episodePart = Convert.ToString(p) + "/" + Convert.ToString(t);
mbb is offline   Reply With Quote
Old 2008-04-30, 23:19   #3 (permalink)
mbb
Portal Member
 
Join Date: Nov 2004
Posts: 144
Thanks: 0
Thanked 2 Times in 2 Posts

Country:


Default

Finally I rewrite all the episode-num parsing in a more universal manner
It follow now the XMLTV DTD standard in all case

I join the fixed XmlTvImport.cs sources and the compiled dll to test the fix.
Attached Files
File Type: zip XmlTvImport.zip (39.4 KB, 41 views)
mbb is offline   Reply With Quote
This User Say Thank You:
Old 2008-05-01, 09:56   #4 (permalink)
Portal User
 
Join Date: Mar 2007
Location: Normandie
Age: 35
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts

Country:


Default

This solved my problem, now my EPG works great !!!!

Thank a lot !!!!
ovni is offline   Reply With Quote
Old 2008-05-01, 11:28   #5 (permalink)
Portal Tester
 
ronilse's Avatar
 
Join Date: Jul 2005
Posts: 2,941
Thanks: 12
Thanked 66 Times in 59 Posts

Country:

My System

Default

Hi,
Have added this bug to Mantis & link to patch.

Thanks for testing

Regards
Roy
ronilse is online now   Reply With Quote
Old 2008-05-06, 16:51   #6 (permalink)
Portal Developer
 
gemx's Avatar
 
Join Date: Oct 2006
Age: 32
Posts: 1,163
Thanks: 17
Thanked 169 Times in 88 Posts

Country:

My System

Default

Fixed in rev. 19047.

mbb
__________________
ACCENT HT-100 | 2x16 VFD | ADM Athlon 64 3500+ | Win XP SP2 | SkyStar 2 DVB-S PCI | TT connect S2-3600
gemx is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Import channel list from Mediaportal into TVserver Redfish Improvement Suggestions 2 2008-07-02 18:04
Why was the db-field for episode names dropped? Maschine Development 0 2007-10-04 13:56
Error Retrieving Episode information Bobb25 My TVSeries 12 2007-08-14 06:52
XMLTV import does not work on TVServer HanuIv pre 1.0 RC1 0 2007-07-01 12:20
Import of episode info XMLTV sunsetdk Get Support 1 2007-06-28 19:37


All times are GMT +1. The time now is 07:33.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
Integrated by BBpixel ©2004-2008, jvbPlugin
Protected by Akismet Blog with WordPress