Closed SenorSmartyPants closed 1 year ago
$ /tmp/"Diane..." The Twin Peaks Tapes of Agent Cooper
> tone dump --format=json '"Diane..." The Twin Peaks Tapes of Agent Cooper.m4b' --query="$.meta.genre"
Fantasy
Works for me... it could either be an escaping issue or maybe if you are on Windows, it may be that there is some other issue.
Running in an ARM64 docker container of audiobookshelf. Did it work for you with version 0.1.2? I haven't been able to test with a newer version yet.
I tried your same command line using single quote escapes and it doesn't work. I also noticed in the error message it doesn't print the full filename, truncates after Diane...
. Also note there are no quotes around that Diane.
Aah haha, now I know what is happening. I did some research and found out what's the problem...
There was a problem in spectre.console
, the command line library, which led to issues with parsing command line arguments with quotes (see https://github.com/spectreconsole/spectre.console/issues/891). It was fixed by Sir Awesome himself @FrankRay78, but first shipped with 0.1.3
, so version 0.1.2
still has this bug and it affects you.
As a workaround you could prevent "
being the first char of your filename argument like this:
tone dump './"Diane..." The Twin Peaks Tapes of Agent Cooper.m4b'
which also works with 0.1.2
, while I would strongly recommend to upgrade tone
to the latest release wherever possible (I know it's not your own docker image). These command line parsing bugs where really nasty and while I was not taken serious for a long time by the maintainers, this can lead to data loss when tagging files.
I'll close this, since it is fixed in the latest release and I hope this explanation did help you.
Thank you for your patience.
Filename:
/audiobooks/Scott Frost/"Diane..." The Twin Peaks Tapes of Agent Cooper/"Diane..." The Twin Peaks Tapes of Agent Cooper.m4b
If I try this in the directory
tone dump \"Diane...\"\ The\ Twin\ Peaks\ Tapes\ of\ Agent\ Cooper.m4b
I get the errorError: Could not find file '/audiobooks/Scott Frost/"Diane..." The Twin Peaks Tapes of Agent Cooper/Diane...'.
If I rename the file to test.m4b tone dump generates output.
Version 0.1.2 bundled with AudiobookShelf