| Sponsored Ads |
|
|||||||
| xmlTV everything related to xmlTV in here |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Portal Member
Join Date: Nov 2004
Posts: 144
Thanks: 0
Thanked 2 Times in 2 Posts
Country:
|
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 |
|
|
|
|
|
#2 (permalink) |
|
Portal Member
Join Date: Nov 2004
Posts: 144
Thanks: 0
Thanked 2 Times in 2 Posts
Country:
|
Ok I take time to run it in debug mode and I found the problem
... and the the solutionin 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);
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);
|
|
|
|
|
|
#3 (permalink) |
|
Portal Member
Join Date: Nov 2004
Posts: 144
Thanks: 0
Thanked 2 Times in 2 Posts
Country:
|
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. |
|
|
|
| This User Say Thank You: |
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
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 |