What's Up With Xbox Media Center

October 05, 2005

Add A Now Playing Interface To Your Home Screen

xbmcFor the longest time I've complained about the lack of a good interface in Xbmc for reporting on new media files. Yeah yeah, there's that old window that showed the dvd cases, but it stunk, and didn't even work really well. I wanted something simple and available on the home screen.

So today while bored and messing with some regular expressions (yeah, I can get that bored) I made a couple PHP scripts that will parse a directory of files, scan them, sort them by date, and spit out a feed. I have this working on a Linux box. It should work exactly the same on Os X. You're on your own with Windows.

Now, by adding this to Xbmc's home screen, I have a simple "Now Playing" interface to report my newest shows and movies quickly and efficiently. And of course, this is all automated. I set up a cron job on my Media Server to run these two scripts every thirty minutes. Bliss.

Download The Scripts

xbmc feeds


  • Rocken :)

    Nice work.. I'll be sure to check this out.

    By Blogger camson, at 2:26 AM  

  • Cool.
    In movies.php you need to change $tvDir to $movieDir

    Also it doesn't handle directories with spaces in properly, it just takes the first word; and the same for files with '.' in.

    By Anonymous jediperry, at 5:18 AM  

  • Hey, deja vu... :-)

    By Anonymous Trejkaz, at 6:13 PM  

  • thanks jediperry, I fixed the $movieDir problem, damn that copy and paste.

    For the movies script, it should work fine with dirs with spaces. I myself have a space in my directory. /path/to/New Releases/

    It works for me. Anyhting named with a "." will get truncated, because i'm truncating anything after the first ".", for the file extension. C'mon guys, get those movie titles friendly looking. It can fly for Tv eps, but not for movies, heh.

    By Blogger Jon, at 8:38 PM  

  • Nice... I'd thought about doing something similar w/python.

    Is there any way to select/drill into an item? (newbie to xbmc)

    By Anonymous Anonymous, at 5:44 PM  

  • does this run on xbmc or a separate server? please post instructions... thanks

    By Anonymous Anonymous, at 1:09 AM  

  • You need to run this on a (separate) server that has PHP installed.

    I'm currently trying to get it up and running on my Windows box - I'll get back to you all when I do. :)

    By Blogger Martin, at 11:08 AM  

  • Hey -- thanks for this tutorial -- its a great feature that really completes the Xbox as MediaCenter conversion I'm attempting. One question though: how can I modify the php so that it will report back the actual filename (ex. I'd like to use this to show both movie and tv episode content, and its failing to report anything when its in the standard tvtitle.seasonandepisode.episodetitle.avi format. Any suggestions?

    By Anonymous Anonymous, at 3:43 AM  

  • I agree. Excellent idea and implementation!

    I would also ask, as I am not familiar with scripting and regular expressions , is there a way that this application can be more universal? Instead of commenting on just movie files or episodes, is there a way to modify the php scripts in order to simply present any new content recently downloaded?

    I would love to have XBMC report the fresh content recently downloaded to my media server as well!


    By Anonymous bigbadblo, at 12:03 PM  

Post a Comment

<< Home