Skip to content

Characters in title can cause final phase of bind to silently fail #8

Description

@ehcloninger

m4b-util version 2025.4.16
Windows 11 under Powershell.
Python 3.13.5

Input files were .m4b in a folder.
Issuing the command
m4b-util bind '.\input' -o .\output\ --keep-temp-files

Would convert all the .m4b to .m4a and combine into a .m4a in the /tmp folder. The final step of converting to .m4b in the output folder would show success. The output file was 0 bytes in size and did not have the correct name.

The problem was the name of the file was generated from the metadata, namely the TITLE. The title contained a colon character (':') which is not a valid character for a file name in Windows. I suspect in the function suggested_file_name() needs some platform-specific scrub functions to remove such characters that are valid in the TITLE metadata, but not in the output file name.

Example:

input file name(s): input\01-book.m4b, input\02-book.m4b, input\03-book.m4b
Metadata title: This Great Author: His Great Book
The output stream shows
Writing 'output\This Great Author: His Great Book.m4b'

The actual file is: outputThis Great Author.m4b` but the file size is 0 bytes. There was no indication of error.

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