Issue with Export Library Multiepisode nfo
#1
Please, if this is in the wrong thread, move to correct thread.

I'm a Dev for Media Companion, third-party media manager, and today I attempted to open some exported episodes from Kodi, using Media Companion's normal xml routines.
And I received an error stating: Multiple Root Elements.

I found that each episode in the multiepisode nfo was placed within <episodedetails></episodedetails>, so for this example, there were two lots of episodedetails nodes, and no Root Element.
EG:
Code:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<episodedetails>
    <title>Vendetta</title>
    <showtitle>Arrow</showtitle>
    <rating>7.500000</rating>
    <epbookmark>0.000000</epbookmark>
    <year>0</year>
    <top250>0</top250>
    <season>1</season>
    <episode>8</episode>
    <uniqueid>4408785</uniqueid>
    <displayseason>-1</displayseason>
    <displayepisode>-1</displayepisode>
    <votes>186</votes>
    <outline></outline>
    <plot>As Oliver and Helena grow closer, Oliver trains her to be his ally, complete with showing her how to use a crossbow. Diggle disapproves of Oliver sharing his secret with Helena as he’s not sure she can be trusted</plot>
    <tagline></tagline>
    <runtime>71582788</runtime>
    <thumb>http://thetvdb.com/banners/episodes/257655/4408785.jpg</thumb>
    <mpaa>TV-PG</mpaa>
    <playcount>0</playcount>
    <lastplayed></lastplayed>
    <id></id>
    <set></set>
    <premiered>2012-10-10</premiered>
    <status></status>
    <code></code>
    <aired>2012-12-05</aired>
    <studio>The CW</studio>
    <trailer></trailer>
    <resume>
        <position>0.000000</position>
        <total>0.000000</total>
    </resume>
    <dateadded>2014-10-16 16:57:23</dateadded>
</episodedetails>
<episodedetails>
    <title>Year&apos;s End</title>
    <showtitle>Arrow</showtitle>
    <rating>7.500000</rating>
    <epbookmark>0.000000</epbookmark>
    <year>0</year>
    <top250>0</top250>
    <season>1</season>
    <episode>9</episode>
    <uniqueid>4415147</uniqueid>
    <displayseason>-1</displayseason>
    <displayepisode>-1</displayepisode>
    <votes>189</votes>
    <outline></outline>
    <plot>Oliver discovers that after he and his father went missing, Moira and Thea stopped celebrating Christmas. Determined to make up for lost time and restore a sense of normalcy to the Queen household</plot>
    <tagline></tagline>
    <runtime>71582788</runtime>
    <thumb>http://thetvdb.com/banners/episodes/257655/4415147.jpg</thumb>
    <mpaa>TV-PG</mpaa>
    <playcount>0</playcount>
    <lastplayed></lastplayed>
    <id></id>
    <set></set>
    <premiered>2012-10-10</premiered>
    <status></status>
    <code></code>
    <aired>2012-12-12</aired>
    <studio>The CW</studio>
    <trailer></trailer>
    <resume>
        <position>0.000000</position>
        <total>0.000000</total>
    </resume>
    <dateadded>2014-10-16 16:57:23</dateadded>
</episodedetails>

Where as in Media Companion, we use a Root Element
Code:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<multiepisodenfo>
  <episodedetails>
    <fileinfo>

Now, I am by no means an expert, but shouldn't the xml file from XBMC\Kodi be compliant with the XML standard? I read on Wiki and xmlfiles.com that there should always be a root element.

Media Companion's simple nfo validation fails
Code:
Dim tvshow As New XmlDocument
Try
     tvshow.Load(nfopath)
Catch ex As Exception
     validated = False
End Try

If I am wrong, and I probably am, if someone could give me an example of how to read the multi-episode xml file .

And thank you all for XBMC and Kodi. It's a great program and is in use daily in mine and friends homes. Keep up the good work.
Media Companion Dev.
Media Companion - Kodi / XBMC - Media Companion
Reply
#2
This has been like that forever. XBMC supports reading multiepisode files that have a root element of any name as long as there is an <episodedetails> tag. Ideally we would export like that as well but I don't know the implications on other software that might rely on the old format.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#3
@Montellese

Been using XBMC since Camelot, and Developing for Media Companion for around two years, but this was the first time I attempted to load exported nfo files into Media Companion.

I'll figure out a routine to be able to load these into Media Companion. Last think I'd want is to cause legacy issue with other existing software, so I'll go with the flow.

Thanks for the reply.
Media Companion Dev.
Media Companion - Kodi / XBMC - Media Companion
Reply

Logout Mark Read Team Forum Stats Members Help
Issue with Export Library Multiepisode nfo0