Showing posts with label mythtv. Show all posts
Showing posts with label mythtv. Show all posts

Monday, October 06, 2008

mc2xml on ubuntu

I recently switched to mc2xml for grabbing TV listings from TitanTV. The service doesn't always respond in a timely manner and so I needed a script to retry a couple of times in case it failed the first time. Here is the bash script that I wrote to retry every 60 seconds for 15 minutes. I hope that it helps someone else.

#!/bin/bash

servicebusy=2
repeats=0
maxrepeats=15

cd /home/user/mc2xml
./mc2xml
errorcode=$?

echo Error Code == $errorcode

while [[ $errorcode -eq $servicebusy ]]; do
if [[ $repeats -ge $maxrepeats ]]; then
exit -1
fi
let "repeats += 1"
echo repeating in 60 seconds \( try $repeats of $maxrepeats \)
sleep 60
./mc2xml
errorcode=$?
done

mythfilldatabase --refresh-all --file 1 xmltv.xml
I run it every night with the following command in my crontab

39 2 * * 1-7 bash /home/user/mc2xml/do_mythfill_fixed.sh

Thursday, May 22, 2008

New MythTV Box

I just put together a new MythTV box with an Intel Core2 Duo E7200 processor and a Gigabyte GA-73PVM-S2H. My build was based on one I found on another blog, and so far I am very pleased with the results. I used MythBuntu 8.04 for the OS, and despite the fairly minimal install MythBuntu provides, I have gotten everything working rather quickly. I intend to document a couple of the tweaks that I have to make in order to get everything working just right.

Here is a list of the additional packages that I have installed so far with apt-get:

  • unzip
  • nvidia-glx-new
  • nvidia-settings
  • sysvconfig (I like to use the Fedora/RH style 'service' script to stop and restart services)
  • hdhomerun-config

 

Blogger Template by Blogcrowds