Win Bug in NFO creation during XBMC library export v.11/12RC3
#1
Exclamation 
Hi,

I don't know if this is the correct place for this, but I have found a bug in XBMC and thought I would share my discovery.
I have found that NFO files aren't always exported correctly if the movie library contains movies stored in compressed archives (RAR archives in my case).
What happens is the following.
I have a movie library stored on a NAS with a couple of devices running XBMC that all access this library via NFS. Each of my movies are stored in separate folders labeled with the movie title. I have the XBMC movie scraper configured to look up movies based on the folder name.
To ease scraping I routinely export the library from my main XBMC device using the 'Export video library' feature.
I choose to export separate files per entry, I select yes to thumbnails and fanart, and no to actor thumbs.
This mostly works fine, it makes scraping on my other devices much faster.

What I have noticed though is that sometimes the scraper will find a completely wrong movie title when scraping on one of other devices, but always a title I also have in my library.
Example: The movie 'Snow White and the Seven Dwarfs' might be found as 'Terminator 2', another movie in my library but a complete scraper miss fire. When I choose to refresh the information on the movie that has been mislabeled the scraper then finds the correct movie.

So today I sat down and investigated how this could happen. What I found is that the NFO file for the movie that shows up wrong contains XML for more than one movie. Continuing with my Snow White example, the NFO for that movie would contain the XML data for 'Terminator 2' first, then XML for X number of other movies and lastly the XML for Snow White. This is why the scraper gets it wrong, it obviously just picks the first data set it finds in the NFO file. Now this only happens in a couple of NFO files, all other files are 'normal' with XML for one movie only.

I discovered that all the movies that ended up in the wrong NFO files all have in common that they are stored in RAR archives. Furthermore, folders with a movie in a RAR archive doesn't contain a NFO file like all of my other movie folders.
So to me it seems XBMC fails to write the NFO file if the movie is stored in an archive, the XML data is instead prefixed to the next NFO file XBMC do manage to write. I tested this by extracting one of the movies stored in a RAR archive, deleted the archive and added the now unpacked movie to XBMC. I did another export and this time a NFO file was generated for the movie and it no longer appeared in a NFO file for another movie.

FYI, the device I export my library from runs Windows 7 64bit and I have confirmed this bug both in XBMC 11 and XBMC 12 RC3.
Is this a known bug (I haven't been able to find anything similar) and if not how does one make the developers aware of it?
Reply
#2
Hmm, so the problem is that if writing the XML fails, we don't clear it correctly?

Will check it out and fix.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#3
Fixed in 8a07a07e4762d4d37f57cd89f35393ce1815d48f

This may not make Frodo final.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#4
Wow that was quick. Smile
As I understand your fix what you do now is clear the internal XML document to ensure failed writes doesn't "spill" over into other NFO files, correct?

It might be worth investigating why NFO files aren't being written in the first place though because it is only NFO writes that fail. I should probably have mentioned this the first time around but fanart and TBN files does show up in folders containing RAR compressed movies, it is only NFO files that seem to be affected.
I can provide debug log when I get home from work if that would help any.

On a side note, I've noticed that since I switched to Frodo, the export function doesn't seem to generate TBN files anymore, is that by design?
Reply

Logout Mark Read Team Forum Stats Members Help
Bug in NFO creation during XBMC library export v.11/12RC30