XBMC#

I was using XBMC (now “Kodi”) as my media center front-end along with a shared database to handle synchronizing the state of the media library. I had gone from Windows Media Center to XBMC in December 2011 because Windows Media Center couldn’t handle the volume of content I had and the XBMC interface is much more friendly.

While I liked the ease of use and the handling of VIDEO_TS folders, once I updated my goals for more accessibility of media, Plex seemed like a better fit for me, so I switched again.

Media Organization#

XBMC media organization is very similar to Plex so moving wasn’t too hard.

Advanced Configuration#

In order to have a shared database and proper scanning of VIDEO_TS folders, I had to do a bit of advanced configuration in XBMC.

Advanced config settings are stored in the userdata folder in a file called advancedsettings.xml

Here’s what I used for my advancedsettings.xml file:

<advancedsettings>
  <sorttokens>
    <token>the</token>
    <token>a</token>
    <token>an</token>
  </sorttokens>

  <!-- Regular expressions to match VIDEO_TS folders. -->
  <tvshowmatching append="no">
    <regexp>\[[Ss]([0-9]+)\]_\[[Ee]([0-9]+)\]?([^\\/]*)(?:(?:[\\/]video_ts)[\\/]video_ts.ifo)?</regexp>
    <regexp>[\._ \[\-\\/]([0-9]+)x([0-9]+)([^\\/]*)(?:(?:[\\/]video_ts)[\\/]video_ts.ifo)?</regexp>
    <regexp>[Ss]([0-9]+)[\.\-]?[Ee]([0-9]+)([^\\/]*)(?:(?:[\\/]video_ts)[\\/]video_ts.ifo)?</regexp>
    <regexp>[\._ \-\\/]([0-9]+)([0-9][0-9])([\._ \-][^\\/]*)(?:(?:[\\/]video_ts)[\\/]video_ts.ifo)?</regexp>
  </tvshowmatching>

  <!-- Don't show "unwatched" flags. -->
  <video>
    <playcountminimumpercent>101</playcountminimumpercent>
  </video>

  <!-- Don't recognize disc images as videos. -->
  <videoextensions>
    <!-- add>.ex1|.ex2</add -->
    <remove>.dat|.bin</remove>
  </videoextensions>

  <!-- Database sharing/synchronization. -->
  <videodatabase>
    <type>mysql</type>
    <host>192.168.XXX.XXX</host>
    <port>3306</port>
    <user>XXXXXXXX</user>
    <pass>XXXXXXXX</pass>
    <name>xbmc_video</name>
  </videodatabase>
  <musicdatabase>
    <type>mysql</type>
    <host>192.168.XXX.XXX</host>
    <port>3306</port>
    <user>XXXXXXXX</user>
    <pass>XXXXXXXX</pass>
    <name>xbmc_music</name>
  </musicdatabase>

  <!-- Central cache for thumbnails. -->
  <pathsubstitution>
    <substitute>
      <from>special://masterprofile/Thumbnails</from>
      <to>smb://illighomeserver/Public/XBMC/userdata/Thumbnails</to>
    </substitute>
    <substitute>
      <from>special://profile/Thumbnails</from>
      <to>smb://illighomeserver/Public/XBMC/userdata/Thumbnails</to>
    </substitute>
  </pathsubstitution>
</advancedsettings>

Troubleshooting#

I ran into various challenges getting XBMC to properly work on my somewhat-underpowered front-end machine. I also ran into challenges getting it to start up automatically after a reboot. These notes helped get me past that.

The “boot to desktop” batch file looks like this:

C:\Windows\explorer.exe shell:::{3080F90D-D7AD-11D9-BD98-0000947B0257}
"C:\Program Files (x86)\XBMC\xbmc.exe" shell:::{3080F90D-D7AD-11D9-BD98-0000947B0257}
Exit