Media Companion

Discussion and development board for the program Media Companion.
 
HomeHome  SearchSearch  RegisterRegister  Log inLog in  

 

 Recent MC much pickier about XML than Gen 1

Go down 
AuthorMessage
greybeard
Junior Member
Junior Member


Posts : 17
Join date : 2009-12-04

Recent MC much pickier about XML than Gen 1 Empty
PostSubject: Recent MC much pickier about XML than Gen 1   Recent MC much pickier about XML than Gen 1 Icon_minitimeMon Dec 14, 2009 1:45 am

I continued to manage my tv shows with 2.292 until 3.154 came out. When I installed 3.154 and pointed it at my tv folders (I use show folder with all seasons and episodes in that folder) MC threw errors on the xml in several of my .nfo files that had always worked just fine with 2.292 and with XBMC 9.04.1 on my AppleTV. I thought maybe it was a parser error or something, but when the problem persisted through 3.175 to 3.182 I spent all afternoon today going through the problematic .nfo files. I finally decided to try replacing the '&' that I had in one of the titles with '&' and it cleared up that file's xml error. So I replaced all the ampersands with & and all the xml errors cleared up (I think -- I have not checked all shows and all episodes).

Is it absolutely to the XML standard that '&' can never be used to represent itself?
Back to top Go down
AnthonyB
Senior Member
Senior Member


Posts : 122
Join date : 2008-11-08
Location : Sydney, Australia

Recent MC much pickier about XML than Gen 1 Empty
PostSubject: Re: Recent MC much pickier about XML than Gen 1   Recent MC much pickier about XML than Gen 1 Icon_minitimeMon Dec 14, 2009 9:30 am

http://www.w3.org/TR/REC-xml/

Quote :
The ampersand character (&) and the left angle bracket (<) MUST NOT appear in their literal form, except when used as markup delimiters, or within a comment, a processing instruction, or a CDATA section. If they are needed elsewhere, they MUST be escaped using either numeric character references or the strings " &amp; " and " &lt; " respectively.
Back to top Go down
greybeard
Junior Member
Junior Member


Posts : 17
Join date : 2009-12-04

Recent MC much pickier about XML than Gen 1 Empty
PostSubject: Re: Recent MC much pickier about XML than Gen 1   Recent MC much pickier about XML than Gen 1 Icon_minitimeMon Dec 14, 2009 6:11 pm

Thank you for the specific reference. I believe one of the offending .nfo files had been created by MC 1st gen based on thetvdb information. When MC gen 2 flagged an XML error, I moved the offending .nfo file out of the folder and tried to rescrape "Find new shows?", but MC would report that it had found the entry for absolutely-fabulous-s04e01-parallox.nfo04x01, but then farther down in the log it would report that it could not locate this episode on TVDB or that TVDB may not be available, but I could browse to the entry in firefox. I just looked at the page for that episode in HTML source mode in firefox. textarea.Overview.display.inline has a literal ampersand character in the text that is displayed.

I suspect that untolled other entries at TVDB have literal characters that might cause problems if the code has become stricter. All the other entries I have found in my collection that have literal ampersand are handcrafted .nfo files for shows that are neither on IMDB nor TVDB so I have changed them and made a note to myself to be stricter in creating my own XML in the future.

However, since no lives or large investments are depending on this code, it might be a good idea to go back to the rules for Internet programs that were followed by most programmers before Tim W-L invented the WWW: be conservative in what you produce as output to other programs, but liberal with what you accept. That rule as much as anything else is what allowed the Internet to become established in the 1970's and '80's so that it was ready for HTTP and HTML.
Back to top Go down
billyad2000
Admin
billyad2000

Posts : 1326
Join date : 2008-09-20

Recent MC much pickier about XML than Gen 1 Empty
PostSubject: Re: Recent MC much pickier about XML than Gen 1   Recent MC much pickier about XML than Gen 1 Icon_minitimeSun Dec 20, 2009 2:49 pm

I decided to move to 100% complient xml since this was the only way I could be sure that the nfo is imported correctly into the XBMC db.

While XBMC does allow some tags with xml errors, it refuses others, this has also altered between different versions of the program.

Allowing MC to import none complent nfo files seems easier at first, but if the files cannot be imported into XBMC then what is the point, i've made it as easy as possible to fix these files, just select rescrape, if the IMDB_ID is contained within the nfo file MC will scrape the movie correctly.

Problem movies can also be listed seperately using the "Problem" filter, making identifying these non-complient files simple.

_________________
Do you have a problem with Media Companion, before posting a bug then please check you have the very latest version of Media Companion http://billyad2000.darkbb.com/announcements-f1/
Back to top Go down
http://billyad2000.co.uk
greybeard
Junior Member
Junior Member


Posts : 17
Join date : 2009-12-04

Recent MC much pickier about XML than Gen 1 Empty
PostSubject: Re: Recent MC much pickier about XML than Gen 1   Recent MC much pickier about XML than Gen 1 Icon_minitimeTue Dec 22, 2009 7:36 pm

billyad2000 wrote:
I decided to move to 100% complient xml since this was the only way I could be sure that the nfo is imported correctly into the XBMC db.

While XBMC does allow some tags with xml errors, it refuses others, this has also altered between different versions of the program.

Allowing MC to import none complent nfo files seems easier at first, but if the files cannot be imported into XBMC then what is the point, i've made it as easy as possible to fix these files, just select rescrape, if the IMDB_ID is contained within the nfo file MC will scrape the movie correctly.

Problem movies can also be listed seperately using the "Problem" filter, making identifying these non-complient files simple.

The problem is that for tv shows, MC is not creating .nfo files at all for 2 episodes of Absolutely Fabulous, s02e01-hospital, and s02e02-death. The log screen showed that it successfully found .nfo2x01 and .nfo2x02, but then when it tries to actually create the .nfo files it says that TVDB may be down. I can immediately after getting that twice go to the episode records on TVDB and read them. In these two cases there do not appear to be any illegal characters. In fact, I scraped them with MC 2.292, and then MC 3.182 can read the .nfo files and creates the episode thumbs just fine. Oh, the episodes do have IMDB_ID numbers.
Back to top Go down
Sponsored content




Recent MC much pickier about XML than Gen 1 Empty
PostSubject: Re: Recent MC much pickier about XML than Gen 1   Recent MC much pickier about XML than Gen 1 Icon_minitime

Back to top Go down
 
Recent MC much pickier about XML than Gen 1
Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
Media Companion :: Media Companion :: Bug Discussion-
Jump to: