Relative symlinks not working

Support for unRAID and docker container users
Post Reply
Romint
Posts: 5
Joined: 15 Jan 2025, 17:54

Relative symlinks not working

Post by Romint »

When using Filebot desktop I end up with relative symlinks which tend to be really useful for my usecase since replicating the folder structure inside and outside Docker is something I would rather not do.
I searched on the forums and found a lot of people asking for the opposite and all of those posts end with a link towards viewtopic.php?t=12105 I used the command as instructed to set the desired symlinks to be relative, here are my sysinfo with that being the case:

Console Output: Select all

ubuntu@da493fa56af3:/$ filebot -script fn:sysinfo
FileBot 5.1.6 (r10435)
JNA Native: 7.0.0
MediaInfo: 24.06
Tools: fpcalc/1.5.1 7z/24.08 unrar/7.01 mkvpropedit/86.0 AtomicParsley/8
Extended Attributes: OK
Unicode Filesystem: OK
Script Bundle: 2024-10-16 (r986)
Groovy: 4.0.21
JRE: OpenJDK Runtime Environment 21.0.5
JVM: OpenJDK 64-Bit Server VM
System Property: net.filebot.symlink=relative
CPU/MEM: 8 Core / 2.6 GB Max Memory / 36 MB Used Memory
OS: Linux (aarch64)
HW: Linux da493fa56af3 6.8.0-47-generic #47-Ubuntu SMP PREEMPT_DYNAMIC Fri Sep 27 22:03:50 UTC 2024 aarch64 aarch64 aarch64 GNU/Linux
CPU/MEM: MemTotal: 10 GB / MemFree: 378 MB / MemAvailable: 3.5 GB
STORAGE: overlay [/] @ 29 GB | virtiofs [/data] @ 149 GB | virtiofs [/downloads] @ 653 GB | virtiofs [/media] @ 653 GB
UID/GID: uid=1000(ubuntu) gid=1000(ubuntu) groups=1000(ubuntu)
DATA: /data/filebot
Package: DOCKER
License: FileBot License PX67385743 (Valid-Until: 2074-12-02)
Done ヾ(@⌒ー⌒@)ノ
And here's a log showcasing the problem where the symlinks end up being absolute anyway

Console Output: Select all

ubuntu@da493fa56af3:/$ filebot -script fn:amc /downloads/finished/Roald\ Dahls\ Matilda\ The\ Musical\ \(2022\)\ \[2160p\]\ \[4K\]\ \[WEB\]\ \[5.1\]\ \[YTS.MX\]/ --output /media --action symlink --conflict skip -non-strict --def movieDB=TheMovieDB seriesDB=TheTVDB animeDB=TheTVDB --def movieFormat="Movies/{ ~plex.id % \" - \$vf\" }" seriesFormat="TV Shows/{ ~plex.id % \" - \$vf\" }" animeFormat="TV Shows/{ ~plex.id % \" - \$vf\" }"
Run script [fn:amc] at [Thu Jan 16 13:53:25 EST 2025]
Parameter: movieDB = TheMovieDB
Parameter: seriesDB = TheTVDB
Parameter: animeDB = TheTVDB
Parameter: movieFormat = Movies/{ ~plex.id % " - $vf" }
Parameter: seriesFormat = TV Shows/{ ~plex.id % " - $vf" }
Parameter: animeFormat = TV Shows/{ ~plex.id % " - $vf" }
Argument[0]: /downloads/finished/Roald Dahls Matilda The Musical (2022) [2160p] [4K] [WEB] [5.1] [YTS.MX]
Input: /downloads/finished/Roald Dahls Matilda The Musical (2022) [2160p] [4K] [WEB] [5.1] [YTS.MX]/Roald.Dahls.Matilda.The.Musical.2022.2160p.4K.WEB.x265.10bit.AAC5.1-[YTS.MX].mkv
       └─ Metadata: Roald Dahl's Matilda the Musical (2022)
Group files by movie or series
Group: {Movie=Roald Dahl's Matilda the Musical (2022)} => [Roald.Dahls.Matilda.The.Musical.2022.2160p.4K.WEB.x265.10bit.AAC5.1-[YTS.MX].mkv]
Rename movies using [TheMovieDB]
Auto-detect movie from context [/downloads/finished/Roald Dahls Matilda The Musical (2022) [2160p] [4K] [WEB] [5.1] [YTS.MX]/Roald.Dahls.Matilda.The.Musical.2022.2160p.4K.WEB.x265.10bit.AAC5.1-[YTS.MX].mkv]
[XATTR] Roald Dahl's Matilda the Musical (2022) (/downloads/finished/Roald Dahls Matilda The Musical (2022) [2160p] [4K] [WEB] [5.1] [YTS.MX]/Roald.Dahls.Matilda.The.Musical.2022.2160p.4K.WEB.x265.10bit.AAC5.1-[YTS.MX].mkv)
[SYMLINK] from [/downloads/finished/Roald Dahls Matilda The Musical (2022) [2160p] [4K] [WEB] [5.1] [YTS.MX]/Roald.Dahls.Matilda.The.Musical.2022.2160p.4K.WEB.x265.10bit.AAC5.1-[YTS.MX].mkv] to [/media/Movies/Roald Dahl's Matilda the Musical (2022) {tmdb-668482}/Roald Dahl's Matilda the Musical (2022) - 2160p.mkv]
Processed 1 file
Done ヾ(@⌒ー⌒@)ノ
ubuntu@da493fa56af3:/$ ls -la /media/Movies/Roald\ Dahl\'s\ Matilda\ the\ Musical\ \(2022\)\ \{tmdb-668482\}/Roald\ Dahl\'s\ Matilda\ the\ Musical\ \(2022\)\ -\ 2160p.mkv
lrwxr-xr-x 1 ubuntu ubuntu 173 Jan 16 13:53 '/media/Movies/Roald Dahl'\''s Matilda the Musical (2022) {tmdb-668482}/Roald Dahl'\''s Matilda the Musical (2022) - 2160p.mkv' -> '/downloads/finished/Roald Dahls Matilda The Musical (2022) [2160p] [4K] [WEB] [5.1] [YTS.MX]/Roald.Dahls.Matilda.The.Musical.2022.2160p.4K.WEB.x265.10bit.AAC5.1-[YTS.MX].mkv'
Is there some other option I can configure to switch the symlinks to be relative?
User avatar
rednoah
The Source
Posts: 23924
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Relative symlinks not working

Post by rednoah »

:?: What is your docker volume mount configuration?


:arrow: Instead of having 2 separate mounts for /media and /downloads you'll want to have 1 single mount point /volume1 which then contains /volume1/media and /volume1/downloads. That'll ensure that input / output is on the same file system from the container point-of-view. That's usually a good idea to make move operations instant, but in this case it'll likely also result in FileBot creating relative hard links.


:arrow: Alternatively, DIY is possible as well.




EDIT:

net.filebot.symlink=relative was introduced on 2 Dec 2024 so you'll have to use the latest beta revision for that to work. net.filebot.symlink=absolute is available in previous releases where anything other than absolute means relative. The latest revision allows you to force absolute or force relative, or default behaviour which may be relative or absolute depending on the file paths / file system context at hand.
:idea: Please read the FAQ and How to Request Help.
Romint
Posts: 5
Joined: 15 Jan 2025, 17:54

Re: Relative symlinks not working

Post by Romint »

rednoah wrote: 16 Jan 2025, 19:35 net.filebot.symlink=relative was introduced on 2 Dec 2024 so you'll have to use the latest beta revision for that to work. net.filebot.symlink=absolute is available in previous releases where anything other than absolute means relative. The latest revision allows you to force absolute or force relative, or default behaviour which may be relative or absolute depending on the file paths / file system context at hand.
Thank you for the prompt response!! That totally worked, just swapped over to the beta docker container and yep, it totally symlinked it (even though like you pointed out they are on two different mounts). I also keep in mind the separate mounts in case of any future trouble

Thank you <3 Filebot rocks!
Post Reply