Page 1 of 1
Force relative symlinks in a docker context where absolute symlinks don't work due to different file system views
Posted: 27 Jan 2024, 15:05
by giulian
Hi i use since 2-3 years this script
Shell: Select all
docker exec filebot /opt/filebot/filebot -script fn:amc --action symlink -non-strict "/storage/torrents/" --conflict auto -non-strict --log-file amc.log --def movieFormat="/storage/Media/Movies/{fn}-{y}" --def seriesFormat="/storage/Media/TV Shows/{n}/Season {s}/{s00e00} - {t}" --def animeFormat="/storage/Media/Anime/{n}/Season {s}/{s00e00} - {t}" --def unsorted=n minFileSize=0 minLengthMS=0 music=n artwork=n --def clean=y --def excludeList=/config/amc-exclude-list.txt --def deleteAfterExtract=y "ut_dir=%F" "ut_kind=multi" "ut_title=%N" "ut_label=%L" --output /storage/Media
Suddently, since many week all movie are good but seriesFormat symlimk are bad, i need to adjust manually each simlink
for movie i have this good symlink generat by filebot:
../../torrents/[ Torrent911.cx ] Aquaman.And.The.Lost.Kingdom.2023.VFQ.HDrip.x264.mp4
For serie this bad one :
/storage/torrents/Percy.Jackson.and.the.Olympians.S01E05.MULTI.1080p.WEBRip.x265-Elcrackito.mkv
i need to modify manually by this :
../../../../torrents/Percy.Jackson.and.the.Olympians.S01E05.MULTI.1080p.WEBRip.x265-Elcrackito.mkv
Can someone help or explains me if something change in a new version and why i have suddenly bad lin for Series ?
Re: Tv show script result change since many week
Posted: 27 Jan 2024, 15:25
by rednoah
Do you want to explicitly generate relative symlinks for some reason?
Newer versions of FileBot will generate the shortest path. This may be the absolute path if the absolute path is shorter than then relative path. That's because generating relative paths that include the entire absolute path
../../../../<absolute path> is generally undesirable.
However, you want this for some reason, likely due to
docker. I'd recommend mapping the host folder 1:1 into the container so that the file system looks the same for the purpose of creating symlinks and resolving symlinks from both host point-of-view as well as container point-of-view:
Code: Select all
-v /absolute/path/to/host/storage:/absolute/path/to/host/storage
** this will make absolute symlinks work across container and host; but the container will now probably create relative symlinks anyway since your /absolute/path/to/host/storage path is likely gonna be longer than the ../../../.. go-up-a-few-times relative path
Re: Force relative symlinks in a docker context where absolute symlinks don't work due to different file system views
Posted: 27 Jan 2024, 15:47
by giulian
Ok thanks for quick anwser, i just want it s running well
so what i need to change exactly , my script or my docker volume ?
Re: Force relative symlinks in a docker context where absolute symlinks don't work due to different file system views
Posted: 27 Jan 2024, 15:50
by rednoah
Re: docker volume mappings
Your
docker command, assuming that you're using
docker to launch docker containers. If you're using
compose the then corresponding configuration file. In any case, somewhere you have a line that maps host path
<some path> to
/storage inside the container.
How do you configure your docker container?
When you use
/storage inside the container, what real path is that on the host?
Re: Force relative symlinks in a docker context where absolute symlinks don't work due to different file system views
Posted: 27 Jan 2024, 15:59
by rednoah
Re: qBT usage
Note that your command also doesn't make sense. Do you occasionally read the log? What does the log say?
You pass in an input folder as if you call the command manually on the command-line:
Yet you also pass in qBT variables as input as if you are having qBT generate and call commands on newly completed files:
Code: Select all
"ut_dir=%F" "ut_kind=multi" "ut_title=%N" "ut_label=%L"
Do you use qBT? If you use
%F in your command then that command is expected to be interpreted by qBT first as
"execute on download complete" hook, where qBT replaces
%F with the path to the completed download.
Re: Force relative symlinks in a docker context where absolute symlinks don't work due to different file system views
Posted: 27 Jan 2024, 18:37
by giulian
I use Rutorrent
In filebot container storage folder are in the root so real path is /storage
my docker compose for filebot
Code: Select all
version: '3'
services:
filebot:
container_name: filebot
image: jlesage/filebot
restart: unless-stopped
volumes:
- /home/SeedboxData:/storage:rw
- /home/SeedboxConf/filebot:/config:rw
- /home/SeedboxData/torrents:/watch:rw
- /home/SeedboxData/Media:/output:rw
environment:
- PUID=1000
- PGID=1000
- AMC_ACTION= test
- AMC_CONFLICT= auto
- AMC_MATCH_MODE= opportunistic
- AMC_MUSIC_FORMAT= {plex}
- AMC_MOVIE_FORMAT= {plex}
- AMC_SERIES_FORMAT= {plex}
- AMC_ANIME_FORMAT= {plex}
- AMC_INPUT_DIR= /watch
- AMC_OUTPUT_DIR= /output
- AMC_INTERVAL= 600
networks:
default:
external:
name: webproxy
Log looks good
Code: Select all
Run script [fn:amc] at [Thu Jan 25 19:28:01 UTC 2024]
[PSA] Important Discussion of Changes effective as of 28 Apr 2023:
https://www.filebot.net/forums/viewtopic.php?t=13406
Parameter: movieFormat = /storage/Media/Movies/{fn}-{y}
Parameter: seriesFormat = /storage/Media/TV Shows/{n}/Season {s}/{s00e00} - {t}
Parameter: animeFormat = /storage/Media/Anime/{n}/Season {s}/{s00e00} - {t}
Parameter: unsorted = n
Parameter: minFileSize = 0
Parameter: minLengthMS = 0
Parameter: music = n
Parameter: artwork = n
Parameter: clean = y
Parameter: excludeList = /config/amc-exclude-list.txt
Parameter: deleteAfterExtract = y
Parameter: ut_dir = %F
Parameter: ut_kind = multi
Parameter: ut_title = %N
Parameter: ut_label = %L
Argument[0]: /storage/torrents
Bad ut_dir value: %F
Bad ut_title value: %N
Bad ut_label value: %L
Use excludes: /config/amc-exclude-list.txt (2156)
Ignore extra: /storage/torrents/Game.of.Thrones.S08E01.FRENCH.720p.HDTV.x264-SH0W/Sample
Ignore hidden: /storage/torrents/Game.of.Thrones.S08E03.FRENCH.WEL-DL.480p-H264.AAC-ROLLED/.nfo
Ignore hidden: /storage/torrents/Vikings.SAISON.5.FRENCH.WEB-DL.480p-H264.AAC-ROLLED/.NFO
Input: /storage/torrents/[ Torrent911.cx ] Aquaman.And.The.Lost.Kingdom.2023.VFQ.HDrip.x264.mp4
Input: /storage/torrents/[ Torrent911.cx ] Percy.Jackson.and.the.Olympians.S01E06.FRENCH.WEBRip.x264.mp4
Input: /storage/torrents/[ Torrent911.cx ] The.Marvels.2023.Truefrench.HDRip.x264.mp4
Input: /storage/torrents/[ Torrent911.cx ] Wonka.2023.TRUEFRENCH.WEBRip.x264-ONLYMOViE.mkv
Group files by movie or series
Group: {Movie=Aquaman and the Lost Kingdom (2023), Series=null} => [[ Torrent911.cx ] Aquaman.And.The.Lost.Kingdom.2023.VFQ.HDrip.x264.mp4]
Group: {Series=Percy Jackson and the Olympians (2023)} => [[ Torrent911.cx ] Percy.Jackson.and.the.Olympians.S01E06.FRENCH.WEBRip.x264.mp4]
Group: {Movie=The Marvels (2023), Series=null} => [[ Torrent911.cx ] The.Marvels.2023.Truefrench.HDRip.x264.mp4]
Group: {Movie=Wonka (2023), Series=null} => [[ Torrent911.cx ] Wonka.2023.TRUEFRENCH.WEBRip.x264-ONLYMOViE.mkv]
Rename movies using [TheMovieDB]
Auto-detect movie from context [/storage/torrents/[ Torrent911.cx ] Aquaman.And.The.Lost.Kingdom.2023.VFQ.HDrip.x264.mp4]
Activate License [PX36171958] on [Thu Jan 25 19:28:18 UTC 2024]
[SYMLINK] from [/storage/torrents/[ Torrent911.cx ] Aquaman.And.The.Lost.Kingdom.2023.VFQ.HDrip.x264.mp4] to [/storage/Media/Movies/[ Torrent911.cx ] Aquaman.And.The.Lost.Kingdom.2023.VFQ.HDrip.x264-2023.mp4]
Processed 1 file
Rename episodes using [TheMovieDB] with [Airdate Order]
Lookup via [Percy Jackson and the Olympians] [Percy Jackson and the Olympians]
Fetching episode data for [Percy Jackson and the Olympians]
* Percy Jackson and the Olympians [103540] | 8 episodes | 1x01-08
[SYMLINK] from [/storage/torrents/[ Torrent911.cx ] Percy.Jackson.and.the.Olympians.S01E06.FRENCH.WEBRip.x264.mp4] to [/storage/Media/TV Shows/Percy Jackson and the Olympians/Season 1/S01E06 - We Take a Zebra to Vegas.mp4]
Processed 1 file
Rename movies using [TheMovieDB]
Auto-detect movie from context [/storage/torrents/[ Torrent911.cx ] The.Marvels.2023.Truefrench.HDRip.x264.mp4]
[SYMLINK] from [/storage/torrents/[ Torrent911.cx ] The.Marvels.2023.Truefrench.HDRip.x264.mp4] to [/storage/Media/Movies/[ Torrent911.cx ] The.Marvels.2023.Truefrench.HDRip.x264-2023.mp4]
Processed 1 file
Rename movies using [TheMovieDB]
Auto-detect movie from context [/storage/torrents/[ Torrent911.cx ] Wonka.2023.TRUEFRENCH.WEBRip.x264-ONLYMOViE.mkv]
[SYMLINK] from [/storage/torrents/[ Torrent911.cx ] Wonka.2023.TRUEFRENCH.WEBRip.x264-ONLYMOViE.mkv] to [/storage/Media/Movies/[ Torrent911.cx ] Wonka.2023.TRUEFRENCH.WEBRip.x264-ONLYMOViE-2023.mkv]
Processed 1 file
Done ヾ(@⌒ー⌒@)ノ
Re: Force relative symlinks in a docker context where absolute symlinks don't work due to different file system views
Posted: 29 Jan 2024, 09:32
by rednoah
You are using the
jlesage/filebot container,
not one of ours, and that container forces you to use
/storage as input path?
Do you rely on the various behaviours that
jlesage/filebot provides by default? Or do you just use the container to run docker
exec filebot /opt/filebot/filebot -script fn:amc ... commands from the host? Have you considered just doing
docker run ... rednoah/filebot -script fn:sysinfo ... commands instead?
e.g. use the
rednoah/filebot container to run
filebot commands:
Shell: Select all
docker run --rm -it -v "/home/SeedboxData:/home/SeedboxData" -v data:/data rednoah/filebot -script fn:amc --action symlink -non-strict "/home/SeedboxData/torrents" --output "/home/SeedboxData/Media" --conflict auto -non-strict --log-file amc.log --def movieFormat="{plex}" seriesFormat="{plex}" animeFormat="{plex}" unsorted=n minFileSize=0 minLengthMS=0 music=n artwork=n clean=y excludeList="amc-exclude-list.txt" deleteAfterExtract=y
EDIT: FileBot r10179 improves absolute / relative symlink auto-detection logic.
Re: Force relative symlinks in a docker context where absolute symlinks don't work due to different file system views
Posted: 31 Jan 2024, 19:30
by giulian
Ok i change docker image and use you re now, it s seems to be better i just need to adjust some settings