16 Oct 2013

XBMC Set Videos to Watched

If you're importing a bunch of videos into XBMC, by default they are set as not viewed. Here's how to change that.

To change the viewed setting on import, you'll need to modify the advancedsettings.xml file. On Linux this file should be created in the /home/<user>/.xbmc/userdata directory (it does not exist by default).

Open this file and use these settings:


This setting will set the watched state based on the value in the nfo file for each movie. Most likely, you don't have nfo files for each of your movies, to generate them, go to the XBMC user interface and select

Settings > Video > Library > Export library

You'll now have nfo files generated for all of your movies in your video directory. You then have to change the playcount setting in each nfo file:


That would be very tedious if you have a lot of files. Here's a quick Linux command to change all of the files to viewed:

sed -i 's/playcount>0</playcount>1</g' *.nfo

Finally, you now have to remove this directory as a library source and re-add it.