Set changedate to current date

Support for Ubuntu and other Desktop Linux distributions
Post Reply
thepappaq
Posts: 7
Joined: 06 Dec 2018, 15:21

Set changedate to current date

Post 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!
User avatar
rednoah
The Source
Posts: 22971
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Set changedate to current date

Post by rednoah »

e.g.

Code: Select all

-exec touch {f}
:idea: Please read the FAQ and How to Request Help.
thepappaq
Posts: 7
Joined: 06 Dec 2018, 15:21

Re: Set changedate to current date

Post by thepappaq »

Where inside my config I have to add that?

Thanks.
User avatar
rednoah
The Source
Posts: 22971
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Set changedate to current date

Post by rednoah »

-exec is a command-line option for the filebot command:
https://www.filebot.net/cli.html
:idea: Please read the FAQ and How to Request Help.
thepappaq
Posts: 7
Joined: 06 Dec 2018, 15:21

Re: Set changedate to current date

Post 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!
User avatar
rednoah
The Source
Posts: 22971
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Set changedate to current date

Post by rednoah »

What version of FileBot are you using?
:idea: Please read the FAQ and How to Request Help.
thepappaq
Posts: 7
Joined: 06 Dec 2018, 15:21

Re: Set changedate to current date

Post by thepappaq »

Version 3.5.3
User avatar
rednoah
The Source
Posts: 22971
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Set changedate to current date

Post 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.
:idea: Please read the FAQ and How to Request Help.
thepappaq
Posts: 7
Joined: 06 Dec 2018, 15:21

Re: Set changedate to current date

Post 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.
User avatar
rednoah
The Source
Posts: 22971
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Set changedate to current date

Post 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
:idea: Please read the FAQ and How to Request Help.
Post Reply