There are some user job scripts available <a href="http://www.mythtv.org/wiki/Category:User_Job_Scripts">here</a> for transcoding recordings and accessing the mythconverg database to give the new files a human readable filename. Specifically, <a href="http://www.mythtv.org/wiki/High_Quality_Transcode">this one</a> is one I use. In it is the following:<div>
<br></div><div># ============================================================================</div><div><div># A commonly used SQL row selector:</div><div>my $whereChanAndStarttime = "WHERE chanid=$chanid AND starttime='$starttime'";</div>
<div><br></div><div># ============================================================================</div><div># First, generate a new filename,</div><div>#</div><div><br></div><div>$query = $db->prepare("SELECT title FROM recorded $whereChanAndStarttime;");</div>
<div>$query->execute || Die "Unable to query recorded table";</div><div>$showtitle = $query->fetchrow_array;</div><div>$query->finish;</div><div><br></div><div>$query = $db->prepare("SELECT subtitle FROM recorded $whereChanAndStarttime;");</div>
<div>$query->execute || Die "Unable to query recorded table";</div><div>$episodetitle = $query->fetchrow_array;</div><div>$query->finish;</div><div><br></div><div>if ( $episodetitle ne "" ) </div>
<div>{</div><div> $seasonnumber = "";</div><div> $episodenumber = "";</div><div> $xmlstring = `/usr/share/mythtv/metadata/Television/ttvdb.py -N "$showtitle" "$episodetitle"`;</div>
<div> if ( $xmlstring ne "" ) {</div><div> $episodedetails =$xmlparser->XMLin($xmlstring);</div><div> $seasonnumber = $episodedetails->{item}->{season};</div><div> $episodenumber = $episodedetails->{item}->{episode};</div>
<div> }</div><div>}</div></div><div># ============================================================================</div><div><br></div><div>This had no issues in Myth 0.24 but since upgrading to 0.25 it fails to execute the "$episodedetails =$xmlparser->XMLin($xmlstring);" line for things such as TV series, documentaries, reality TV. It does however still work fine for movies. The error being produced is the following:</div>
<div><br></div><div><div>"Unsuccessful stat on filename containing newline at /usr/share/perl5/vendor_perl/XML/Simple.pm line 939.</div><div>File does not exist: </div><div>The modules tvdb_api.py (v1.0.0 or greater), tvdb_ui.py, tvdb_exceptions.py and cache.py.</div>
<div>They should have been installed along with the MythTV python bindings.</div><div>Error:(No module named lxml.etree)</div><div><br></div><div> at /home/david/scripts<span style="background-color:rgb(255,255,255)">/<span style="font-family:sans-serif;font-size:13px;line-height:19px"><a href="http://x264_transcode_high.pl">x264_transcode_high.pl</a></span></span> line 287"</div>
</div><div><br></div><div>I'm wondering if anyone can help with a solution to this. I really like this script and would like to continue using it for both movies and TV series.</div>