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

New added support for IPLS only works partially #312

Open
PeterCodar opened this issue Oct 4, 2022 · 1 comment
Open

New added support for IPLS only works partially #312

PeterCodar opened this issue Oct 4, 2022 · 1 comment

Comments

@PeterCodar
Copy link

#208 has added (partially) IPLS Support.

The IPLS frame will no longer be detected as UnknownFrame but as TextInformationFrame.
Unfortunately, this does not fully work and don't return all available text.

To reprocude:
Add a new IPLS tag to an example song, for example in a tagging program like Mp3tag use INVOLVEDPEOPLE
Add a value like this:
author:Jimmy Fallon;
save it and try to read it with the help of taglib-sharp.

You only get back author as IPLS.

The expected result would be
author:Jimmy Fallon;

According to the standard:

The body simply contains a terminated string with the involvement directly followed by a terminated string with the involvee followed by a new involvement and so on.

@pi7fi5
Copy link

pi7fi5 commented Dec 4, 2022

IPLS is an Id3v2.3.0 frame and the standard requires that:

The body simply contains a terminated string with the involvement directly followed by a terminated string with the involvee followed by a new involvement and so on.

Id3v2.3.0 does not allow multi-string "Text information frames".

"If the textstring is followed by a termination ($00 (00)) all the following information should be ignored and not be displayed."

Instead, Id3v2.4.0 expects all "Text information frames" to be multi-string.

"All text information frames supports multiple strings, stored as a null separated list, where null is reperesented by the termination code for the charater encoding."

This logic, defined by the ID3 standard is implemented in the ParseRawData method available in TextIdentificationFrame.cs.
So there is no possibility to properly use an IPLS frame as a TextInformationFrame.

options

  1. Implement the correct "Involved people list" frame
  2. Leave the IPLS frame as Unknown Frame so that it can be handled correctly by application logic. e.g.
UnknownFrame unknownFrame = (UnknownFrame)_tag?.GetFrames()?.Where(f => f.FrameId == FrameType.IPLS).FirstOrDefault();
if (unknownFrame != null)
{
	StringType stringType = (StringType)(int)unknownFrame.Data[0];
	string[] items = unknownFrame.Data.ToString(stringType, 1, unknownFrame.Data.Count - 1).Split(char.MinValue, StringSplitOptions.RemoveEmptyEntries);
}
  1. As a temporary patch, in the ParseRawData method available in TextIdentificationFrame.cs file, change
if (raw_version > 3 || FrameId == FrameType.TXXX) {
	field_list.AddRange (data.ToStrings (encoding, 1));
{

with

if (raw_version > 3 || FrameId == FrameType.TXXX || FrameId == FrameType.IPLS) {
	field_list.AddRange (data.ToStrings (encoding, 1));
{ 

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

No branches or pull requests

2 participants