From bf3fd215753f8f41bb1dc27c5ea4835e2f360497 Mon Sep 17 00:00:00 2001
From: Britney Fransen <brfransen@gmail.com>
Date: Mon, 13 Feb 2017 14:49:24 +0000
Subject: LinHES-system: myth_mtc.py: add some dirs to clear

---
 abs/core/LinHES-system/PKGBUILD    |  4 ++--
 abs/core/LinHES-system/myth_mtc.py | 12 +++++++++---
 2 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/abs/core/LinHES-system/PKGBUILD b/abs/core/LinHES-system/PKGBUILD
index 4b95a97..2ae0063 100755
--- a/abs/core/LinHES-system/PKGBUILD
+++ b/abs/core/LinHES-system/PKGBUILD
@@ -1,6 +1,6 @@
 pkgname=LinHES-system
 pkgver=8.4
-pkgrel=18
+pkgrel=19
 arch=('i686' 'x86_64')
 install=system.install
 pkgdesc="Everything that makes LinHES an automated system"
@@ -84,7 +84,7 @@ md5sums=('c6e6b83a1f4c35ef4501e277657ab2ac'
          'de32a1c50101265dd7f6ca5037f7a26a'
          '2d7b8414ddce5f401331342ac1529c22'
          '76b2637cac0452b3acdbeeb4e8a5474b'
-         '8e5d224788154fea8639a37eecdaefd9'
+         '2ee4c6b06d40f2f6058e480d231f60b2'
          'dc3eef2a624754e16805d72bbe488b67'
          '617af86b901538817ebdcaf646248dc5'
          '542e670e78d117657f93141e9689f54d'
diff --git a/abs/core/LinHES-system/myth_mtc.py b/abs/core/LinHES-system/myth_mtc.py
index e62592f..b157f01 100755
--- a/abs/core/LinHES-system/myth_mtc.py
+++ b/abs/core/LinHES-system/myth_mtc.py
@@ -35,15 +35,21 @@ def check_home():
     freePcent = getFreePercentForDir(data_config.MYTHHOME)
     print "  Home directory percent used: " + str(freePcent * 100) + "%"
     if float(freePcent) > .9:
-        print "    Home directory is greater than 90% used. Clearing MythTV caches..."
-        cmd = "/usr/bin/rm -rf " + data_config.MYTHHOME + "/.mythtv/{*cache,Cache-*}"
+        print "    Home directory is greater than 90% used. Clearing caches..."
+        cmd = "/usr/bin/rm -rf " + data_config.MYTHHOME + "/.mythtv/{*cache,Cache-*,tmp/*,MythMusic/AlbumArt/*}"
         subprocess.call(["sh", "-c", cmd])
         print "    Restarting mythfrontend..."
         subprocess.call(["killall", "mythfrontend"])
+        cmd = "/usr/bin/rm -rf " + data_config.MYTHHOME + "/.cache/*"
+        subprocess.call(["sh", "-c", cmd])
+        cmd = "/usr/bin/rm -rf " + data_config.MYTHHOME + "/.plexht/userdata/Thumbnails/*"
+        subprocess.call(["sh", "-c", cmd])
+        cmd = "/usr/bin/rm -rf " + data_config.MYTHHOME + "/.plexht/userdata/ThemeMusicCache/*"
+        subprocess.call(["sh", "-c", cmd])
         freePcent = getFreePercentForDir(data_config.MYTHHOME)
         print "  Home directory percent used: " + str(freePcent * 100) + "%"
     else:
-        print "    Home directory is less than 90% used. Not clearing MythTV caches."
+        print "    Home directory is less than 90% used. Not clearing caches."
     return 0
 
 def optimize():
-- 
cgit v0.12

