Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[collect] Directory checksum should not use computed cover filename with UUID #5

Closed
sveetch opened this issue May 2, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@sveetch
Copy link
Owner

sveetch commented May 2, 2023

The directory checksum is computed from a full resume of directory and its mediafiles infos, any detail change will trigger a new checksum.

A sample of payload content used to compute checksum:

{
    "absolute_dir": ".",
    "children_files": [
        {
            "absolute_dir": "my_device",
            "container": "Matroska",
            "directory": "",
            "extension": "mkv",
            "mtime": "2023-03-03T15:28:31+00:00",
            "name": "SampleVideo_1280x720_1mb.mkv",
            "path": "my_device/SampleVideo_1280x720_1mb.mkv",
            "relative_dir": ".",
            "size": 1052413
        }
    ],
    "cover": [
        "/home/foo/my_device/cover.png",
        "my_device_5d6a37176464385b2acb/e22299c3-5abd-41cd-988a-71160f9a052a.png"
    ],
    "cover_checksum": "2f959715ba2b43cef4c48e6dfd71d002007f2cf10e1f20029501a7ba41b4edc9d92da877682ebd8e657635902b56827311b20cf21682762e7871fd4afcab951f",
    "mtime": "2023-03-03T15:28:31+00:00",
    "name": "my_device",
    "path": "my_device",
    "relative_dir": ".",
    "size": 4096,
    "title": "Media sample root"
} 

But currently the resume include the computed cover filename that include an UUID4. Since UUID is almost assured to be unique, any collect will have a new checksum because of UUID filename that won't be the same even if the cover file does not change.

So, the computed filename must not be included in the payload used to build directory checksum.

@sveetch sveetch added the bug Something isn't working label May 2, 2023
@sveetch
Copy link
Owner Author

sveetch commented May 9, 2023

Fixed in 0.5.2

@sveetch sveetch closed this as completed May 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant