itl

package
v0.3.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 17, 2023 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var COLUMN_TYPE = map[uint32]string{}
View Source
var DATASET_TYPE = map[uint32]string{}
View Source
var DATA_TYPE = map[uint32]string{}
View Source
var ErrInvalidHeader = errors.New("invalid header")
View Source
var ErrTooBig = errors.New("object bigger than encoded size")
View Source
var ErrUnexpectedObject = errors.New("unexpected object")
View Source
var ErrUnknownVersion = errors.New("unknown file format version")
View Source
var PLAYLIST_KIND_TYPE = map[uint32]string{}
View Source
var SORT_FIELD_TYPE = map[uint32]string{}
View Source
var SPECIAL_SMART_TYPE = map[uint32]string{}
View Source
var UTF16_TYPES = map[uint32]bool{}

Functions

func ReadObject

func ReadObject(r io.Reader, offset int) (int, interface{}, error)

Types

type Album

type Album struct {
	*StandardObject
	Parsed      *AlbumInner
	RecordCount int
	Sequence    int
	AlbumID     pid.PersistentID
	ArtistID    pid.PersistentID
	AlbumRating int
}

haim

func (*Album) Read

func (o *Album) Read() error

type AlbumInner

type AlbumInner struct {
	Type        ObjectSignature
	Size        uint32
	SubBytes    uint32
	RecordCount uint32
	Sequence    uint32
	AlbumID     pid.PersistentID `json:",string"`
	Unknown1    [4]byte
	ArtistID    pid.PersistentID `json:",string"`
	Unknown2    uint16
	AlbumRating int8
}

type AlbumList

type AlbumList struct {
	*StandardObject
	Parsed      *AlbumListInner
	RecordCount int
}

halm

func (*AlbumList) Read

func (o *AlbumList) Read() error

type AlbumListInner

type AlbumListInner struct {
	Type        ObjectSignature
	Size        uint32
	RecordCount uint32
}

type ApplicationVersion

type ApplicationVersion [31]byte

func (ApplicationVersion) Major

func (o ApplicationVersion) Major() (int, error)

func (ApplicationVersion) MarshalJSON

func (o ApplicationVersion) MarshalJSON() ([]byte, error)

func (ApplicationVersion) String

func (o ApplicationVersion) String() string

type Artist

type Artist struct {
	*StandardObject
	Parsed      *ArtistInner
	RecordCount int
	Sequence    int
	ArtistID    pid.PersistentID
}

hiim

func (*Artist) Read

func (o *Artist) Read() error

type ArtistInner

type ArtistInner struct {
	Size        uint32
	SubBytes    uint32
	RecordCount uint32
	Sequence    uint32
	ArtistID    pid.PersistentID `json:",string"`
}

type ArtistList

type ArtistList struct {
	*StandardObject
	Parsed      *ArtistListInner
	RecordCount int
}

hilm

func (*ArtistList) Read

func (o *ArtistList) Read() error

type ArtistListInner

type ArtistListInner struct {
	Type        ObjectSignature
	Size        uint32
	RecordCount uint32
}

type DataObject

type DataObject struct {
	*StandardObject
	Parsed *DataObjectInner
	TypeID DataType
	Raw    []byte
	Str    string
}

hohm

func (*DataObject) Read

func (o *DataObject) Read() error

type DataObjectInner

type DataObjectInner struct {
	Type     ObjectSignature
	Unknown1 uint32
	Size     uint32
	TypeID   DataType
	Unknown2 uint32
	Unknown3 uint32
	Unknown4 uint32
	DataSize uint32
	Unknown5 uint32
	Unknown6 uint32
}

type DataSet

type DataSet struct {
	*StandardObject
	Parsed      *DataSetInner
	RecordBytes int
}

hdsm

func (*DataSet) Read

func (o *DataSet) Read() error

type DataSetInner

type DataSetInner struct {
	Type        ObjectSignature
	Size        uint32
	RecordBytes uint32
}

type DataSetType

type DataSetType uint32

func (DataSetType) String

func (dst DataSetType) String() string

type DataType

type DataType uint32

func (DataType) HasExtendedData

func (dt DataType) HasExtendedData() bool

func (DataType) String

func (dt DataType) String() string

type Database

type Database struct {
	*StandardObject
	Parsed             *DatabaseInner
	PersistentID       pid.PersistentID
	ApplicationVersion ApplicationVersion
	MajorVersion       int
	MinorVersion       int
	MaxCryptSize       int
	TZOffset           int
}

hdfm IIB31sIQIBBBBIIIHHIIIIi

func (*Database) Read

func (o *Database) Read() error

type DatabaseInner

type DatabaseInner struct {
	Type               ObjectSignature    // 0
	Size               uint32             // 4
	A                  [4]byte            // 8
	B                  [4]byte            // 12
	StrLen             uint8              // 16
	ApplicationVersion ApplicationVersion `json:",string"` // 17
	E                  [4]byte            // 48
	PersistentID       pid.PersistentID   `json:",string"` // 52
	G                  [4]byte            // 60
	H                  uint8              // 64
	MajorVersion       uint8              // 65
	J                  uint8              // 66
	MinorVersion       uint8              // 67
	L                  uint32             // 68
	M                  [4]byte            // 72
	N                  [4]byte            // 76
	O                  uint16             // 80
	P                  uint16             // 82
	Q                  [4]byte            // 84
	//DatabaseDate Time `json:",string"`
	R            uint32 // 88
	MaxCryptSize uint32 // 92
	T            uint32 // 96
	TZOffset     int32  // 100
}

type HGHM

type HGHM struct {
	*StandardObject
	Parsed      *HGHMInner
	RecordCount int
	LibraryDate time.Time
}

hghm

func (*HGHM) Read

func (o *HGHM) Read() error

type HGHMInner

type HGHMInner struct {
	Type        ObjectSignature
	Size        uint32
	RecordCount uint32
	Unknown1    uint32
	LibraryDate Time
}

type Loader

type Loader struct {
	*loader.BaseLoader
	// contains filtered or unexported fields
}

func NewLoader

func NewLoader() *Loader

func (*Loader) Decrypt

func (l *Loader) Decrypt(f io.ReadCloser) (io.ReadCloser, error)

func (*Loader) Load

func (l *Loader) Load(f io.ReadCloser)

func (*Loader) LoadFile

func (l *Loader) LoadFile(fn string)

func (*Loader) Parse

func (l *Loader) Parse(f io.Reader)

type ObjectSignature

type ObjectSignature [4]byte

func (ObjectSignature) GetEndianness

func (v ObjectSignature) GetEndianness() (string, binary.ByteOrder)

func (ObjectSignature) MarshalJSON

func (v ObjectSignature) MarshalJSON() ([]byte, error)

func (ObjectSignature) String

func (v ObjectSignature) String() string

type Playlist

type Playlist struct {
	*StandardObject
	Parsed             *PlaylistInner
	RecordCount        int
	TrackCount         int
	SortOrderFieldType SortField
	DateAdded          time.Time
	DateModified       time.Time
	PersistentID       pid.PersistentID
	ParentPersistentID pid.PersistentID
	Folder             bool
	GeniusTrackID      int

	DistinguishedKind PlaylistKind `json:",string"`
	Master            bool
	Audiobooks        bool
	Movies            bool
	Music             bool
	Podcasts          bool
	PurchasedMusic    bool
	TVShows           bool
}

hpim

func (*Playlist) Read

func (o *Playlist) Read() error

type PlaylistInner

type PlaylistInner struct {
	Type               ObjectSignature  // 0
	Size               uint32           // 4
	Unknown1           uint32           `json:",omitempty"` // 8
	RecordCount        uint32           // 12
	TrackCount         uint32           // 16
	Unknown2           uint32           `json:",omitempty"` // 20
	SortOrderFieldType SortField        // 24
	Unknown3           uint16           `json:",omitempty"` // 26
	DateAdded          Time             // 28
	Unknown4           [36]uint32       `json:",omitempty"` // 32
	Unknown5           [65]uint32       `json:",omitempty"` // 176
	Unknown6           uint16           `json:",omitempty"` // 436
	Unknown7           uint16           `json:",omitempty"` // 438
	PersistentID       pid.PersistentID // 440
	Unknown8           [18]uint32       `json:",omitempty"` // 448
	Unknown9           uint16           `json:",omitempty"` // 520
	Folder             uint16           // 522
	Unknown10          uint32           `json:",omitempty"` // 524
	ParentPersistentID pid.PersistentID // 528
	Unknown11          [7]uint32        `json:",omitempty"` // 536
	PersistentID2      pid.PersistentID // 564

}

type PlaylistItem

type PlaylistItem struct {
	*StandardObject
	Parsed   *PlaylistItemInner
	Sequence int
	TrackID  int
	Position int
}

hptm

func (*PlaylistItem) Read

func (o *PlaylistItem) Read() error

type PlaylistItemInner

type PlaylistItemInner struct {
	Type     ObjectSignature
	Size     uint32
	Unknown1 uint32
	Unknown2 uint32
	Sequence uint32
	Unknown4 uint32
	TrackID  uint32
	Unknown5 uint32
	Position uint32
}

type PlaylistKind

type PlaylistKind uint32

func (PlaylistKind) String

func (pk PlaylistKind) String() string

type PlaylistList

type PlaylistList struct {
	*StandardObject
	Parsed      *PlaylistListInner
	RecordCount int
}

hplm

func (*PlaylistList) Read

func (o *PlaylistList) Read() error

type PlaylistListInner

type PlaylistListInner struct {
	Type        ObjectSignature
	Size        uint32
	RecordCount uint32
}

type QueryItem

type QueryItem struct {
	*StandardObject
	Parsed *QueryItemInner
}

hqim

func (*QueryItem) Read

func (o *QueryItem) Read() error

type QueryItemInner

type QueryItemInner struct {
	Type ObjectSignature
	Size uint32
}

type QueryList

type QueryList struct {
	*StandardObject
	Parsed *QueryListInner
}

hqlm

func (*QueryList) Read

func (o *QueryList) Read() error

type QueryListInner

type QueryListInner struct {
	Type ObjectSignature
	Size uint32
}

type ReadableObject

type ReadableObject interface {
	Read() error
	GetType() string
	GetOffset() int
	GetSize() int
	GetData() []byte
	Buffer() *bytes.Buffer
	Parse(interface{}) error
}

type Sized

type Sized interface {
	GetSize() int
}

type SortField

type SortField uint16

func (SortField) String

func (sf SortField) String() string

type StandardObject

type StandardObject struct {
	Type      string
	Offset    int
	Preface   interface{}
	Size      int
	ByteOrder binary.ByteOrder
	Data      []byte
}

func NewStandardObject

func NewStandardObject(r io.Reader, offset int) (int, *StandardObject, error)

func (*StandardObject) Buffer

func (o *StandardObject) Buffer() *bytes.Buffer

func (*StandardObject) CreateSubObject

func (o *StandardObject) CreateSubObject() ReadableObject

func (*StandardObject) GetData

func (o *StandardObject) GetData() []byte

func (*StandardObject) GetOffset

func (o *StandardObject) GetOffset() int

func (*StandardObject) GetSize

func (o *StandardObject) GetSize() int

func (*StandardObject) GetType

func (o *StandardObject) GetType() string

func (*StandardObject) Parse

func (o *StandardObject) Parse(x interface{}) error

type Time

type Time uint32

func (Time) MarshalJSON

func (t Time) MarshalJSON() ([]byte, error)

func (Time) String

func (t Time) String() string

func (Time) Time

func (t Time) Time() time.Time

type Track

type Track struct {
	*StandardObject
	Parsed           *TrackInner
	RecordCount      int
	TrackID          int
	BlockType        int
	FileType         string
	DateModified     time.Time
	FileSize         int
	TotalTime        int
	TrackNumber      int
	TrackCount       int
	Year             int
	BitRate          int
	SampleRate       int
	VolumeAdjustment int
	StartTime        int
	StopTime         int
	PlayCount        int
	Compilation      bool
	PlayDate         time.Time
	DiscNumber       int
	DiscCount        int
	Rating           int
	BPM              int
	DateAdded        time.Time
	Disabled         bool
	PersistentID     pid.PersistentID
	PurchaseDate     time.Time
	ReleaseDate      time.Time
	AlbumSequence    int
	BackupDate       time.Time
	SampleCount      int
	SkipCount        int
	SkipDate         time.Time
}

htim

func (*Track) Read

func (o *Track) Read() error

type TrackInner

type TrackInner struct {
	Type             ObjectSignature  // 0
	Size             uint32           // 4
	SubBytes         uint32           // 8
	RecordCount      uint32           // 12
	TrackID          uint32           // 16
	BlockType        uint32           // 20
	Unknown1         uint32           // 24
	FileType         [4]byte          // 28
	DateModified     Time             // 32
	FileSize         uint32           // 36
	TotalTime        uint32           // 40
	TrackNumber      uint32           // 44
	TrackCount       uint32           // 48
	Unknown2         uint16           // 52
	Year             uint16           // 54
	Unknown3         uint16           // 56
	BitRate          uint16           // 58
	SampleRate       uint16           // 60
	Unknown4         uint16           // 62
	VolumeAdjustment int32            // 64
	StartTime        uint32           // 68
	StopTime         uint32           // 72
	PlayCount        uint32           // 76
	Unknown5         uint16           // 80
	Compilation      uint16           // 82
	Unknown6         [12]byte         // 84
	Unknown7         uint32           // 96
	PlayDate         Time             // 100
	DiscNumber       uint16           // 104
	DiscCount        uint16           // 106
	Rating           uint8            // 108
	BPM              uint8            // 109
	Unknown8         [10]byte         // 110
	DateAdded        Time             // 120
	Disabled         uint32           // 124
	PersistentID     pid.PersistentID // 128
	Unknown9         uint32           // 136
	FileType2        [4]byte          // 140
	Unknown10        [3]uint32        // 144
	PurchaseDate     Time             // 156
	ReleaseDate      Time             // 39    // 160
	Unknown11        [13]uint32       // 164
	Protected        uint32           // 216
	AlbumSequence    uint32           // 220
	BackupDate       Time             // 224
	Unknown12        [5]uint32        // 228
	SampleCount      uint32           // 248

}

type TrackList

type TrackList struct {
	*StandardObject
	Parsed      *TrackListInner
	RecordCount int
}

htlm

func (*TrackList) Read

func (o *TrackList) Read() error

type TrackListInner

type TrackListInner struct {
	Type        ObjectSignature
	Size        uint32
	RecordCount uint32
}

type Unhandled

type Unhandled struct {
	*StandardObject
	Parsed *UnhandledInner
}

hrlm, hrpm

func (*Unhandled) Read

func (o *Unhandled) Read() error

type UnhandledInner

type UnhandledInner struct {
	Type ObjectSignature
	Size uint32
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL