[mythtv-users] Mythtv, Plex, and watched status

John Pilkington J.Pilk at tesco.net
Fri Apr 6 12:22:04 UTC 2018


On 06/04/18 12:47, Richard Shaw wrote:

> Other than not having complete metadata for every show I'm having zero 
> issues just running mythlink every 24 hours. I could increase the 
> frequency but we usually don't watch shows the same day the record anyway.
> 
> I considered running it after every  show using the --chanid and 
> --starttime options, but they don't clean up shows that have been 
> deleted and it doesn't take that long to run and clean up everything.

I've been using this, pretty well since it was first posted.

=================
$cd /usr/share/doc/mythtv-docs-master/contrib/user_jobs/
[john at HP_Box user_jobs]$ diff -u mythlink.pl mythlink_KN2.pl
--- mythlink.pl 2018-03-26 04:07:39.000000000 +0100
+++ mythlink_KN2.pl     2017-04-27 14:49:56.770757949 +0100
@@ -2,6 +2,10 @@
  #
  # Creates symlinks to mythtv recordings using more-human-readable 
filenames.
  # See --help for instructions.
+## With patch by Karl Newman to skip deleted recordings
+## 
http://www.mythtv.org/pipermail/mythtv-users/attachments/20131125/ab4f1992/attachment.obj
+## or
+## http://www.gossamer-threads.com/lists/mythtv/users/558623#558623
  #
  # Automatically detects database settings from mysql.txt, and loads
  # the mythtv recording directory from the database (code from nuvexport).
@@ -350,6 +354,8 @@
      }
      foreach my $row (@{$rows{'rows'}}) {
          my $show = new MythTV::Recording(@$row);
+    # Skip deleted recordings
+        next unless ($show->{'recgroup'} ne 'Deleted');
      # Skip LiveTV recordings?
          next unless (defined($live) || $show->{'recgroup'} ne 'LiveTV');
      # File doesn't exist locally
=============


More information about the mythtv-users mailing list