filebot-watcher docker - Problem renaming Series - source file also moved to the destination folder
Posted: 28 Apr 2024, 23:22
Hello
I have recently moved from filebot on DSM7.2 to filebot-watcher using docker-compose.
I'm using one container to watch movies, this is working without any problem.
Similarly, I'm using another container for Series, and here i'm facing following problem: when the file is being downloaded with torrent client, it is placed on the watch directory (atomic move), and detected with INOTIFY. amc script is executed, the file is being renamed and moved (hardlink) to the Series Library as per the rules defined on the snippet, but i am also getting another hardlink copy of the source/dowloaded file in target destination, which is not expected:
using this docker-compose:
and these filebot logs
any idea why i'm getting the source file being moved as well on the target folder?
I have recently moved from filebot on DSM7.2 to filebot-watcher using docker-compose.
I'm using one container to watch movies, this is working without any problem.
Similarly, I'm using another container for Series, and here i'm facing following problem: when the file is being downloaded with torrent client, it is placed on the watch directory (atomic move), and detected with INOTIFY. amc script is executed, the file is being renamed and moved (hardlink) to the Series Library as per the rules defined on the snippet, but i am also getting another hardlink copy of the source/dowloaded file in target destination, which is not expected:
Code: Select all
drwxr-xr-x 1 xxxx users 18 Apr 29 01:01 'WandaVision (2021)'/
-rw-r--r-- 2 xxxx users 1180934286 Apr 29 01:00 WandaVision.S01E01.2021.MULTI.1080p.WEBRip.x264.AC3-SUNNY.mkv
[xxx@xxxx: /volume1/videos/SeriesLibrary/Series]$ pwd
/volume1/videos/SeriesLibrary/Series
Code: Select all
filebot-tvseries:
container_name: watcher-tvseries
image: rednoah/filebot:watcher
networks:
- synobridge
restart: unless-stopped
environment:
- PUID=1035
- PGID=100
- UMASK=022
- INOTIFYWAIT_OPTS=--recursive
- SETTLE_DOWN_TIME=15
volumes:
- /volume1:/volume1
- /volume1/docker/filebot/:/config
- /volume1/docker/filebot/watcher-tvseries:/data
command: /volume1/videos/MoviesLibrary/_Downloads/_Watch/TV-Series --action duplicate --lang en --def clean=y --conflict skip -non-strict --log all --log-file /config/filebot.log --def excludeList=/config/.excludes --def artwork=n --def seriesDB=TheMovieDB::TV --output /volume1/videos/SeriesLibrary/ --def seriesFormat=@/config/filebot/filebotS --def "exec=chmod 755 -Rf '{folder}/'" --def "exec=sh /config/tmm-scripts/TV-series"
labels:
- "com.centurylinklabs.watchtower.enable=true"
Code: Select all
Setting up watches. Beware: since -r was given, this may take a while!
Watches established.
[INOTIFY] /volume1/videos/MoviesLibrary/_Downloads/_Watch/TV-Series/WandaVision.S01E01.2021.MULTI.1080p.WEBRip.x264.AC3-SUNNY.mkv
[2024/04/28 23:00:51 UTC] Waiting 15 seconds for changes to settle down...
Run script [fn:amc] at [Sun Apr 28 23:01:12 GMT 2024]
[PSA] Important Discussion of Changes effective as of 28 Apr 2023:
https://www.filebot.net/forums/viewtopic.php?t=13406
Parameter: excludeList = /config/.excludes
Parameter: unsorted = y
Parameter: music = y
Parameter: artwork = n
Parameter: clean = y
Parameter: seriesDB = TheMovieDB::TV
Parameter: seriesFormat = /volume1/videos/SeriesLibrary/Series/{n.upperInitial()} ({y})/{episode.special ? 'Specials' : 'Saison '+s.pad(2)}/{n.upperInitial().space('.')}.{episode.special ? 'S00E'+special.pad(2) : s00e00}.{t.upperInitial().space('.')}.
{
allOf
{if (hd == "UHD") { hd = "UHD" } else if (hd== "FHD") { hd = "FHD" }}
{ vs }
{ vf }
{if (vc == "AVC") { vc = "H264" } else if (vc == "HEVC") { vc = "H265" } else { vc +"." }}
{ any{ hdr.space('') }{ 'SDR' } }
.join(".").space('.')
}
.{bitdepth}bits.
{
def preferredLang = 'Eng'
def useChFilter = false
def filter = { [it.codec, it.ch] }
def codecList =
[
'MP3' : 'MP3',
'PCM' : 'PCM',
'AAC LC' : 'AAC',
'AAC LC SBR' : 'AAC',
'AAC LC SBR PS' : 'AAC',
'AC 3' : 'AC3',
'AC 3 Dep' : 'EAC3',
'E AC 3' : 'EAC3',
'E AC 3 JOC' : 'EAC3 Atmos',
'AC 3 Dep JOC' : 'EAC3 Atmos',
'DTS' : 'DTS',
'DTS 96 24' : 'DTS 96-24',
'DTS ES' : 'DTS-ES',
'DTS ES XXCH' : 'DTS-ES',
'DTS XBR' : 'DTS-HD HRA',
'DTS ES XBR' : 'DTS-HD HRA',
'DTS ES XXCH XBR' : 'DTS-HD HRA',
'DTS XLL' : 'DTS-HD MA',
'DTS ES XLL' : 'DTS-HD MA',
'DTS ES XXCH XLL' : 'DTS-HD MA',
'DTS XLL X' : 'DTS-X',
'MLP FBA' : 'TrueHD',
'MLP FBA 16 ch' : 'TrueHD Atmos'
]
def audioStreams = []
def audioClean = { it.replaceAll(/[\p{Pd}\p{Space}]/, ' ').replaceAll(/\p{Space}{2,}/, ' ').slash(' ') }
def channelClean = { it.replaceAll(/Debug.+|Object\sBased\s?\/?|(\d+)?\sobjects\s\/\s|0.(?=\d.\d)|20/).replaceAll(/6.0/,'5.1').replaceAll(/8.0/,'7.1') }
def oneStream = { it.collect{ filter(it) }*.minus(null).unique().flatten().join(' ') }
def dString = { it.toDouble().toString() }
def toInt = { it.toInteger() }
any{audio.collect{ au ->
def codec = audioClean(any{ au['CodecID/Hint'] }{ au['Format'] })
def format_profile = any{ audioClean(au['Format_AdditionalFeatures'])}{}
def String ch = any{ channelClean(au.ChannelPositionsString2).tokenize('\\/')*.toDouble().toString().sum() }
{ channelClean(dString(au.ChannelsOriginal)) } { channelClean(dString(au.Channels)) }
def chFilter = ( ( ( (ac == 'AAC'||ac == 'MP3') && ch != '2.0') || ( (ac == 'AC3'||ac == 'EAC3'||ac == 'DTS'||ac == 'TrueHD'||ac == 'MLPFBA') && ch != '5.1' ) ) ? ch : null )
def combined = allOf{codec}{format_profile}.join(' ')
audioStreams << ['index' : codecList.findIndexOf { it.key == combined }, 'default' : any {au['default'][0].toBoolean() }{ audio.size == 1 ? true : '' },
'codec' : codecList.get(combined, 'Add to "' + combined + '" codecList'), 'combined' : combined, 'ch' : useChFilter ? chFilter : ch,
'bitrate' : any{ toInt(au.BitRate) }{ toInt(au.BitRate_Maximum) }{ dString(au.FrameRate) }{null},
'objects' : any{ '[' + au['NumberOfDynamicObjects'] + ' Objs]' }{null}, 'lang' : any{ au.'LanguageString3'.upperInitial() }{null} ]
return audioStreams
}
def addToList = audioStreams.codec.findAll{ it.contains('Add to') }.unique().sort()
def allStreams = audioStreams.collect{ filter(it) }*.minus(null).unique()*.join(' ')
def preferredStream = oneStream(audioStreams.findAll{ it.index == audioStreams.index.max() })
def bestBitRate = oneStream(audioStreams.findAll{ it.bitrate == audioStreams.bitrate.max() })
def defaultStream = oneStream(audioStreams.findAll{ it.default == true })
def bestPreferredLang = any{ audioStreams.findAll{ it.lang == preferredLang }.sort{ a, b -> b.bitrate <=> a.bitrate }.collect{ filter(it) }*.minus(null).unique().get(0).join(' ') }{}
bestBitRate.space('.')
}{'NO_AUDIO'}
}
Parameter: exec = sh /config/tmm-scripts/TV-series
Argument[0]: /volume1/videos/MoviesLibrary/_Downloads/_Watch/TV-Series
Use excludes: /config/.excludes (6)
Ignore system path: /volume1/videos/MoviesLibrary/_Downloads/_Watch/TV-Series/Terminal.S01E03.FRENCH.SDR.2160p.WEB.H265-FW/@eaDir
Input: /volume1/videos/MoviesLibrary/_Downloads/_Watch/TV-Series/WandaVision.S01E01.2021.MULTI.1080p.WEBRip.x264.AC3-SUNNY.mkv
Group files by movie or series
Group: {Series=WandaVision (2021)} => [WandaVision.S01E01.2021.MULTI.1080p.WEBRip.x264.AC3-SUNNY.mkv]
Rename episodes using [TheMovieDB] with [Airdate Order]
Lookup via [WandaVision] [WandaVision]
Fetching episode data for [WandaVision]
* WandaVision [85271] | 9 episodes | 1x01-09
[DUPLICATE] from [/volume1/videos/MoviesLibrary/_Downloads/_Watch/TV-Series/WandaVision.S01E01.2021.MULTI.1080p.WEBRip.x264.AC3-SUNNY.mkv] to [/volume1/videos/SeriesLibrary/Series/WandaVision (2021)/Saison 01/WandaVision.S01E01.Filmed.Before.A.Live.Studio.Audience.FHD.WEB-DL.1080p.H264.SDR.8bits.AC3.2.0.mkv]
Processed 1 file
Execute: sh /config/tmm-scripts/TV-series
Done ヾ(@⌒ー⌒@)ノ