GithubHelp home page GithubHelp logo

Comments (5)

audiamus avatar audiamus commented on July 16, 2024 1

Original title: Fire & Blood, Outputs: Fire

This is by design but harmless enough.

AAX Audio Converter analyses the given text string for the book title to identify

  • the title proper,
  • any mulit-part info,
  • a possible series title
  • and "noise" that should be discarded.

Unless defined as valid, any punctuation mark in the string will terminate the book title. (There is a short predefined list of characters, like comma and dot, that will always be accepted.)

Often this works, but it sometimes may go wrong as it does in your example. To overcome this, you have two options:

  • Either explicitly set the book title in the Preview/customization window. Will apply only to the current book (all parts) and the current session.
  • Or add the punctuation mark in question, the ampersand in your case, in the Basic Settings, field "Additional valid punctuation". Will apply to all books and all sessions until changed again.

from aaxaudioconverter.

audiamus avatar audiamus commented on July 16, 2024 1

That's tricky. I added the hyphen as a valid title character in version 1.8. Theoretically, the hyphen is treated as a literal character in Regular Expressions (regex). Unless it is used in a regex token. And unfortunately, that can be the case here. So when you add the ampersand, the hyphen changes its meaning now indicating a range.

But when you "escape" the ampersand, the hyphen can fulfil its range role. The actual regex pattern becomes ^([\w+\s+\.,'/-\\&]+)\W*, as the backslash is higher in order than the forward slash. The hyphen, however, gets lost. The correct regex pattern should look like this: ^([\w+\s+\.,'/\-]+)\W* and then you can add the ampersand without problems: ^([\w+\s+\.,'/\-&]+)\W*.

from aaxaudioconverter.

Squaredude avatar Squaredude commented on July 16, 2024

I didn't realize there were such additional options. (Yeah, I should have tried reading the help file. :P)

However, following your second suggestion, I ran into a problem:

((((EDIT:

Sorry, I forgot to clarify where I got this error.

  • I put "&" in "Additional valid punctuation".
  • Restarted the program.
  • Added the book with the "&" in it,
  • and went to "Preview/customization".

The error happened when trying to open that window. edit2: It also happens if I try to convert the audiobook. :edit2

The error does not happen (neither in conversion nor preview/customization) if I escape the "&" in "Additional valid punctuation" (if I put "\&" instead of just "&").

:EDIT))))

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.ArgumentException: parsing "^([\w+\s+.,'/-&]+)\W*" - [x-y] range in reverse order.
at System.Text.RegularExpressions.RegexParser.ScanCharClass(Boolean caseInsensitive, Boolean scanOnly)
at System.Text.RegularExpressions.RegexParser.ScanRegex()
at System.Text.RegularExpressions.RegexParser.Parse(String re, RegexOptions op)
at System.Text.RegularExpressions.Regex..ctor(String pattern, RegexOptions options, TimeSpan matchTimeout, Boolean useCache)
at System.Text.RegularExpressions.Regex..ctor(String pattern, RegexOptions options)
at audiamus.aaxconv.lib.Book.initRegexTitle(ITitleSettingsEx settings)
at audiamus.aaxconv.lib.Book.InitAuthorTitle(ITitleSettingsEx settings)
at audiamus.aaxconv.lib.AaxAudioConverter.TitlePreview(AaxFileItem fileItem)
at audiamus.aaxconv.PreviewForm.setTitle(Boolean update)
at audiamus.aaxconv.PreviewForm.updatePreview(Boolean update)
at audiamus.aaxconv.PreviewForm.Set(AaxFileItem fileItem)
at audiamus.aaxconv.MainForm.openNonModalForm[F](AaxFileItem fi, F& form, FormClosedEventHandler handler)
at audiamus.aaxconv.MainForm.openPreviewForm(AaxFileItem fi)
at audiamus.aaxconv.MainForm.tsmiPreview_Click(Object sender, EventArgs e)
at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ToolStrip.WndProc(Message& m)
at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Following the first suggestion worked fine, though.

from aaxaudioconverter.

Squaredude avatar Squaredude commented on July 16, 2024

That's awesome. Regex is awesome, but such an annoyance to debug. :P

from aaxaudioconverter.

audiamus avatar audiamus commented on July 16, 2024

Fixed in version 1.9.

from aaxaudioconverter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.