Skip to content

Running the addbooks command on books already imported results in duplicated cover files #87

@adborden

Description

@adborden

I have about 140 books already imported and each time I run the addbooks command, my static_media grows by 0.9GB. It looks like the cover files get copied even though the book isn't going to be imported.

$ ls static_media/covers
foxgeeseancientn00weiriala_1.gif
foxgeeseancientn00weiriala_2.gif
foxgeeseancientn00weiriala_3.gif
foxgeeseancientn00weiriala_4.gif
foxgeeseancientn00weiriala_5.gif
foxgeeseancientn00weiriala.gif

You can see multiple copies of the same cover file. Each time I run addbooks, a new one is created.

I think this would be fixed if instead of the current "save and check error" strategy, we move to a "check if exists then save" strategy we would avoid the save logic that duplicates the cover file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions