mythbuntu, ltsp and home directories

Saturday, December 27th, 2008

Since I just spent about an hour trying to find this again, mythbuntu diskless clients have an “overlay” where the home directories and some other files specific to each instance are stored.  On the server, you can find these in /var/cache/mythbuntu-diskless/overlay/[mac_address]/

Duplicate entires be gone!

Wednesday, December 12th, 2007

I’ve got a bug in one of my scripts somewhere that’s saving multiple entries for video files in mythtv’s videometadata table. Here’s a quick hacky SQL query to find them:

SELECT intid, filename, coverfile
FROM videometadata
WHERE filename IN
  (SELECT filename FROM
    (SELECT filename, COUNT(*) AS ttl FROM videometadata
     GROUP BY filename HAVING ttl > 1
    ) AS tmpfoo
  ) ORDER BY filename

O NOES! My precious datas!!

Wednesday, December 12th, 2007

Maybe one day, I’ll convince myself that using MySQL transactions is a good idea, and start using them whenever I do SQL writes.

In related news, I just NULLed out all my coverdata fields in my mythTV’s mythvideo table. Regenerating all of that crap is really tedious, as the website’s API I use gets flaky after I hit it with a few hundred requests in a matter of minutes. :(

Sigh.

Update:

All fixed.   Took ~90 lines of python.  Good script to have around anyway:  looks for entries with no/missing/invalid coverfile and tries to re-fetch it from thetvdb.com.  One day I’ll get all this crap into SVN.   I’m getting quite the collection of these handy scripts. :)