Documentation ¶
Index ¶
- Constants
- Variables
- func Boolp(b bool) *bool
- func Int16p(i int16) *int16
- func Int32p(i int32) *int32
- func Int64p(i int64) *int64
- func Int8p(i int8) *int8
- func Intp(i int) *int
- func StringToUTF16Bytes(s string, o binary.ByteOrder) []byte
- func Stringp(s string) *string
- func Timep(t time.Time) *time.Time
- func UTF16BytesToString(b []byte, o binary.ByteOrder) string
- func Uint16p(i uint16) *uint16
- func Uint32p(i uint32) *uint32
- func Uint64p(i uint64) *uint64
- func Uint8p(i uint8) *uint8
- func Uintp(i uint) *uint
- type BaseLoader
- type Conjunction
- type Field
- type FieldType
- type FileKind
- type ICloudStatus
- type IntRuleData
- type Library
- func (lib *Library) GetApplicationVersion() string
- func (lib *Library) GetDate() time.Time
- func (lib *Library) GetFeatures() int
- func (lib *Library) GetFileName() string
- func (lib *Library) GetMajorVersion() int
- func (lib *Library) GetMinorVersion() int
- func (lib *Library) GetMusicFolder() string
- func (lib *Library) GetPersistentID() pid.PersistentID
- func (lib *Library) GetPlaylists() int
- func (lib *Library) GetShowContentRatings() bool
- func (lib *Library) GetTracks() int
- type LimitMethod
- type Loader
- type LocationStatus
- type LogicRule
- type LogicSign
- type LoveStatus
- type MediaKind
- type Playlist
- func (pl *Playlist) GetAllItems() bool
- func (pl *Playlist) GetAudiobooks() bool
- func (pl *Playlist) GetDistinguishedKind() int
- func (pl *Playlist) GetFolder() bool
- func (pl *Playlist) GetGeniusTrackID() pid.PersistentID
- func (pl *Playlist) GetMaster() bool
- func (pl *Playlist) GetMovies() bool
- func (pl *Playlist) GetMusic() bool
- func (pl *Playlist) GetName() string
- func (pl *Playlist) GetParentPersistentID() pid.PersistentID
- func (pl *Playlist) GetPersistentID() pid.PersistentID
- func (pl *Playlist) GetPlaylistID() int
- func (pl *Playlist) GetPodcasts() bool
- func (pl *Playlist) GetPurchasedMusic() bool
- func (pl *Playlist) GetTVShows() bool
- func (pl *Playlist) GetVisible() bool
- func (p *Playlist) IsSmart() bool
- type RuleHeader
- type RuleSetHeader
- type SelectionMethod
- type SmartPlaylist
- type SmartPlaylistBooleanRule
- type SmartPlaylistCloudRule
- type SmartPlaylistCommonRule
- type SmartPlaylistCriteria
- type SmartPlaylistDateRule
- type SmartPlaylistInfo
- type SmartPlaylistIntegerRule
- type SmartPlaylistLocationRule
- type SmartPlaylistLoveRule
- type SmartPlaylistMediaKindRule
- type SmartPlaylistPlaylistRule
- type SmartPlaylistStringRule
- type SmartRule
- type Time
- type Track
- func (tr *Track) Clone() *Track
- func (tr *Track) GetAlbum() string
- func (tr *Track) GetAlbumArtist() string
- func (tr *Track) GetAlbumRating() uint8
- func (tr *Track) GetAlbumRatingComputed() bool
- func (tr *Track) GetArtist() string
- func (tr *Track) GetArtworkCount() int
- func (tr *Track) GetBPM() uint16
- func (tr *Track) GetBitRate() uint
- func (tr *Track) GetClean() bool
- func (tr *Track) GetComments() string
- func (tr *Track) GetCompilation() bool
- func (tr *Track) GetComposer() string
- func (tr *Track) GetContentRating() string
- func (tr *Track) GetDateAdded() time.Time
- func (tr *Track) GetDateModified() time.Time
- func (tr *Track) GetDisabled() bool
- func (tr *Track) GetDiscCount() uint8
- func (tr *Track) GetDiscNumber() uint8
- func (tr *Track) GetEpisode() string
- func (tr *Track) GetEpisodeOrder() int
- func (tr *Track) GetExplicit() bool
- func (tr *Track) GetFileFolderCount() int
- func (tr *Track) GetFileType() int
- func (tr *Track) GetGenre() string
- func (tr *Track) GetGrouping() string
- func (tr *Track) GetHasVideo() bool
- func (tr *Track) GetKind() string
- func (tr *Track) GetLibraryFolderCount() int
- func (tr *Track) GetLocation() string
- func (tr *Track) GetLoved() bool
- func (tr *Track) GetMaster() bool
- func (tr *Track) GetMovementCount() int
- func (tr *Track) GetMovementName() string
- func (tr *Track) GetMovementNumber() int
- func (tr *Track) GetMovie() bool
- func (tr *Track) GetMusicVideo() bool
- func (tr *Track) GetName() string
- func (tr *Track) GetPartOfGaplessAlbum() bool
- func (tr *Track) GetPersistentID() pid.PersistentID
- func (tr *Track) GetPlayCount() uint
- func (tr *Track) GetPlayDate() time.Time
- func (tr *Track) GetPlayDateGarbage() int
- func (tr *Track) GetPodcast() bool
- func (tr *Track) GetProtected() bool
- func (tr *Track) GetPurchaseDate() time.Time
- func (tr *Track) GetPurchased() bool
- func (tr *Track) GetRating() uint8
- func (tr *Track) GetRatingComputed() bool
- func (tr *Track) GetReleaseDate() time.Time
- func (tr *Track) GetSampleRate() uint
- func (tr *Track) GetSeason() int
- func (tr *Track) GetSeries() string
- func (tr *Track) GetSize() uint64
- func (tr *Track) GetSkipCount() uint
- func (tr *Track) GetSkipDate() time.Time
- func (tr *Track) GetSortAlbum() string
- func (tr *Track) GetSortAlbumArtist() string
- func (tr *Track) GetSortArtist() string
- func (tr *Track) GetSortComposer() string
- func (tr *Track) GetSortName() string
- func (tr *Track) GetSortSeries() string
- func (tr *Track) GetStopTime() int
- func (tr *Track) GetTVShow() bool
- func (tr *Track) GetTotalTime() uint
- func (tr *Track) GetTrackCount() uint8
- func (tr *Track) GetTrackID() int
- func (tr *Track) GetTrackNumber() uint8
- func (tr *Track) GetTrackType() string
- func (tr *Track) GetUnplayed() bool
- func (tr *Track) GetVolumeAdjustment() uint8
- func (tr *Track) GetWork() string
- func (tr *Track) GetYear() int
Constants ¶
View Source
const ( Conjunction_AND = Conjunction(0x0) Conjunction_OR = Conjunction(0x1) )
View Source
const ( Field_NAME = Field(0x2) Field_ALBUM = Field(0x3) Field_ARTIST = Field(0x4) Field_BIT_RATE = Field(0x5) Field_SAMPLE_RATE = Field(0x6) Field_YEAR = Field(0x7) Field_GENRE = Field(0x8) Field_KIND = Field(0x9) Field_DATE_MODIFIED = Field(0xA) Field_TRACK_NUMBER = Field(0xB) Field_SIZE = Field(0xC) Field_TOTAL_TIME = Field(0xD) Field_COMMENTS = Field(0xE) Field_DATE_ADDED = Field(0x10) Field_COMPOSER = Field(0x12) Field_PLAY_COUNT = Field(0x16) Field_PLAY_DATE_UTC = Field(0x17) Field_DISK_NUMBER = Field(0x18) Field_RATING = Field(0x19) Field_DISABLED = Field(0x1D) Field_COMPILATION = Field(0x1F) Field_BPM = Field(0x23) Field_HAS_ARTWORK = Field(0x25) Field_GROUPING = Field(0x27) Field_PLAYLIST_PERSISTENT_ID = Field(0x28) Field_PURCHASED = Field(0x29) Field_DESCRIPTION = Field(0x36) Field_CATEGORY = Field(0x37) Field_PODCAST = Field(0x39) Field_MEDIA_KIND = Field(0x3C) Field_SERIES = Field(0x3E) Field_SEASON = Field(0x3F) Field_SKIP_COUNT = Field(0x44) Field_SKIP_DATE = Field(0x45) Field_ALBUM_ARTIST = Field(0x47) Field_SORT_NAME = Field(0x4E) Field_SORT_ALBUM = Field(0x4F) Field_SORT_ALBUM_ARTIST = Field(0x51) Field_SORT_COMPOSER = Field(0x52) Field_SORT_SERIES = Field(0x53) Field_VIDEO_RATING = Field(0x59) Field_ALBUM_RATING = Field(0x5A) Field_LOCATION = Field(0x85) Field_ICLOUD_STATUS = Field(0x86) Field_LOVE = Field(0x9A) )
View Source
const ( ICloudStatus_PURCHASED = ICloudStatus(0x1) ICloudStatus_MATCHED = ICloudStatus(0x2) ICloudStatus_UPLOADED = ICloudStatus(0x3) ICloudStatus_INELIGIBLE = ICloudStatus(0x4) ICloudStatus_LOCALONLY = ICloudStatus(0x5) ICloudStatus_DUPLICATE = ICloudStatus(0x6) )
View Source
const ( LimitMethod_MINUTES = LimitMethod(0x1) LimitMethod_MB = LimitMethod(0x2) LimitMethod_ITEMS = LimitMethod(0x3) LimitMethod_HOURS = LimitMethod(0x4) LimitMethod_GB = LimitMethod(0x5) )
View Source
const ( LocationStatus_COMPUTER = LocationStatus(0x1) LocationStatus_ICLOUD = LocationStatus(0x10) )
View Source
const ( LogicRule_OTHER = LogicRule(0x0) LogicRule_IS = LogicRule(0x1) LogicRule_CONTAINS = LogicRule(0x2) LogicRule_STARTSWITH = LogicRule(0x4) LogicRule_ENDSWITH = LogicRule(0x8) LogicRule_GREATERTHAN = LogicRule(0x10) LogicRule_LESSTHAN = LogicRule(0x40) LogicRule_BETWEEN = LogicRule(0x100) LogicRule_WITHIN = LogicRule(0x200) )
View Source
const ( LogicSign_INT_POS = LogicSign(0x0) LogicSign_STR_POS = LogicSign(0x1) LogicSign_INT_NEG = LogicSign(0x2) LogicSign_STR_NEG = LogicSign(0x3) )
View Source
const ( LoveStatus_NONE = LoveStatus(0x0) LoveStatus_LOVED = LoveStatus(0x2) LoveStatus_DISLIKED = LoveStatus(0x3) )
View Source
const ( MediaKind_MUSIC = MediaKind(0x1) MediaKind_MOVIE = MediaKind(0x2) MediaKind_PODCAST = MediaKind(0x4) MediaKind_AUDIOBOOK = MediaKind(0x8) MediaKind_MUSICVIDEO = MediaKind(0x20) MediaKind_TVSHOW = MediaKind(0x40) MediaKind_HOMEVIDEO = MediaKind(0x400) MediaKind_ITUNESEXTRAS = MediaKind(0x10000) MediaKind_VOICEMEMO = MediaKind(0x100000) MediaKind_OTHERMUSIC = MediaKind(0x1021B1) MediaKind_ITUNESU = MediaKind(0x200000) MediaKind_UNDESIREDMUSIC = MediaKind(0x208004) MediaKind_UNDESIREDOTHER = MediaKind(0x20A004) MediaKind_BOOK = MediaKind(0xC00000) MediaKind_BOOKORAUDIOBOOK = MediaKind(0xC00008) )
View Source
const ( SelectionMethod_LOWEST_RATING = SelectionMethod(0x1) SelectionMethod_RANDOM = SelectionMethod(0x2) SelectionMethod_NAME = SelectionMethod(0x5) SelectionMethod_ALBUM = SelectionMethod(0x6) SelectionMethod_ARTIST = SelectionMethod(0x7) SelectionMethod_GENRE = SelectionMethod(0x9) SelectionMethod_DATE_ADDED = SelectionMethod(0x15) SelectionMethod_PLAY_COUNT = SelectionMethod(0x19) SelectionMethod_PLAY_DATE_UTC = SelectionMethod(0x1A) SelectionMethod_RATING = SelectionMethod(0x1C) )
View Source
const ( RulesetField = iota + 1 StringField IntField BooleanField DateField MediaKindField PlaylistField LoveField CloudField LocationField )
View Source
const DateStartFromUnix = int64(-2082844800)
Variables ¶
View Source
var AbortError = errors.New("abort")
View Source
var BadFieldError = errors.New("bad rule field")
View Source
var ConjunctionNames = map[Conjunction]string{ Conjunction(0x0): "AND", Conjunction(0x1): "OR", }
View Source
var ConjunctionValues = map[string]Conjunction{ "AND": Conjunction(0x0), "OR": Conjunction(0x1), }
View Source
var FieldNames = map[Field]string{ Field(0x2): "name", Field(0x3): "album", Field(0x4): "artist", Field(0x5): "bit_rate", Field(0x6): "sample_rate", Field(0x7): "year", Field(0x8): "genre", Field(0x9): "kind", Field(0xA): "date_modified", Field(0xB): "track_number", Field(0xC): "size", Field(0xD): "total_time", Field(0xE): "comments", Field(0x10): "date_added", Field(0x12): "composer", Field(0x16): "play_count", Field(0x17): "play_date_utc", Field(0x18): "disk_number", Field(0x19): "rating", Field(0x1D): "disabled", Field(0x1F): "compilation", Field(0x23): "bpm", Field(0x25): "has_artwork", Field(0x27): "grouping", Field(0x28): "playlist_persistent_id", Field(0x29): "purchased", Field(0x36): "description", Field(0x37): "category", Field(0x39): "podcast", Field(0x3C): "media_kind", Field(0x3E): "series", Field(0x3F): "season", Field(0x44): "skip_count", Field(0x45): "skip_date", Field(0x47): "album_artist", Field(0x4E): "sort_name", Field(0x4F): "sort_album", Field(0x51): "sort_album_artist", Field(0x52): "sort_composer", Field(0x53): "sort_series", Field(0x59): "video_rating", Field(0x5A): "album_rating", Field(0x85): "location", Field(0x86): "icloud_status", Field(0x9A): "love", }
View Source
var FieldValues = map[string]Field{ "name": Field(0x2), "album": Field(0x3), "artist": Field(0x4), "bit_rate": Field(0x5), "sample_rate": Field(0x6), "year": Field(0x7), "genre": Field(0x8), "kind": Field(0x9), "date_modified": Field(0xA), "track_number": Field(0xB), "size": Field(0xC), "total_time": Field(0xD), "comments": Field(0xE), "date_added": Field(0x10), "composer": Field(0x12), "play_count": Field(0x16), "play_date_utc": Field(0x17), "disk_number": Field(0x18), "rating": Field(0x19), "disabled": Field(0x1D), "compilation": Field(0x1F), "bpm": Field(0x23), "has_artwork": Field(0x25), "grouping": Field(0x27), "playlist_persistent_id": Field(0x28), "purchased": Field(0x29), "description": Field(0x36), "category": Field(0x37), "podcast": Field(0x39), "media_kind": Field(0x3C), "series": Field(0x3E), "season": Field(0x3F), "skip_count": Field(0x44), "skip_date": Field(0x45), "album_artist": Field(0x47), "sort_name": Field(0x4E), "sort_album": Field(0x4F), "sort_album_artist": Field(0x51), "sort_composer": Field(0x52), "sort_series": Field(0x53), "video_rating": Field(0x59), "album_rating": Field(0x5A), "location": Field(0x85), "icloud_status": Field(0x86), "love": Field(0x9A), }
View Source
var FileKinds = []FileKind{ FileKind{"Protected AAC audio file", ".m4p"}, FileKind{"MPEG audio file", ".mp3"}, FileKind{"AIFF audio file", ".aiff"}, FileKind{"WAV audio file", ".wav"}, FileKind{"QuickTime movie file", ".mov"}, FileKind{"MPEG-4 video file", ".mp4"}, FileKind{"AAC audio file", ".m4a"}, }
View Source
var ICloudStatusNames = map[ICloudStatus]string{ ICloudStatus(0x1): "Purchased", ICloudStatus(0x2): "Matched", ICloudStatus(0x3): "Uploaded", ICloudStatus(0x4): "Ineligible", ICloudStatus(0x5): "LocalOnly", ICloudStatus(0x6): "Duplicate", }
View Source
var ICloudStatusValues = map[string]ICloudStatus{ "Purchased": ICloudStatus(0x1), "Matched": ICloudStatus(0x2), "Uploaded": ICloudStatus(0x3), "Ineligible": ICloudStatus(0x4), "LocalOnly": ICloudStatus(0x5), "Duplicate": ICloudStatus(0x6), }
View Source
var LimitMethodNames = map[LimitMethod]string{ LimitMethod(0x1): "minutes", LimitMethod(0x2): "MB", LimitMethod(0x3): "items", LimitMethod(0x4): "hours", LimitMethod(0x5): "GB", }
View Source
var LimitMethodValues = map[string]LimitMethod{ "minutes": LimitMethod(0x1), "MB": LimitMethod(0x2), "items": LimitMethod(0x3), "hours": LimitMethod(0x4), "GB": LimitMethod(0x5), }
View Source
var LocationStatusNames = map[LocationStatus]string{ LocationStatus(0x1): "Computer", LocationStatus(0x10): "iCloud", }
View Source
var LocationStatusValues = map[string]LocationStatus{ "Computer": LocationStatus(0x1), "iCloud": LocationStatus(0x10), }
View Source
var LogicRuleNames = map[LogicRule]string{ LogicRule(0x0): "other", LogicRule(0x1): "is", LogicRule(0x2): "contains", LogicRule(0x4): "startswith", LogicRule(0x8): "endswith", LogicRule(0x10): "greaterthan", LogicRule(0x40): "lessthan", LogicRule(0x100): "between", LogicRule(0x200): "within", }
View Source
var LogicRuleValues = map[string]LogicRule{ "other": LogicRule(0x0), "is": LogicRule(0x1), "contains": LogicRule(0x2), "startswith": LogicRule(0x4), "endswith": LogicRule(0x8), "greaterthan": LogicRule(0x10), "lessthan": LogicRule(0x40), "between": LogicRule(0x100), "within": LogicRule(0x200), }
View Source
var LogicSignNames = map[LogicSign]string{ LogicSign(0x0): "int_pos", LogicSign(0x1): "str_pos", LogicSign(0x2): "int_neg", LogicSign(0x3): "str_neg", }
View Source
var LogicSignValues = map[string]LogicSign{ "int_pos": LogicSign(0x0), "str_pos": LogicSign(0x1), "int_neg": LogicSign(0x2), "str_neg": LogicSign(0x3), }
View Source
var LoveStatusNames = map[LoveStatus]string{ LoveStatus(0x0): "None", LoveStatus(0x2): "Loved", LoveStatus(0x3): "Disliked", }
View Source
var LoveStatusValues = map[string]LoveStatus{ "None": LoveStatus(0x0), "Loved": LoveStatus(0x2), "Disliked": LoveStatus(0x3), }
View Source
var MediaKindNames = map[MediaKind]string{ MediaKind(0x1): "Music", MediaKind(0x2): "Movie", MediaKind(0x4): "Podcast", MediaKind(0x8): "Audiobook", MediaKind(0x20): "MusicVideo", MediaKind(0x40): "TVShow", MediaKind(0x400): "HomeVideo", MediaKind(0x10000): "ITunesExtras", MediaKind(0x100000): "VoiceMemo", MediaKind(0x1021B1): "OtherMusic", MediaKind(0x200000): "ITunesU", MediaKind(0x208004): "UndesiredMusic", MediaKind(0x20A004): "UndesiredOther", MediaKind(0xC00000): "Book", MediaKind(0xC00008): "BookOrAudiobook", }
View Source
var MediaKindValues = map[string]MediaKind{ "Music": MediaKind(0x1), "Movie": MediaKind(0x2), "Podcast": MediaKind(0x4), "Audiobook": MediaKind(0x8), "MusicVideo": MediaKind(0x20), "TVShow": MediaKind(0x40), "HomeVideo": MediaKind(0x400), "ITunesExtras": MediaKind(0x10000), "VoiceMemo": MediaKind(0x100000), "OtherMusic": MediaKind(0x1021B1), "ITunesU": MediaKind(0x200000), "UndesiredMusic": MediaKind(0x208004), "UndesiredOther": MediaKind(0x20A004), "Book": MediaKind(0xC00000), "BookOrAudiobook": MediaKind(0xC00008), }
View Source
var SelectionMethodNames = map[SelectionMethod]string{ SelectionMethod(0x1): "lowest_rating", SelectionMethod(0x2): "<random>", SelectionMethod(0x5): "name", SelectionMethod(0x6): "album", SelectionMethod(0x7): "artist", SelectionMethod(0x9): "genre", SelectionMethod(0x15): "date_added", SelectionMethod(0x19): "play_count", SelectionMethod(0x1A): "play_date_utc", SelectionMethod(0x1C): "rating", }
View Source
var SelectionMethodValues = map[string]SelectionMethod{ "lowest_rating": SelectionMethod(0x1), "<random>": SelectionMethod(0x2), "name": SelectionMethod(0x5), "album": SelectionMethod(0x6), "artist": SelectionMethod(0x7), "genre": SelectionMethod(0x9), "date_added": SelectionMethod(0x15), "play_count": SelectionMethod(0x19), "play_date_utc": SelectionMethod(0x1A), "rating": SelectionMethod(0x1C), }
Functions ¶
func StringToUTF16Bytes ¶ added in v0.3.1
func UTF16BytesToString ¶ added in v0.3.1
UTF16BytesToString converts UTF-16 encoded bytes, in big or little endian byte order, to a UTF-8 encoded string.
Types ¶
type BaseLoader ¶ added in v0.1.0
type BaseLoader struct {
// contains filtered or unexported fields
}
func NewBaseLoader ¶ added in v0.1.0
func NewBaseLoader() *BaseLoader
func (*BaseLoader) Abort ¶ added in v0.1.0
func (l *BaseLoader) Abort()
func (*BaseLoader) GetChan ¶ added in v0.1.0
func (l *BaseLoader) GetChan() chan interface{}
func (*BaseLoader) GetQuitChan ¶ added in v0.1.0
func (l *BaseLoader) GetQuitChan() chan bool
func (*BaseLoader) Shutdown ¶ added in v0.1.0
func (l *BaseLoader) Shutdown(err error)
type Conjunction ¶ added in v0.3.1
type Conjunction int
func (Conjunction) MarshalJSON ¶ added in v0.3.1
func (e Conjunction) MarshalJSON() ([]byte, error)
func (Conjunction) String ¶ added in v0.3.1
func (e Conjunction) String() string
func (*Conjunction) UnmarshalJSON ¶ added in v0.3.1
func (e *Conjunction) UnmarshalJSON(data []byte) error
type Field ¶ added in v0.3.1
type Field int
func (Field) MarshalJSON ¶ added in v0.3.1
func (*Field) UnmarshalJSON ¶ added in v0.3.1
type ICloudStatus ¶ added in v0.3.1
type ICloudStatus int
func (ICloudStatus) MarshalJSON ¶ added in v0.3.1
func (e ICloudStatus) MarshalJSON() ([]byte, error)
func (ICloudStatus) String ¶ added in v0.3.1
func (e ICloudStatus) String() string
func (*ICloudStatus) UnmarshalJSON ¶ added in v0.3.1
func (e *ICloudStatus) UnmarshalJSON(data []byte) error
type IntRuleData ¶ added in v0.3.1
type IntRuleData struct { Junk1 [4]byte IntA uint32 RelA int64 Junk2 [4]byte BoolB uint32 Junk3 [4]byte IntB uint32 Junk4 [12]byte BoolC uint32 Junk5 [4]byte IntC uint32 Junk6 [12]byte }
func (*IntRuleData) Decode ¶ added in v0.3.1
func (ird *IntRuleData) Decode(data []byte) error
func (*IntRuleData) Encode ¶ added in v0.3.1
func (ird *IntRuleData) Encode() ([]byte, error)
func (IntRuleData) Ints ¶ added in v0.3.1
func (ird IntRuleData) Ints() []int64
func (IntRuleData) Times ¶ added in v0.3.1
func (ird IntRuleData) Times() []*Time
type Library ¶
type Library struct { FileName *string MajorVersion *int MinorVersion *int ApplicationVersion *string Date *time.Time Features *int ShowContentRatings *bool PersistentID *pid.PersistentID `plist:"Library Persistent ID"` MusicFolder *string Tracks *int Playlists *int }
func (*Library) GetApplicationVersion ¶
func (*Library) GetFeatures ¶
func (*Library) GetFileName ¶
func (*Library) GetMajorVersion ¶
func (*Library) GetMinorVersion ¶
func (*Library) GetMusicFolder ¶
func (*Library) GetPersistentID ¶
func (lib *Library) GetPersistentID() pid.PersistentID
func (*Library) GetPlaylists ¶
func (*Library) GetShowContentRatings ¶
type LimitMethod ¶ added in v0.3.1
type LimitMethod int
func (LimitMethod) MarshalJSON ¶ added in v0.3.1
func (e LimitMethod) MarshalJSON() ([]byte, error)
func (LimitMethod) String ¶ added in v0.3.1
func (e LimitMethod) String() string
func (*LimitMethod) UnmarshalJSON ¶ added in v0.3.1
func (e *LimitMethod) UnmarshalJSON(data []byte) error
type Loader ¶
type Loader interface { LoadFile(fn string) Load(f io.ReadCloser) Shutdown(err error) GetChan() chan interface{} Abort() }
type LocationStatus ¶ added in v0.3.1
type LocationStatus int
func (LocationStatus) MarshalJSON ¶ added in v0.3.1
func (e LocationStatus) MarshalJSON() ([]byte, error)
func (LocationStatus) String ¶ added in v0.3.1
func (e LocationStatus) String() string
func (*LocationStatus) UnmarshalJSON ¶ added in v0.3.1
func (e *LocationStatus) UnmarshalJSON(data []byte) error
type LogicRule ¶ added in v0.3.1
type LogicRule int
func (LogicRule) MarshalJSON ¶ added in v0.3.1
func (*LogicRule) UnmarshalJSON ¶ added in v0.3.1
type LogicSign ¶ added in v0.3.1
type LogicSign int
func (LogicSign) MarshalJSON ¶ added in v0.3.1
func (*LogicSign) UnmarshalJSON ¶ added in v0.3.1
type LoveStatus ¶ added in v0.3.1
type LoveStatus int
func (LoveStatus) MarshalJSON ¶ added in v0.3.1
func (e LoveStatus) MarshalJSON() ([]byte, error)
func (LoveStatus) String ¶ added in v0.3.1
func (e LoveStatus) String() string
func (*LoveStatus) UnmarshalJSON ¶ added in v0.3.1
func (e *LoveStatus) UnmarshalJSON(data []byte) error
type MediaKind ¶ added in v0.3.1
type MediaKind int
func (MediaKind) MarshalJSON ¶ added in v0.3.1
func (*MediaKind) UnmarshalJSON ¶ added in v0.3.1
type Playlist ¶
type Playlist struct { AllItems *bool Audiobooks *bool DistinguishedKind *int Folder *bool GeniusTrackID *pid.PersistentID Master *bool Movies *bool Music *bool Name *string ParentPersistentID *pid.PersistentID PlaylistID *int PersistentID *pid.PersistentID `plist:"Playlist Persistent ID"` Podcasts *bool PurchasedMusic *bool SmartCriteria []byte SmartInfo []byte TVShows *bool Visible *bool DateAdded *time.Time DateModified *time.Time Smart *SmartPlaylist SortField *string TrackIDs []pid.PersistentID }
func NewPlaylist ¶
func NewPlaylist() *Playlist
func (*Playlist) GetAllItems ¶
func (*Playlist) GetAudiobooks ¶
func (*Playlist) GetDistinguishedKind ¶
func (*Playlist) GetGeniusTrackID ¶
func (pl *Playlist) GetGeniusTrackID() pid.PersistentID
func (*Playlist) GetParentPersistentID ¶
func (pl *Playlist) GetParentPersistentID() pid.PersistentID
func (*Playlist) GetPersistentID ¶
func (pl *Playlist) GetPersistentID() pid.PersistentID
func (*Playlist) GetPlaylistID ¶
func (*Playlist) GetPodcasts ¶
func (*Playlist) GetPurchasedMusic ¶
func (*Playlist) GetTVShows ¶
func (*Playlist) GetVisible ¶
type RuleHeader ¶ added in v0.3.1
type RuleHeader struct { FieldId uint32 LogicSignId uint8 Junk1 byte LogicRuleId uint16 Junk2 [44]byte Length uint32 }
func (RuleHeader) Field ¶ added in v0.3.1
func (rh RuleHeader) Field() Field
func (RuleHeader) LogicRule ¶ added in v0.3.1
func (rh RuleHeader) LogicRule() LogicRule
func (RuleHeader) LogicSign ¶ added in v0.3.1
func (rh RuleHeader) LogicSign() LogicSign
type RuleSetHeader ¶ added in v0.3.1
type SelectionMethod ¶ added in v0.3.1
type SelectionMethod int
func (SelectionMethod) MarshalJSON ¶ added in v0.3.1
func (e SelectionMethod) MarshalJSON() ([]byte, error)
func (SelectionMethod) String ¶ added in v0.3.1
func (e SelectionMethod) String() string
func (*SelectionMethod) UnmarshalJSON ¶ added in v0.3.1
func (e *SelectionMethod) UnmarshalJSON(data []byte) error
type SmartPlaylist ¶ added in v0.3.1
type SmartPlaylist struct { Info *SmartPlaylistInfo `json:"info"` Criteria *SmartPlaylistCriteria `json:"criteria"` // contains filtered or unexported fields }
func ParseSmartPlaylist ¶ added in v0.3.1
func ParseSmartPlaylist(info, criteria []byte, order binary.ByteOrder) (*SmartPlaylist, error)
type SmartPlaylistBooleanRule ¶ added in v0.3.1
type SmartPlaylistBooleanRule struct { *SmartPlaylistCommonRule RuleType string `json:"type"` Value bool `json:"value"` }
func NewSmartPlaylistBooleanRule ¶ added in v0.3.1
func NewSmartPlaylistBooleanRule(ruleHeader *RuleHeader, value []byte, order binary.ByteOrder) *SmartPlaylistBooleanRule
func (*SmartPlaylistBooleanRule) Encode ¶ added in v0.3.1
func (r *SmartPlaylistBooleanRule) Encode() ([]byte, error)
type SmartPlaylistCloudRule ¶ added in v0.3.1
type SmartPlaylistCloudRule struct { *SmartPlaylistCommonRule RuleType string `json:"type"` Value ICloudStatus `json:"value"` }
func NewSmartPlaylistCloudRule ¶ added in v0.3.1
func NewSmartPlaylistCloudRule(ruleHeader *RuleHeader, value []byte, order binary.ByteOrder) *SmartPlaylistCloudRule
func (*SmartPlaylistCloudRule) Encode ¶ added in v0.3.1
func (r *SmartPlaylistCloudRule) Encode() ([]byte, error)
type SmartPlaylistCommonRule ¶ added in v0.3.1
type SmartPlaylistCommonRule struct { Field Field `json:"field"` Sign LogicSign `json:"sign"` Operator LogicRule `json:"operator"` // contains filtered or unexported fields }
func NewSmartPlaylistCommonRule ¶ added in v0.3.1
func NewSmartPlaylistCommonRule(ruleHeader *RuleHeader, value []byte, order binary.ByteOrder) *SmartPlaylistCommonRule
func (*SmartPlaylistCommonRule) EncodeHeader ¶ added in v0.3.1
func (r *SmartPlaylistCommonRule) EncodeHeader(value []byte) ([]byte, error)
type SmartPlaylistCriteria ¶ added in v0.3.1
type SmartPlaylistCriteria struct { Conjunction Conjunction `json:"conjunction"` Rules []SmartRule `json:"rules"` // contains filtered or unexported fields }
func (*SmartPlaylistCriteria) Encode ¶ added in v0.3.1
func (c *SmartPlaylistCriteria) Encode() ([]byte, error)
func (*SmartPlaylistCriteria) EncodeHeader ¶ added in v0.3.1
func (c *SmartPlaylistCriteria) EncodeHeader(value []byte) ([]byte, error)
func (*SmartPlaylistCriteria) Parse ¶ added in v0.3.1
func (c *SmartPlaylistCriteria) Parse(raw []byte) error
type SmartPlaylistDateRule ¶ added in v0.3.1
type SmartPlaylistDateRule struct { *SmartPlaylistCommonRule RuleType string `json:"type"` Values []*Time `json:"values"` Relative int64 `json:"relative"` }
func NewSmartPlaylistDateRule ¶ added in v0.3.1
func NewSmartPlaylistDateRule(ruleHeader *RuleHeader, value []byte, order binary.ByteOrder) *SmartPlaylistDateRule
func (*SmartPlaylistDateRule) Encode ¶ added in v0.3.1
func (r *SmartPlaylistDateRule) Encode() ([]byte, error)
type SmartPlaylistInfo ¶ added in v0.3.1
type SmartPlaylistInfo struct { CheckedOnly bool `json:"checked_only"` Descending bool `json:"descending"` HasLimit bool `json:"has_limit"` LiveUpdating bool `json:"live_updating"` LimitUnit *LimitMethod `json:"limit_method"` LimitSize *int `json:"limit_size"` SortField *SelectionMethod `json:"sort_field"` // contains filtered or unexported fields }
func (*SmartPlaylistInfo) Encode ¶ added in v0.3.1
func (inf *SmartPlaylistInfo) Encode() ([]byte, error)
func (*SmartPlaylistInfo) Parse ¶ added in v0.3.1
func (inf *SmartPlaylistInfo) Parse(raw []byte) error
type SmartPlaylistIntegerRule ¶ added in v0.3.1
type SmartPlaylistIntegerRule struct { *SmartPlaylistCommonRule RuleType string `json:"type"` Values []int64 `json:"values"` }
func NewSmartPlaylistIntegerRule ¶ added in v0.3.1
func NewSmartPlaylistIntegerRule(ruleHeader *RuleHeader, value []byte, order binary.ByteOrder) *SmartPlaylistIntegerRule
func (*SmartPlaylistIntegerRule) Encode ¶ added in v0.3.1
func (r *SmartPlaylistIntegerRule) Encode() ([]byte, error)
type SmartPlaylistLocationRule ¶ added in v0.3.1
type SmartPlaylistLocationRule struct { *SmartPlaylistCommonRule RuleType string `json:"type"` Value LocationStatus `json:"value"` }
func NewSmartPlaylistLocationRule ¶ added in v0.3.1
func NewSmartPlaylistLocationRule(ruleHeader *RuleHeader, value []byte, order binary.ByteOrder) *SmartPlaylistLocationRule
func (*SmartPlaylistLocationRule) Encode ¶ added in v0.3.1
func (r *SmartPlaylistLocationRule) Encode() ([]byte, error)
type SmartPlaylistLoveRule ¶ added in v0.3.1
type SmartPlaylistLoveRule struct { *SmartPlaylistCommonRule RuleType string `json:"type"` Value LoveStatus `json:"value"` }
func NewSmartPlaylistLoveRule ¶ added in v0.3.1
func NewSmartPlaylistLoveRule(ruleHeader *RuleHeader, value []byte, order binary.ByteOrder) *SmartPlaylistLoveRule
func (*SmartPlaylistLoveRule) Encode ¶ added in v0.3.1
func (r *SmartPlaylistLoveRule) Encode() ([]byte, error)
type SmartPlaylistMediaKindRule ¶ added in v0.3.1
type SmartPlaylistMediaKindRule struct { *SmartPlaylistCommonRule RuleType string `json:"type"` Value MediaKind `json:"value"` }
func NewSmartPlaylistMediaKindRule ¶ added in v0.3.1
func NewSmartPlaylistMediaKindRule(ruleHeader *RuleHeader, value []byte, order binary.ByteOrder) *SmartPlaylistMediaKindRule
func (*SmartPlaylistMediaKindRule) Encode ¶ added in v0.3.1
func (r *SmartPlaylistMediaKindRule) Encode() ([]byte, error)
type SmartPlaylistPlaylistRule ¶ added in v0.3.1
type SmartPlaylistPlaylistRule struct { *SmartPlaylistCommonRule RuleType string `json:"type"` Value pid.PersistentID `json:"value"` // contains filtered or unexported fields }
func NewSmartPlaylistPlaylistRule ¶ added in v0.3.1
func NewSmartPlaylistPlaylistRule(ruleHeader *RuleHeader, value []byte, order binary.ByteOrder) *SmartPlaylistPlaylistRule
func (*SmartPlaylistPlaylistRule) Encode ¶ added in v0.3.1
func (r *SmartPlaylistPlaylistRule) Encode() ([]byte, error)
type SmartPlaylistStringRule ¶ added in v0.3.1
type SmartPlaylistStringRule struct { *SmartPlaylistCommonRule RuleType string `json:"type"` Value string `json:"value"` }
func NewSmartPlaylistStringRule ¶ added in v0.3.1
func NewSmartPlaylistStringRule(ruleHeader *RuleHeader, value []byte, order binary.ByteOrder) *SmartPlaylistStringRule
func (*SmartPlaylistStringRule) Encode ¶ added in v0.3.1
func (r *SmartPlaylistStringRule) Encode() ([]byte, error)
type Time ¶ added in v0.3.1
func (*Time) MarshalJSON ¶ added in v0.3.1
func (*Time) SetEpochMS ¶ added in v0.3.1
func (*Time) UnmarshalJSON ¶ added in v0.3.1
func (*Time) UnmarshalPlist ¶ added in v0.3.1
type Track ¶
type Track struct { Album *string AlbumArtist *string AlbumRating *uint8 AlbumRatingComputed *bool Artist *string ArtworkCount *int BPM *uint16 BitRate *uint Clean *bool Comments *string Compilation *bool Composer *string ContentRating *string DateAdded *time.Time DateModified *time.Time Disabled *bool DiscCount *uint8 DiscNumber *uint8 Episode *string EpisodeOrder *int Explicit *bool FileFolderCount *int FileType *int Genre *string Grouping *string HasVideo *bool Kind *string LibraryFolderCount *int Location *string Loved *bool Master *bool MovementCount *int MovementName *string MovementNumber *int Movie *bool MusicVideo *bool Name *string PartOfGaplessAlbum *bool PersistentID *pid.PersistentID PlayCount *uint PlayDateGarbage *int `plist:"Play Date"` PlayDate *time.Time `plist:"Play Date UTC"` Podcast *bool Protected *bool PurchaseDate *time.Time Purchased *bool Rating *uint8 RatingComputed *bool ReleaseDate *time.Time SampleRate *uint Season *int Series *string Size *uint64 SkipCount *uint SkipDate *time.Time SortAlbum *string SortAlbumArtist *string SortArtist *string SortComposer *string SortName *string SortSeries *string StartTime *int StopTime *int TVShow *bool TotalTime *uint TrackCount *uint8 TrackID *int TrackNumber *uint8 TrackType *string Unplayed *bool VolumeAdjustment *uint8 Work *string Year *int }
func (*Track) GetAlbumArtist ¶
func (*Track) GetAlbumRating ¶
func (*Track) GetAlbumRatingComputed ¶
func (*Track) GetArtworkCount ¶
func (*Track) GetBitRate ¶
func (*Track) GetComments ¶
func (*Track) GetCompilation ¶
func (*Track) GetComposer ¶
func (*Track) GetContentRating ¶
func (*Track) GetDateAdded ¶
func (*Track) GetDateModified ¶
func (*Track) GetDisabled ¶
func (*Track) GetDiscCount ¶
func (*Track) GetDiscNumber ¶
func (*Track) GetEpisode ¶
func (*Track) GetEpisodeOrder ¶
func (*Track) GetExplicit ¶
func (*Track) GetFileFolderCount ¶
func (*Track) GetFileType ¶
func (*Track) GetGrouping ¶
func (*Track) GetHasVideo ¶
func (*Track) GetLibraryFolderCount ¶
func (*Track) GetLocation ¶
func (*Track) GetMovementCount ¶
func (*Track) GetMovementName ¶
func (*Track) GetMovementNumber ¶
func (*Track) GetMusicVideo ¶
func (*Track) GetPartOfGaplessAlbum ¶
func (*Track) GetPersistentID ¶
func (tr *Track) GetPersistentID() pid.PersistentID
func (*Track) GetPlayCount ¶
func (*Track) GetPlayDate ¶
func (*Track) GetPlayDateGarbage ¶
func (*Track) GetPodcast ¶
func (*Track) GetProtected ¶
func (*Track) GetPurchaseDate ¶
func (*Track) GetPurchased ¶
func (*Track) GetRatingComputed ¶
func (*Track) GetReleaseDate ¶
func (*Track) GetSampleRate ¶
func (*Track) GetSkipCount ¶
func (*Track) GetSkipDate ¶
func (*Track) GetSortAlbum ¶
func (*Track) GetSortAlbumArtist ¶
func (*Track) GetSortArtist ¶
func (*Track) GetSortComposer ¶
func (*Track) GetSortName ¶
func (*Track) GetSortSeries ¶
func (*Track) GetStopTime ¶
func (*Track) GetTotalTime ¶
func (*Track) GetTrackCount ¶
func (*Track) GetTrackID ¶
func (*Track) GetTrackNumber ¶
func (*Track) GetTrackType ¶
func (*Track) GetUnplayed ¶
func (*Track) GetVolumeAdjustment ¶
Click to show internal directories.
Click to hide internal directories.