diff --git a/Custom-Post-Processing-Scripts.md b/Custom-Post-Processing-Scripts.md index 03168db..0f728d2 100644 --- a/Custom-Post-Processing-Scripts.md +++ b/Custom-Post-Processing-Scripts.md @@ -180,8 +180,17 @@ while [[ $PERMFILESIZE != $ORIGFILESIZE ]]; do done if [[ $PERMFILESIZE == $ORIGFILESIZE ]]; then + # Save current time stamps to prevent radarr from identifying our simlink as new, and double-processing it + LINKDIR=$(dirname "$LINKPATH") + FOLDER_DATE=$(date -r "$LINKDIR" +@%s.%N) + FILE_DATE=$(date -r "$LINKPATH" +@%s.%N) + rm "$LINKPATH" ln -s "$PERMPATH" "$LINKPATH" + + touch --no-create --no-dereference --date "$FILE_DATE" "$LINKPATH" + touch --no-create --no-dereference --date "$FILE_DATE" "$PERMPATH" + touch --no-create --no-dereference --date "$FOLDER_DATE" "$LINKDIR" fi ```