gavan

Members
  • Content count

    1
  • Joined

  • Last visited

Community Reputation

0 Neutral

About gavan

  • Rank
    Newbie
  1. I am building/refining a script to keep my HD from getting overfull. We will take it as read and say a truly good person would be doing regular pruning and keeping things from getting out of hand. I am not that person so the drive gets pretty full and drastic measures have been needed. This script is part of a better plan. The bash script moves some recordings to another drive for archive storage and removes others. As part of this I would like to know if a recording has been watched. I have found a flag in the .eyetvt folder associagted with each recording which marks whether the recording "IsUnplayed" and this does toggle to false once the recording has been played. My problem is it does not toggle back when the recording is marked "Not Watched" via the Eye TV interface. Clearly Eye TV knows the status of this setting bit I can't access it myself. I would like to use this "Not Watched" status to prune those recordings which have been watched already. Here is a fragment… #!/usr/bin/env -S -P/usr/local/bin:/usr/bin:/bin bash # FWIW: GNU bash, version 4.4.5(1)-release (x86_64-apple-darwin16.3.0) # ...etc... ##### Configuration ##### 2018-06-21 # Geniatech EyeTv 3.6.9 # macOS High Sierra 10.13.5 # Rule 3 -- Over two weeks old and has been watched # REGEX=".*${SFX}\$" # Pattern to find all the relevant files, ${SFX}='\.eyetv' for ii in `find -E . -type d -regex ${REGEX} -Btime +2w -print`; do # TODO check dates pList=`find -E ${ii} -type f -regex ".*\.eyetvr\$" -print` # identify the .plist file isUnplayed=`/usr/libexec/PlistBuddy -c "print :isUnplayed" ${pList}` # check the flag if [ $isUnplayed == 'false' ] ; then echo "DEBUG: isUnplayed::${isUnplayed}] -- Delete this recording?:: `ls -dl ${ii}`" fi done Does anybody know where this "Not Watched" is kept so I can access it? FWIW in looking for an alternate approach I have not been able to find an Applescript property which gives this status but may have missed it. If there is such a property I would be happy to use it rather then poking into .plist files. Thanks in advance.