Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When LRC formatting fails, it results in other fields being incorrect. #268

Closed
j4587698 opened this issue May 30, 2024 · 0 comments · Fixed by #269
Closed

When LRC formatting fails, it results in other fields being incorrect. #268

j4587698 opened this issue May 30, 2024 · 0 comments · Fixed by #269

Comments

@j4587698
Copy link
Contributor

The problem

When the LRC lyrics format is incorrect, using UnsynchronizedLyrics to accept the value does not cause an error. Currently, I have some lyrics with an incorrect format, which is [00:00:00-1], and this leads to an error:

The input string '00-1' was not in a correct format.
   at System.Number.ThrowFormatException[TChar](ReadOnlySpan`1 value)
   at System.Int32.Parse(String s)
   at Commons.Utils.DecodeTimecodeToMs(String timeCode)
   at ATL.LyricsInfo.LyricsPhrase..ctor(String timestamp, String text)
   at ATL.LyricsInfo.ParseLRC(String data)
   at ATL.TagData.IntegrateValue(Field key, String value)
   at ATL.AudioData.IO.MetaDataIO.setMetaField(Field ID, String dataIn)
   at ATL.AudioData.IO.ID3v2.readFrame(BufferedBinaryReader source, TagInfo tag, ReadTagParams readTagParams, IList`1& comments, Boolean inChapter)
   at ATL.AudioData.IO.ID3v2.readFrames(BufferedBinaryReader source, TagInfo tag, Int64 offset, ReadTagParams readTagParams)
   at ATL.AudioData.IO.ID3v2.Read(Stream source, Int64 offset, ReadTagParams readTagParams)
   at ATL.AudioData.IO.ID3v2.read(Stream source, ReadTagParams readTagParams)
   at ATL.AudioData.IO.MetaDataIO.Read(Stream source, ReadTagParams readTagParams)
   at ATL.AudioData.AudioDataManager.read(Stream source, ReadTagParams readTagParams)
   at ATL.AudioData.AudioDataManager.read(Stream source, Boolean readEmbeddedPictures, Boolean readAllMetaFrames, Boolean prepareForWriting)
   at ATL.AudioData.AudioDataManager.ReadFromFile(Boolean readEmbeddedPictures, Boolean readAllMetaFrames)

However, the program does not crash; it only causes fields like Duration to be incorrect.

Environment

  • ATL version (or git revision) that exhibits the issue: latest
  • Last ATL version that did not exhibit the issue (if applicable): None
  • OS/version used to run ATL : All

Details

Code To Reproduce Issue [ Good To Have ]

rack theTrack = new Track("test.mp3");

demo mp3 is:
test.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant