2013-04-29, 01:08
(2013-04-29, 00:45)JohnWPB Wrote: Ok, I just found a bug that is probably going to effect a LOT of people, or at least anyone trying to creates sets in XBMC. It took me quite a few hours to figure out just why the sets were not displaying, after searching and reading tons of threads, trouble shooting ect.
There is a close tag for the </set> command, and no matching opening command for that tag.
To test this:
- I put 4 movies into a temp folder, and deleted the <movie>.nfo files in each of the 4 movie's subfolders.
- I then re-scraped the movies, and new .nfo files were created.
- Then, opening the <movie>.nfo file in Notepad++, in the code, there is a close tag for the "SET" tag. No opening just the " <set />"
Here is a snippit of the .nfo file after rescanning "American Pie"
Quote:<actor>
<name>Chris Weitz</name>
<role>Male Voice in Porn Film (voice) (uncredited)</role>
<thumb>http://ia.media-imdb.com/images/M/MV5BMjA2NTMxOTY2OF5BMl5BanBnXkFtZTYwODk4NDk3._V1._SY1080_SX1920_.jpg</thumb>
</actor>
<set />
<fileinfo>
<streamdetails>
<audio>
<channels>2</channels>
<codec>mp3</codec>
<bitrate>113</bitrate>
</audio>
The problem is, that after using the "SetManager" in EMM, it then creates it like this:
Quote:<actor>
<name>Chris Weitz</name>
<role>Male Voice in Porn Film (voice) (uncredited)</role>
<thumb>http://ia.media-imdb.com/images/M/MV5BMjA2NTMxOTY2OF5BMl5BanBnXkFtZTYwODk4NDk3._V1._SY1080_SX1920_.jpg</thumb>
</actor>
<set />
<set>Airplane! [Collection]</set>
<fileinfo>
<streamdetails>
<audio>
<channels>2</channels>
<codec>mp3</codec>
<bitrate>113</bitrate>
</audio>
I discovered this when I opened XBMC, none of the sets I created are there, after removing the movies from XBMC and scanning for new content. I then after a lot of diffing I found the extra </set>and removed it. I removed the the movies again from the XBMC library, and then scanned again to add them. After doing this the sets are now appearing correctly. I appears that the extra set close command is confusing XBMC into thinking that the <set> is closed, before it is even open
I checked around 20 random .nfo's from my 3,000 movies, and every one of them has had the abandoned "</set>" in the xml.
There is no way that I have thought of to remove them with a string replace, as just removing abandoned "</set>" would do EVERY one, including the ones in the correct places. The data between the <set> and </set> changes, so no way to do a string replace like that either.
Can a way be created to fix this unopened tag without having to re-scrape EVERYTHING all over again?
First, i can't reproduce your fault. I have made the same steps you have described, but i don't have this problem. I think you have a problem with your Ember database.
Secondly, <set /> iis not an unclosed tag, it's an empty string ( </set> is for closing).
Thirdly, you can try to remove the wrong tags with the tool TextCrawler. You can scan all *.nfo together and remove this tag. Then you have to remove all movies from Ember because the wrong tag is also stored in the Ember database or, for safety first, delete the database (Media.emm).
Use this settings for TextCrawler:
File Filter: *.nfo
Start Location: your movies folder
Find (klick on the Edit Find Text button to open a multiline editor and copy the tag from an NFO file with wordwrap and spaces):
Replace: leave this field empty
Now klick the find button and test it with 1 file (safety first! )