Skip to content

Having images or text files in an intermediate directory for batch processing can lead to unexpected results #259

@StefanLobbenmeier

Description

@StefanLobbenmeier

Just spent some time debugging why the readme did not work for me, wanted to share what was wrong with my setup so it does not happen to others.

My folder structure was about like this:
input/Fantasy/J.K. Rowling/Harry Potter/5/Harry Potter and the Order of the Phoenix/Chapter 33 - Fight and Flight.mp3

The issue was, I also had some general thumbnails in input/Fantasy/J.K. Rowling/Harry Potter

The code here looks for text and image files and stops looking for deeper folders once it found them:

$currentBatchDirs = $dirLoader->load($input->getArgument(static::ARGUMENT_INPUT), $this->parseIncludeExtensions(array_merge(
static::DEFAULT_SUPPORTED_IMAGE_EXTENSIONS,
static::DEFAULT_SUPPORTED_DATA_EXTENSIONS
)), $this->alreadyProcessedBatchDirs);

That meant that the matching like this --batch-pattern="input/%g/%a/%s/%p/%n/ no longer worked, because it is unable to match %p/%n/

Does not necessarily need a fix, but maybe we can add this to the README that when creating the folder structure the directory tree should but completely free of files to avoid this from happening. As a workaround I renamed my .png and .txt files to .png.hide and .txt.hide and that also works 😄

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions