<span class="Apple-style-span" style="font-family: Verdana; font-size: 12px; ">Hello all,&nbsp;<br><br>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.&nbsp;
<br><br>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:&nbsp;<br><br>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. <span class="Apple-style-span" style="font-weight: bold;">
<span class="Apple-style-span" style="font-style: italic;">HUGE thanks to Steve Adeff for letting me adapt his RageTV script to this purpose.</span></span>&nbsp;<br><br>2) Failing the above, the script will parse the file through mplayer and determine it&#39;s length in minutes, and insert that into the database.&nbsp;
<br><br>3) The script will autogenerate a thumbnail for any MythVideo file without one.&nbsp;<br><br><span style="font-weight: bold; ">OK, before I get to a link, the known issues. Read me!</span>&nbsp;<br><br>- Some obscure or difficult file types (in my case, M2TS&#39;s and EVO&#39;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.&nbsp;
<br><br>- Titles are changed to format &quot;SHOWNAME SEASONxEPISODE - SUBTITLE&quot;, ie &quot;Battlestar Galactica 1x01 - 33.&quot; This is the way I like it, so it&#39;s the way it got written. Second version will include customization of this.&nbsp;
<br><br>- 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 &quot;just so.&quot;&nbsp;
<br><br>- 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&#39;s not really an issue, more of an FYI.&nbsp;
<br><br>- You need mplayer and perl installed.&nbsp;<br><br>- This is tested and working with current SVN, but should work perfectly since at least .20.2.&nbsp;<br><br>- 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.&nbsp;
<br><br></span><div><span class="Apple-style-span" style="font-family: Verdana; font-size: 12px;">- This is a work in progress! &nbsp;If you want to talk about it or suggest an improvement, come to the IRC channel. &nbsp;I *know* it&#39;s hacked together, but I got tired of talking about how I wished such a thing existed.
</span></div><div><span class="Apple-style-span" style="font-family: Verdana; font-size: 12px; "><br>- I am not responsible for you breaking your database. Back up first! Here, I&#39;ll show you how:&nbsp;<br>mysqldump -umythtv -p --extended-insert --databases mythconverg &gt; 
mythdatabase.bak&nbsp;<br><br>OK, with all that said, you can download the scripts at:&nbsp;<br><br><a href="http://idisk.mac.com/r.mcnamara-Public?view=web">http://idisk.mac.com/r.mcnamara-Public?view=web</a>&nbsp;<br><br>Have fun, and let me know what you think.
</span><br></div>