Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrInvalidFormat ¶
type ErrInvalidFormat struct {
// contains filtered or unexported fields
}
ErrInvalidFormat is returned when an input file does not meet the expected itune library xml format
func NewInvalidFormatError ¶
func NewInvalidFormatError(s string) ErrInvalidFormat
NewInvalidFormatError created a new invalid format error that formats to the given string
func (ErrInvalidFormat) Error ¶
func (err ErrInvalidFormat) Error() string
type Key ¶
type Key struct {
Value string `xml:"key"`
}
Key is the key of a key value pair in the library xml
type Library ¶
type Library struct {
MajorVersion int
MinorVersion int
ApplicationVersion string
Date time.Time
Features int
ShowContentRatings bool
LibraryPersistentID string
MusicFolder string
Tracks []*Track
Playlists []*Playlist
// contains filtered or unexported fields
}
Library represents an entire iTunes library data structure
func ParseReader ¶
ParseReader parses the given readers bytes as an library xml file
func (*Library) UnmarshalXML ¶
UnmarshalXML is a custom unmarshaller function for itunes library xml format
type Playlist ¶
type Playlist struct {
Master bool
PlaylistID int
PlaylistPersistentID string
AllItems bool
Visible bool
Protected bool
Name string
SmartInfo []byte
SmartCriteria []byte
ParentPersistentID string
DistinguishedKind int
PurchasedMusic bool
Music bool
Movies bool
TVShows bool
Podcasts bool
ITunesU bool
Audiobooks bool
Books bool
Folder bool
PlaylistItems []*Track
}
Playlist represents an entire iTunes Playlist data structure
func (*Playlist) UnmarshalXML ¶
UnmarshalXML is a custom unmarshaller function for itunes Track xml format
type Track ¶
type Track struct {
TrackID int
Size int
TotalTime int
DiscNumber int
DiscCount int
TrackNumber int
TrackCount int
Year int
ReleaseDate time.Time
DateModified time.Time
DateAdded time.Time
BitRate int
SampleRate int
PlayCount int
PlayDate int
PlayDateUTC time.Time
SkipCount int
SkipDate time.Time
Rating int
RatingComputed bool
AlbumRating int
AlbumRatingComputed bool
ArtworkCount int
PersistentID string
TrackType string
FileFolderCount int
LibraryFolderCount int
Compilation bool
Name string
Artist string
AlbumArtist string
Composer string
Album string
Genre string
Kind string
Location string
Podcast bool
Unplayed bool
SortArtist string
SortName string
SortAlbum string
SortAlbumArtist string
SortComposer string
Purchased bool
Explicit bool
Comments string
Loved bool
Grouping string
BPM int
Protected bool
HasVideo bool
VolumeAdjustment int
StartTime int
StopTime int
Movie bool
ITunesU bool
Disabled bool
PartOfGaplessAlbum bool
Series string
Episode string
EpisodeOrder int
TVShow bool
Season string
ContentRating string
Equalizer string
}
Track represents an entire iTunes Track data structure
func (*Track) UnmarshalXML ¶
UnmarshalXML is a custom unmarshaller function for itunes Track xml format