Serial-ATA / Serial-ATA/lofty-rs

Add a `Picture` interface to `ApeTag`

Open
#280 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Rust
Stars
359
Forks
76
Avg merge
12h 54m
Merged PRs (30d)
11

Description

Summary

There is no easy way to interact with Pictures when using ApeTag. They are currently treated as any other item with ItemValue::Binary.

We could very easily split them off from the other items and store them separately, like we do for VorbisComments.

API design
impl ApeTag {
    /// Removes PictureType::Icon and PictureType::OtherIcon like Id3v2Tag and VorbisComments
    fn insert_picture(&mut self, picture: Picture) -> Option<Picture>;
    fn pictures(&self) -> impl Iterator<Item = &Picture>;
    fn remove_picture_type(&mut self, picture_type: PictureType) -> impl Iterator<Item = Picture>;
}

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the ApeTag implementation and compare how VorbisComments stores and exposes Picture values. Trace the current ItemValue::Binary handling, then implement the listed picture methods with the stated Icon and OtherIcon behavior; done means ApeTag offers the three APIs and preserves the expected Picture values.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
backend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.