<br><br><div class="gmail_quote">On 10 February 2012 14:12, David Crawford <span dir="ltr">&lt;<a href="mailto:davidcrawford83@gmail.com">davidcrawford83@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5"><br><br><div class="gmail_quote">On 10 February 2012 13:52, David Crawford <span dir="ltr">&lt;<a href="mailto:davidcrawford83@gmail.com" target="_blank">davidcrawford83@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br><br><div class="gmail_quote"><div><div>On 10 February 2012 13:51, Raymond Wagner <span dir="ltr">&lt;<a href="mailto:raymond@wagnerrp.com" target="_blank">raymond@wagnerrp.com</a>&gt;</span> wrote:<br></div>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>

  
    
  
  <div bgcolor="#FFFFFF" text="#000000"><div>
    On 2/10/2012 08:25, David Crawford wrote:
    </div><blockquote type="cite"><div>On 10 February 2012 13:24, Raymond Wagner <span dir="ltr">&lt;<a href="mailto:raymond@wagnerrp.com" target="_blank">raymond@wagnerrp.com</a>&gt;</span>
      wrote:<br>
      <div class="gmail_quote">
        <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
          <div>On 2/10/2012 08:20, David Crawford wrote:<br>
            &gt; Are those python scripts you mention already included
            in 0.24?<br>
          </div>
          What scripts?<br>
        </blockquote>
      </div>
      </div><div>mythproto.py and dataheap.py</div>
    </blockquote>
    <br>
    Those aren&#39;t scripts.  Those are part of the bindings.<br>
  </div>

<br></div></div><div>_______________________________________________<br>
mythtv-users mailing list<br>
<a href="mailto:mythtv-users@mythtv.org" target="_blank">mythtv-users@mythtv.org</a><br>
<a href="http://www.mythtv.org/mailman/listinfo/mythtv-users" target="_blank">http://www.mythtv.org/mailman/listinfo/mythtv-users</a><br>
<br></div></blockquote></div>Got ya, understood. I&#39;ll test that out, thanks!
</blockquote></div><br></div></div><div>Just tested vai cmd  and eventhough it seems to be pulling the relevant info somehow (it says BBC ONE BBC ONE.srt) in the cmd after execution, the filename is still the same and has 1001N instead of BBC ONE. This is the exact script that I am using, I guess do I have something in the wrong place?:</div>

<div><br></div><div><div>#!/usr/bin/python</div><div><br></div><div>import sys</div><div>import os</div><div><br></div><div>if len(sys.argv) != 3:</div><div>    raise Exception(&#39;Invalid argument count&#39;)    </div>
<div>
chanid, starttime = sys.argv[1:3]</div><div class="im"><div><br></div><div>from MythTV import Channel</div><div>path = &#39;%cn %cc %cN.srt&#39;</div><div>chan = Channel(chanid)</div><div>for (tag, data) in ((&#39;cn&#39;, &#39;channum&#39;),(&#39;cc&#39;,&#39;callsign&#39;),(&#39;cN&#39;,&#39;name&#39;)):</div>

<div>    tmp = unicode(chan[data]).replace(&#39;/&#39;,&#39;-&#39;)</div><div>    path = path.replace(&#39;%&#39;+tag, tmp)</div><div>print path</div><div><br></div></div><div>from MythTV import MythBE, findfile</div><div>
be = MythBE()</div>
<div>prog = be.getRecording(chanid, starttime)</div><div>oldbase = prog.filename.rsplit(&#39;.&#39;,1)[0]</div><div>newbase = prog.formatPath(&#39;%m-%d_%H-%i-%s_%cN_%T&#39;).rsplit(&#39;.&#39;,1)[0]</div><div>sg = findfile(prog.filename, prog.storagegroup)</div>

<div>if sg is None:</div><div>    raise Exception(&#39;file not found&#39;)</div><div><br></div><div><br></div><div>from MythTV import System</div><div>ccextractor = System(path=&quot;/home/dave/uksub2srt/uksub2srt.py&quot;)</div>

<div>ccextractor(&#39;-i&#39;, os.path.join(sg.dirname, prog.filename),</div><div>             &#39;-o&#39;, &#39;/home/dave/Downloads/subtitles/{0}.srt&#39;.format(newbase))</div></div><div><br></div>
</blockquote></div>All the script is doing right now is printing in the cmd the correct channel name and then exporting the srt file the same as before, how do i import the new %cN value into this line: ?<div><br></div><div>
newbase = prog.formatPath(&#39;%m-%d_%H-%i-%s_%cN_%T&#39;).rsplit(&#39;.&#39;,1)[0]</div>