Thanks<div>The only reason I had for wanting to delete the individual links was thinking that recreating the links might disturb an in progress video playing. I will add mythlink to a system event and see what happens. </div>
<div><br></div><div>Thanks again.<br><br><div class="gmail_quote">On Mon, Feb 6, 2012 at 6:28 PM, Michael T. Dean <span dir="ltr">&lt;<a href="mailto:mtdean@thirdcontact.com">mtdean@thirdcontact.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">On 02/06/2012 06:49 PM, Zarthan South wrote:<br>
&gt; I have <a href="http://mythlink.pl" target="_blank">mythlink.pl</a> as a part of a userjob. It is suggested that you<br>
&gt; can use <a href="http://mythlink.pl" target="_blank">mythlink.pl</a> with &quot;Recording deleted&quot; and &quot;Recording expired&quot;<br>
&gt; system events to just remove the deleted links. Can someone tell me<br>
&gt; the format of the event entry.<br>
&gt; Would it be just<br>
&gt;     /path/to/mythlink --link /tv/shows --chanid --starttime ??<br>
<br>
</div></div><a href="http://mythlink.pl" target="_blank">mythlink.pl</a>, itself, cannot be used to remove individual symlinks.<br>
<br>
What the wiki page ( <a href="http://www.mythtv.org/wiki/Mythlink.pl" target="_blank">http://www.mythtv.org/wiki/Mythlink.pl</a> ) is trying<br>
to suggest is:<br>
   a) when receiving a &quot;Recording deleted&quot; or &quot;Recording expired&quot; system<br>
event, just do a &quot;full&quot; run of <a href="http://mythlink.pl" target="_blank">mythlink.pl</a>, which will delete all links<br>
in the link/destination directory, then create new links for all recordings<br>
   b) when receiving a &quot;Recording deleted&quot; or &quot;Recording expired&quot; system<br>
event, run your own script that figures out which recording got deleted<br>
and deletes its symlink<br>
<br>
Option b) isn&#39;t that difficult, as the name of the file should be<br>
&lt;chanid&gt;_&lt;starttime&gt;.&lt;ext&gt; (with the appropriate start time format), so<br>
you could do a long list of the directory/directories content and grep<br>
for the recording file name, then remove that link (possibly checking<br>
that the file it references is, in fact, no longer on the file system).<br>
Alternatively, you could just check every link in the<br>
<br>
By the time the recording is deleted, though, we no longer have<br>
recording database metadata available to get a definitive file name from<br>
the database via the bindings.  This &quot;uncertainty&quot; and the fact that a<br>
&quot;full run&quot; of <a href="http://mythlink.pl" target="_blank">mythlink.pl</a> nicely cleans up the links to the deleted<br>
recording(s) (and any other garbage/orphaned links) is the main reason<br>
that <a href="http://mythlink.pl" target="_blank">mythlink.pl</a> doesn&#39;t try to handle &quot;single link deletes&quot; itself.<br>
<br>
My recommendation is to just create a script to run <a href="http://mythlink.pl" target="_blank">mythlink.pl</a> without<br>
--chanid/--starttime/--filename arguments and run it when you get a<br>
Recording deleted/expired event.  You could even do a simple &quot;locking&quot;<br>
mechanism for it (to ensure only one &quot;full-run&quot; copy of <a href="http://mythlink.pl" target="_blank">mythlink.pl</a> is<br>
executed at a time and to allow &quot;rolling up&quot; multiple close-in-time<br>
requests into a single run).<br>
<br>
Mike<br>
_______________________________________________<br>
mythtv-users mailing list<br>
<a href="mailto:mythtv-users@mythtv.org">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>
</blockquote></div><br></div>