sandreas / m4b-tool

m4b-tool is a command line utility to merge, split and chapterize audiobook files such as mp3, ogg, flac, m4a or m4b
MIT License
1.17k stars 75 forks source link

Batch-pattern fails to match directories if there is a loose file in the root #155

Open BluebonnetSK opened 3 years ago

BluebonnetSK commented 3 years ago

Version = latest-137-g14781fb

If I use --batch-pattern="input/%n/" with the following: input/directory1 input/directory2 input/directory3 input/random_file_not_in_dir.mp3

It will fail to find anything to match, with a note that it found 0 matches. If I remove that "random_file_not_in_dir.mp3" file, or put it in a dir, then it works as expected.

Of course, I still need to convert that "random_file_not_in_dir.mp3" to an m4b, so it's a pain to have to remove it for the rest of the batch to work.

Thanks for looking!

sandreas commented 3 years ago

Thanks for reporting. I'll have a look at this. Directory matching is pretty complex, although I can't think of a case, where the structure, you describe, makes sense. I'll take a look.