emptyTrash.sh 368 B

12345678910111213141516
  1. #!/bin/bash
  2. # Bail if the media share isn't mounted
  3. if ! ~/bin/video/isMediaMounted; then
  4. exit 0
  5. fi
  6. # Bail if we are already scanning
  7. if ~/bin/video/pms/isScanning.sh; then
  8. exit 0
  9. fi
  10. # Empty the trash for each section
  11. for i in `~/bin/video/pms/sections.sh`; do
  12. curl --silent --upload-file /dev/null "http://localhost:32400/library/sections/${i}/emptyTrash"
  13. done