jprokos wrote: ↑08 Mar 2023, 00:38
At some point in the past it was suggested to make sure there were no collisions with filenames. I use the CRC32 in the filename in combination with --conflict index in my script. Files always have an original name and always get moved over.
So you do
not actually need CRC32 xattr metadata? You merely need CRC32 in the file name to generate unique file paths.
--conflict index has
no effect in this case, because adding
{crc32} to the target file path guarantees a unique file path per unique file, so you won't ever have a file path conflict.
--conflict index is useful resolving file path conflicts by adding
.1 .2 .3 etc as needed to find a unique file path for each unique file.
jprokos wrote: ↑08 Mar 2023, 00:38
How should the filename be formatted for FileBot to recognize the CRC32? As it stand now, since I use Plex, I have it in square braces at the end of my format - just the number.
[12345678] at the end of the file name will work best.
e.g.
Code: Select all
$ filebot -mediainfo *.mkv --format "{fn} | {bytes} | {crc32}"
Test File [12345678] | 0 bytes | 12345678
** a 0 byte file always has CRC32 checksum 00000000 so this example shows that FileBot is simply copying the CRC32 from the file name
jprokos wrote: ↑08 Mar 2023, 00:38
I use a script that runs upon download. If that fails to recognize a file properly, usually due to badly named files (wrong year) - or series issues (production vs airdate for season/episode), then I move to the GUI but in both cases I use the same format.
So you do
not actually need CRC32 xattr metadata on the target file path?
I do
not see a use case where
.xattr/<name>/CRC32 has an effect on reprocessing:
(1) if you reprocess the incorrectly named target path, then CRC32 is already in the file name
(2) if you manually rename the incorrectly named target path before reprocessing then
.xattr/<name>/CRC32 has no effect because the file name no longer matches, and you can just keep the CRC32 in the file name
(3) if you delete the incorrectly named target path, and then reprocess the original file path then
.xattr/<name>/CRC32 already exists
jprokos wrote: ↑08 Mar 2023, 00:38
Another issue with keeping sidecar .xattr files is that when files are named incorrectly and then renamed their old sidecar data is not removed from the .xattr folder. This can be a manual housekeeping problem and I have seen conflicts with renaming files when there are too many iterations in that .xattr folder.
The
xattr script can be used to prune orphaned .xattr folders:
viewtopic.php?p=5394#p5394

That said, having a few extraneous small files and folders lying around has no effect. If you didn't check the .xattr folders you wouldn't know or worry about them. But if you are OCD about these things, then
xattr script can help you find and delete them, but it's not strictly necessary.