.xattr metadata not being stored if target is rclone drive

All your suggestions, requests and ideas for future development
Post Reply
kise
Posts: 19
Joined: 17 Sep 2019, 21:28

.xattr metadata not being stored if target is rclone drive

Post by kise » 17 Sep 2019, 21:35

Hi,

First thanks for the great app, well worth the price.

I use Filebot on both linux and windows, on Linux server there is no problem creating xattr folders in rclone mount, however on windows I receive the following error

Code: Select all

Sep 18, 2019 12:22:55 AM net.filebot.media.XattrMetaInfo setMetaInfo
WARNING: Failed to set xattr: FileSystemException: X:\fix_me\showname\.xattr: The volume does not contain a recognized file system.
Please make sure that all required file system drivers are loaded and that the volume is not corrup
Interestingly, it does create the .xattr folder and each episode folder, however it's fails to actually put the files "net.filebot.filename" and "net.filebot.metdata".

Is there any chance to fix this if possible? as sometimes Filebot does not pick the correct series name, and i have to fixed it manually in windows and losing the orginal filename and metadata is kinda harmful if i mismatch.

Thank you.

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

Re: .xattr metadata not being stored if target is rclone drive

Post by rednoah » 18 Sep 2019, 06:49

How does rclone handle hidden .files and .folders? Presumably, you're running into some conceptual compatibility between Windows and Linux and the glue logic / clone logic translating between the two, which might need some extra rclone configuration to make work.

You could try not using .folders and instead use a normal file / folder name with no special meaning:

Code: Select all

filebot -script fn:properties --def net.filebot.xattr.store=xattr
:arrow: viewtopic.php?f=3&t=324
:idea: Please read the FAQ and How to Request Help.

kise
Posts: 19
Joined: 17 Sep 2019, 21:28

Re: .xattr metadata not being stored if target is rclone drive

Post by kise » 18 Sep 2019, 13:36

rednoah wrote:
18 Sep 2019, 06:49
How does rclone handle hidden .files and .folders? Presumably, you're running into some conceptual compatibility between Windows and Linux and the glue logic / clone logic translating between the two, which might need some extra rclone configuration to make work.

You could try not using .folders and instead use a normal file / folder name with no special meaning:

Code: Select all

filebot -script fn:properties --def net.filebot.xattr.store=xattr
:arrow: viewtopic.php?f=3&t=324
Thanks for your reply, i just tested as you suggested by changing the directory name from .xattr to xattr, the same error still reported and xattr/episode_name gets created but no .filename or .metadata files are created.

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

Re: .xattr metadata not being stored if target is rclone drive

Post by rednoah » 18 Sep 2019, 14:07

Strange. No idea. Maybe the rclone developers have some insight.
:idea: Please read the FAQ and How to Request Help.

kise
Posts: 19
Joined: 17 Sep 2019, 21:28

Re: .xattr metadata not being stored if target is rclone drive

Post by kise » 18 Sep 2019, 16:47

rednoah wrote:
18 Sep 2019, 14:07
Strange. No idea. Maybe the rclone developers have some insight.
i opened ticket with rclone devs and it seems he suggests that Filebot is not attempting to create the said files.
I can see filebot looking for the metadata file in that log, but not where it attempted to create it.

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

Re: .xattr metadata not being stored if target is rclone drive

Post by rednoah » 19 Sep 2019, 04:43

If FileBot manages to create the ./.xattr/<filename> directory, but not the ./.xattr/<filename>/net.filebot.metadata file, then that suggestions this error stems from trying to create that file, i.e. the JVM / OS checking pre-conditions for file creation and failing:

Code: Select all

FileSystemException: X:\fix_me\showname\.xattr: The volume does not contain a recognized file system.
Please make sure that all required file system drivers are loaded and that the volume is not corrup

:?: Does rclone have any way to store debug logs that show what file system operations are performed?
:idea: Please read the FAQ and How to Request Help.

kise
Posts: 19
Joined: 17 Sep 2019, 21:28

Re: .xattr metadata not being stored if target is rclone drive

Post by kise » 19 Sep 2019, 07:43

Yup they do i have attached one at the bug report i sent to rclone devs

https://github.com/rclone/rclone/issues/3548

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

Re: .xattr metadata not being stored if target is rclone drive

Post by rednoah » 19 Sep 2019, 07:56

Well, here's the code as far as FileBot is concerned, and since it works on all non-rclone filesystems, the next step would be to figure out how rclone might behave differently from normal file systems in this particular case:

Code: Select all

if (!Files.isDirectory(node)) {
	Files.createDirectories(node);

	// set Hidden on Windows
	if (Files.getFileStore(root).supportsFileAttributeView(DosFileAttributeView.class)) {
		Files.getFileAttributeView(root, DosFileAttributeView.class).setHidden(true);
	}
}

Files.write(node.resolve(key), value.getBytes(UTF_8));
:idea: root ... /path/to/.xattr
:idea: node ... /path/to/.xattr/<filename>
:idea: key ... net.filebot.metadata



My educated guess is that this somehow does something, instead of not doing anything on non-Windows platforms as one would expect:

Code: Select all

// set Hidden on Windows
if (Files.getFileStore(root).supportsFileAttributeView(DosFileAttributeView.class)) {
	Files.getFileAttributeView(root, DosFileAttributeView.class).setHidden(true);
}

:!: Might be a JDK problem where if it can't determine the file system, it'll throw an exception instead of just returning false.



EDIT:

FileBot r6750 might work better by simply ignoring all errors that might be thrown while trying to set the hidden file attribute.
:idea: Please read the FAQ and How to Request Help.

kise
Posts: 19
Joined: 17 Sep 2019, 21:28

Re: .xattr metadata not being stored if target is rclone drive

Post by kise » 19 Sep 2019, 11:22

where could i find this version?

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

Re: .xattr metadata not being stored if target is rclone drive

Post by rednoah » 19 Sep 2019, 14:25

kise wrote:
19 Sep 2019, 11:22
where could i find this version?
viewtopic.php?f=7&t=1609
:idea: Please read the FAQ and How to Request Help.

kise
Posts: 19
Joined: 17 Sep 2019, 21:28

Re: .xattr metadata not being stored if target is rclone drive

Post by kise » 21 Sep 2019, 09:04

rednoah wrote:
19 Sep 2019, 14:25
kise wrote:
19 Sep 2019, 11:22
where could i find this version?
viewtopic.php?f=7&t=1609
Thanks it works.

Post Reply