Page 1 of 1

Symlinks get relative paths, I prefer absolute

Posted: 23 Jul 2020, 18:35
by abandonow
I think I need to use symlinks, since my mediafiles are located on a network NAS. So I've set up a directory in my VM to test out Filebot with symlinks.

I noticed that the symlinks that Filebot creates are relative to the path, not absolute. I would like to absolute symlinks – that way I can move the symlinks around without breaking them. Is it possible to achieve this?

This is whats happening:

Code: Select all

'Movietitle [1080p - WEB-DL - EAC3 5.1 - AVC].mkv' -> ../../../../../mnt/path/to/nas/movies/movietitle.mkv
This is how I would think it should be:

Code: Select all

'Movietitle [1080p - WEB-DL - EAC3 5.1 - AVC].mkv' -> /mnt/path/to/nas/movies/movietitle.mkv
Command:

Code: Select all

filebot -script fn:amc --output "/path/to/movies/" --action symlink -non-strict "/mnt/path/to/nas/movies/" --log-file /path/to/logfile.log  --def excludeList=/path/to/excludelist.txt --def movieFormat='{plex.name}/{plex.name}{" $tags"}{" [$vf $hdr - $source - $ac $channels - $vc]"}' --def seriesFormat='{plex[1]}/{plex[2]}/{plex[3]}{" [$vf - $source - $ac $channels - $vc]"}'
fn:sysinfo

Code: Select all

FileBot 4.9.1 (r7372)
JNA Native: 5.2.0
MediaInfo: 20.03
p7zip: p7zip Version 16.02 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,64 bits,2 CPUs Intel(R) Xeon(R) CPU E5-2430 0 @ 2.20GHz (206D7),ASM,AES-NI)
unrar: UNRAR 5.50 freeware
Chromaprint: 1.4.3
Extended Attributes: OK
Unicode Filesystem: OK
Script Bundle: 2020-06-18 (r655)
Groovy: 3.0.3
JRE: OpenJDK Runtime Environment 11.0.7
JVM: 64-bit OpenJDK 64-Bit Server VM
CPU/MEM: 2 Core / 4.2 GB Max Memory / 46 MB Used Memory
OS: Linux (amd64)
HW: Linux <hostname> 4.15.0-108-generic #109-Ubuntu SMP Fri Jun 19 11:33:10 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
STORAGE: <removed>
DATA: /home/<user>/.filebot
Package: DEB
License: FileBot License (Valid-Until: 2070-07-21)
Done ヾ(@⌒ー⌒@)ノ

Re: Symlinks get relative paths, I prefer absolute

Posted: 24 Jul 2020, 05:24
by rednoah
FileBot will always create relative symlinks, but you can use 3rd party tools to convert them, and hook them up into your filebot process via the -exec option.


EDIT:

FileBot r7751 adds a system property for this:

Code: Select all

filebot -script fn:properties --def net.filebot.symlink=absolute

Re: Symlinks get relative paths, I prefer absolute

Posted: 24 Jul 2020, 07:52
by abandonow
Yeah, looked into doing it afterwards, but a flag is so much better! Thanks for that! :)