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

Error on 'Other' APIC picture type #19

Closed
algoshipda opened this issue Aug 18, 2020 · 3 comments
Closed

Error on 'Other' APIC picture type #19

algoshipda opened this issue Aug 18, 2020 · 3 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@algoshipda
Copy link
Contributor

    test('Wrong APIC tags decoding on on Other picture type.', () async {
      final pic1 = AttachedPicture(
          'image/jpeg', 0x00, 'foo.jpg', picture.readAsBytesSync());

      final tag = Tag()
        ..tags = {'picture': pic1}
        ..type = 'ID3'
        ..version = '2.4';

      final writer = ID3V2Writer();

      final blocks = writer.write(await file2.readAsBytes(), tag);

      final r = ID3V2Reader();
      final f = await r.read(blocks);

      // ignore: avoid_as
      final AttachedPicture pic = (f.tags['picture'] as Map).values.first;
      expect(pic, equals(pic1));
    });

this test will gerenate an error

@algoshipda algoshipda added the bug Something isn't working label Aug 18, 2020
@algoshipda
Copy link
Contributor Author

algoshipda commented Aug 18, 2020

I made a PR to resolve this issue.
#20

NiKoTron added a commit that referenced this issue Aug 19, 2020
Close #19  Fix APIC Other picture type error
@NiKoTron
Copy link
Owner

Thanx! For your commitment! PR was merged.

@NiKoTron NiKoTron added this to the v0.3.1 milestone Aug 19, 2020
@muarachmann
Copy link

Hi @NiKoTron I am trying to get the same but however, I keep getting an error. Below is the output of my tags meta

{
 title: Hallelujah | www.gospelminds.com,
 artist: Pentatonix | gospelminds.com,
 album: Gospelminds.com,
 year: 2018,
 genre: gospelminds.com,
 comment: {
    eng:: {language:eng, description:, body: Downloaded From www.gospelminds.com},
    picture: {Other: {mime:image/jpeg, description:Downloaded From www.gospelminds.com, bitmap: /9j/4AAQSkZJRgABAQETiBOIAAD/2wBD...}}
}

Using this final AttachedPicture pic = (f.tags['picture'] as Map).values.first; throws me an error. What can be done in this case please as I see the pic is attached to the comment section rather

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants