Hello all,
If you are anything like me, you have dozens of seasons of Television,
mostly from DVD boxed sets, sitting in MythVideo. If you are again like me,
you might have thumbnails but have no plot, director, or year information on
them. Their names are a mess of different formats like 1x03, s07e22, etc.
So, to take care of all of that, I have written a set of scripts. The linked
tarball contains a master script and a few helper scripts. Untar (tar -xvzf
metacleanup-0.1.tar.gz) and edit the master script, metacleanup.sh. At the
top you will set six or so variables (should be easy to understand) before
being able to run it (./metacleanup.sh). It will do the following:
1) Search through all of your MythVideo for anything without an IMDB number.
It will then search RageTV.com, pull down episode name, plot, year, and
director, and insert it into your database. You will be prompted to answer
yes or no to each recording, but that should be it. HUGE thanks to Steve
Adeff for letting me adapt his RageTV script to this purpose.
2) Failing the above, the script will parse the file through mplayer and
determine it's length in minutes, and insert that into the database.
3) The script will autogenerate a thumbnail for any MythVideo file without
one.
OK, before I get to a link, the known issues. Read me!
- Some obscure or difficult file types (in my case, M2TS's and EVO's from
HD-DVD and Blu-Ray rips) that choke mplayer may send the script into a loop.
You just have to keep an eye on it. If it goes into such a loop, you will
need to Ctrl-C out of the script and manually enter the length information
with either a mysql statement or phpmyadmin.
- Titles are changed to format "SHOWNAME SEASONxEPISODE - SUBTITLE", ie
"Battlestar Galactica 1x01 - 33." This is the way I like it, so it's the way
it got written. Second version will include customization of this.
- If you have an actual non-television movie without a poster, after running
this script, it will have a thumbnail. Oh well. This script is really meant
to be used once you have all your movies "just so."
- Once the script has processed a video, whether you accept or deny the
database changes, it changes the IMDB number of the file from 00000000 to
00000001. This is to avoid being re-processed in the future. It's not really
an issue, more of an FYI.
- You need mplayer and perl installed.
- This is tested and working with current SVN, but should work perfectly
since at least .20.2.
- While looking at the plot information from RageTV, you may see HTML tags.
You can safe ignore these and insert into your database, I remove them with
a cleanup routine later.
- This is a work in progress! If you want to talk about it or suggest an
improvement, come to the IRC channel. I *know* it's hacked together, but I
got tired of talking about how I wished such a thing existed.
- I am not responsible for you breaking your database. Back up first! Here,
I'll show you how:
mysqldump -umythtv -p --extended-insert --databases mythconverg >
mythdatabase.bak
OK, with all that said, you can download the scripts at:
http://idisk.mac.com/r.mcnamara-Public?view=web
Have fun, and let me know what you think.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mythtv.org/pipermail/mythtv-users/attachments/20080102/7a110da4/attachment.htm