emptyTrash.sh 431 B

1234567891011121314151617181920
  1. #!/bin/bash
  2. # Build URL and cURL opts
  3. source ~/bin/video/pms/curl.sh
  4. # Bail if the media share isn't mounted
  5. if ! ~/bin/video/isMediaMounted; then
  6. exit 0
  7. fi
  8. # Bail if we are already scanning
  9. if ~/bin/video/pms/isScanning.sh; then
  10. exit 0
  11. fi
  12. # Empty the trash for each section
  13. IFS=$'\n'
  14. for i in `~/bin/video/pms/sections.sh`; do
  15. curl ${CURL_OPTS[@]} --upload-file /dev/null "${PMS_URL}/library/sections/${i}/emptyTrash"
  16. done