pub enum Kind {
Front,
Back,
Booklet,
Media,
Artist,
Logo,
Banner,
Background,
Other,
}Expand description
What a picture is of, for the few kinds worth telling apart.
The archive and the tag formats both classify their images, and the
classification is the only thing that makes a second image worth keeping: a
folder of image-1.jpg … image-9.jpg is not more useful than none.
Variants§
Front
The front of the sleeve: the album cover.
Back
The back of the sleeve, usually the track listing.
Booklet
A page of the booklet or insert.
Media
The disc itself — the label printed on a CD or a record.
Artist
A photograph of the artist.
Logo
An artist’s logo — not a photograph of them, a mark that stands for
them. See crate::fanarttv::logo_url, its only source today.
Banner
A wide background image for the artist — a header or hero image, not
the small mark Kind::Logo is. See crate::fanarttv::banner_url,
its only source today.
Background
A full-screen artist background. Fanart.tv’s 4K pool is preferred.
Other
Anything else the source classifies, or nothing at all.
Implementations§
Source§impl Kind
impl Kind
Sourcepub fn stem(self) -> &'static str
pub fn stem(self) -> &'static str
How this program spells the kind, in a name and in a message.
cover for the front, because that is the name every player and file
manager looks for and this program’s own scanner looks for first — see
file_name. The rest are named for what they are.
Sourcepub fn parse(text: &str) -> Kind
pub fn parse(text: &str) -> Kind
Reads the word a source uses for a kind.
Unknown words become Kind::Other rather than being dropped: an image
nobody classified is still an image, and losing it because the label was
unfamiliar would be a strange way to fail.