Page 1 of 1

Set changedate to current date

Posted: 15 Aug 2020, 09:51
by thepappaq
Hello there,

I've got several filebot instances running on version 3.5.3. I want to change my filebot.sh script to change the changedate of the postprocessed movies to the current date. Is that possible in that version? Here is my current config:

Code: Select all

#!/bin/bash

# This script by default uses "Automated Media Center" (AMC). See the final filebot call below. For more docs on AMC,
# visit: http://www.filebot.net/forums/viewtopic.php?t=215

#-----------------------------------------------------------------------------------------------------------------------

# Specify the URLs of any scripts that you need. They will be downloaded into /config/scripts
SCRIPTS_TO_DOWNLOAD=(
# Example:
# https://raw.githubusercontent.com/filebot/scripts/devel/cleaner.groovy
)

#-----------------------------------------------------------------------------------------------------------------------

QUOTE_FIXER='replaceAll(/[\`\u00b4\u2018\u2019\u02bb]/, "'"'"'").replaceAll(/[\u201c\u201d]/, '"'"'""'"'"')'

# Customize the renaming format here. For info on formatting: https://www.filebot.net/naming.html

# Music/Eric Clapton/From the Cradle/05 - It Hurts Me Too.mp3
MUSIC_FORMAT="Music/{n.$QUOTE_FIXER}/{album.$QUOTE_FIXER}/{media.TrackPosition.pad(2)} - {t.$QUOTE_FIXER}"

# Movies/Fight Club.mkv
MOVIE_FORMAT="{n} ({y})/{n} {' CD'+pi}"

# TV Shows/Game of Thrones/Season 05/Game of Thrones - S05E08 - Hardhome.mp4
# TV Shows/Game of Thrones/Special/Game of Thrones - S00E11 - A Day in the Life.mp4
SERIES_FORMAT="TV Shows/{n}/{episode.special ? 'Special' : 'Season '+s.pad(2)}/{n} - {episode.special ? 'S00E'+special.pad(2) : s00e00} - {t.${QUOTE_FIXER}.replaceAll(/[!?.]+$/).replacePart(', Part $1')}{'.'+lang}"

. /files/FileBot.conf

if [ "$SUBTITLE_LANG" == "" ];then
  SUBTITLE_OPTION=""
else
  SUBTITLE_OPTION="subtitles=$SUBTITLE_LANG"
fi

#-----------------------------------------------------------------------------------------------------------------------

# Used to detect old versions of this script
VERSION=5

# Download scripts and such.
. /files/pre-run.sh

# See http://www.filebot.net/forums/viewtopic.php?t=215 for details on amc
filebot -script fn:amc -no-xattr --lang de --def ignore="_UNPACK_" --conflict override --output "$OUTPUT_DIR" --log-file /files/amc.log --action move \
  -non-strict --def ut_dir="$INPUT_DIR" ut_kind=multi music=y deleteAfterExtract=y clean=y \
  excludeList=/config/amc-exclude-list.txt $SUBTITLE_OPTION \
  movieFormat="$MOVIE_FORMAT" musicFormat="$MUSIC_FORMAT" seriesFormat="$SERIES_FORMAT"

if [ "$ALLOW_REPROCESSING" = "yes" ]; then
  tempfile=$(mktemp)
  # FileBot only puts files that it can process into the amc-exclude-list.txt file. e.g. jpg files are not in there. So
  # take the intersection of the existing files and the ones in the list.
  comm -12 <(sort /config/amc-exclude-list.txt) <(find /input | sort) > $tempfile
  mv -f $tempfile /config/amc-exclude-list.txt
fi
I've tried something with: -exec=touch but that doesn't work.

Thanks in advance!

Re: Set changedate to current date

Posted: 15 Aug 2020, 11:00
by rednoah
e.g.

Code: Select all

-exec touch {f}

Re: Set changedate to current date

Posted: 15 Aug 2020, 12:17
by thepappaq
Where inside my config I have to add that?

Thanks.

Re: Set changedate to current date

Posted: 15 Aug 2020, 13:04
by rednoah
-exec is a command-line option for the filebot command:
https://www.filebot.net/cli.html

Re: Set changedate to current date

Posted: 15 Aug 2020, 17:59
by thepappaq
Hey,

adding

Code: Select all

-exec touch {f}
as an option for the filebot command I'm getting

Code: Select all

"-exec" is not a valid option
. I've checked more options inside the docker and can't get it to run. Any ideas?

Thanks!

Re: Set changedate to current date

Posted: 15 Aug 2020, 22:22
by rednoah
What version of FileBot are you using?

Re: Set changedate to current date

Posted: 16 Aug 2020, 07:33
by thepappaq
Version 3.5.3

Re: Set changedate to current date

Posted: 16 Aug 2020, 10:21
by rednoah
:?: FileBot 3.5.3 :?: I'm not familiar with that version identifier. There was a FileBot 3.5.x some 7 years ago but we're at FileBot 4.9.x now.

Re: Set changedate to current date

Posted: 16 Aug 2020, 19:41
by thepappaq
That's a bummer. I will leave it like that for now. Maybe I'm going to update the dockers sometime. Thanks anyway.

Re: Set changedate to current date

Posted: 17 Aug 2020, 02:39
by rednoah
I'm really curious what version of FileBot you're actually using though. Please read How to Request Help on how to print version information.

I'm curious because FileBot 3.5 (there's no 3.5.3 though) almost predates the existence of Docker. Oddly enough, FileBot 3.5 and Docker are birthday twins, released on 20 March 2013 on the same day!! :D :D :D