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"><<a href="mailto:mtdean@thirdcontact.com">mtdean@thirdcontact.com</a>></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>
> I have <a href="http://mythlink.pl" target="_blank">mythlink.pl</a> as a part of a userjob. It is suggested that you<br>
> can use <a href="http://mythlink.pl" target="_blank">mythlink.pl</a> with "Recording deleted" and "Recording expired"<br>
> system events to just remove the deleted links. Can someone tell me<br>
> the format of the event entry.<br>
> Would it be just<br>
> /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 "Recording deleted" or "Recording expired" system<br>
event, just do a "full" 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 "Recording deleted" or "Recording expired" system<br>
event, run your own script that figures out which recording got deleted<br>
and deletes its symlink<br>
<br>
Option b) isn't that difficult, as the name of the file should be<br>
<chanid>_<starttime>.<ext> (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 "uncertainty" and the fact that a<br>
"full run" 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't try to handle "single link deletes" 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 "locking"<br>
mechanism for it (to ensure only one "full-run" copy of <a href="http://mythlink.pl" target="_blank">mythlink.pl</a> is<br>
executed at a time and to allow "rolling up" 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>