collection

package
v0.0.0-...-60bafd0 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2024 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SaveCollectionToFile

func SaveCollectionToFile(collection *NML, filePath string) error

Types

type AlbumType

type AlbumType struct {
	Value    *string  `xml:",chardata"`
	Track    *float64 `xml:"TRACK,attr"`
	Title    *string  `xml:"TITLE,attr"`
	OfTracks *float64 `xml:"OF_TRACKS,attr"`
}

type CellType

type CellType struct {
	Value       *string  `xml:",chardata"`
	Index       *float64 `xml:"INDEX,attr"`
	CellName    *string  `xml:"CELLNAME,attr"`
	Color       *float64 `xml:"COLOR,attr"`
	Sync        *float64 `xml:"SYNC,attr"`
	Reverse     *float64 `xml:"REVERSE,attr"`
	Mode        *float64 `xml:"MODE,attr"`
	Type        *float64 `xml:"TYPE,attr"`
	Speed       *float64 `xml:"SPEED,attr"`
	Transpose   *float64 `xml:"TRANSPOSE,attr"`
	Offset      *float64 `xml:"OFFSET,attr"`
	Nudge       *float64 `xml:"NUDGE,attr"`
	Gain        *float64 `xml:"GAIN,attr"`
	StartMarker *float64 `xml:"START_MARKER,attr"`
	EndMarker   *float64 `xml:"END_MARKER,attr"`
	BPM         *float64 `xml:"BPM,attr"`
	Dir         *string  `xml:"DIR,attr"`
	File        *string  `xml:"FILE,attr"`
	Volume      *string  `xml:"VOLUME,attr"`
}

type CollectionType

type CollectionType struct {
	Entry   []EntryType `xml:"ENTRY"`
	Entries *float64    `xml:"ENTRIES,attr"`
}

type CriteriaType

type CriteriaType struct {
	Attribute *string `xml:"ATTRIBUTE,attr"`
	Direction *string `xml:"DIRECTION,attr"`
}

type CueV2Type

type CueV2Type struct {
	Value      *string  `xml:",chardata"`
	Name       *string  `xml:"NAME,attr"`
	DisplOrder *float64 `xml:"DISPL_ORDER,attr"`
	Type       *float64 `xml:"TYPE,attr"`
	Start      *float64 `xml:"START,attr"`
	Len        *float64 `xml:"LEN,attr"`
	Repeats    *float64 `xml:"REPEATS,attr"`
	HotCue     *float64 `xml:"HOTCUE,attr"`
}

type EntryType

type EntryType struct {
	Location             *LocationType         `xml:"LOCATION"`
	Album                *AlbumType            `xml:"ALBUM"`
	ModificationInfo     *ModificationInfoType `xml:"MODIFICATION_INFO"`
	Info                 *InfoType             `xml:"INFO"`
	Tempo                *TempoType            `xml:"TEMPO"`
	Loudness             *LoudnessType         `xml:"LOUDNESS"`
	MusicalKey           *MusicalKeyType       `xml:"MUSICAL_KEY"`
	LoopInfo             *LoopInfoType         `xml:"LOOPINFO"`
	CueV2                []CueV2Type           `xml:"CUE_V2"`
	Stems                *StemsType            `xml:"STEMS"`
	PrimaryKey           *PrimaryKeyType       `xml:"PRIMARYKEY"`
	ModifiedDate         *string               `xml:"MODIFIED_DATE,attr"`
	ModifiedTime         *float64              `xml:"MODIFIED_TIME,attr"`
	Lock                 *float64              `xml:"LOCK,attr"`
	LockModificationTime *string               `xml:"LOCK_MODIFICATION_TIME,attr"`
	AudioID              *string               `xml:"AUDIO_ID,attr"`
	Title                *string               `xml:"TITLE,attr"`
	Artist               *string               `xml:"ARTIST,attr"`
}

type HeadType

type HeadType struct {
	Value   *string `xml:",chardata"`
	Company *string `xml:"COMPANY,attr"`
	Program *string `xml:"PROGRAM,attr"`
}

type IndexingType

type IndexingType struct {
	SortingInfo []SortingInfoType `xml:"SORTING_INFO"`
}

type InfoType

type InfoType struct {
	Value         *string  `xml:",chardata"`
	Bitrate       *float64 `xml:"BITRATE,attr"`
	Genre         *string  `xml:"GENRE,attr"`
	Comment       *string  `xml:"COMMENT,attr"`
	CoverArtID    *string  `xml:"COVERARTID,attr"`
	Key           *string  `xml:"KEY,attr"`
	Playtime      *float64 `xml:"PLAYTIME,attr"`
	PlaytimeFloat *float64 `xml:"PLAYTIME_FLOAT,attr"`
	ImportDate    *string  `xml:"IMPORT_DATE,attr"`
	ReleaseDate   *string  `xml:"RELEASE_DATE,attr"`
	Flags         *float64 `xml:"FLAGS,attr"`
	FileSize      *float64 `xml:"FILESIZE,attr"`
	Label         *string  `xml:"LABEL,attr"`
	KeyLyrics     *string  `xml:"KEY_LYRICS,attr"`
	CatalogNo     *string  `xml:"CATALOG_NO,attr"`
	Playcount     *float64 `xml:"PLAYCOUNT,attr"`
	Ranking       *float64 `xml:"RANKING,attr"`
	LastPlayed    *string  `xml:"LAST_PLAYED,attr"`
	Remixer       *string  `xml:"REMIXER,attr"`
	Rating        *string  `xml:"RATING,attr"`
	Producer      *string  `xml:"PRODUCER,attr"`
	Mix           *string  `xml:"MIX,attr"`
	Color         *float64 `xml:"COLOR,attr"`
}

type LocationType

type LocationType struct {
	Value    *string `xml:",chardata"`
	Dir      *string `xml:"DIR,attr"`
	File     *string `xml:"FILE,attr"`
	Volume   *string `xml:"VOLUME,attr"`
	VolumeID *string `xml:"VOLUMEID,attr"`
}

type LoopInfoType

type LoopInfoType struct {
	Value          *string  `xml:",chardata"`
	SampleTypeInfo *float64 `xml:"SAMPLE_TYPE_INFO,attr"`
}

type LoudnessType

type LoudnessType struct {
	Value       *string  `xml:",chardata"`
	PeakDB      *float64 `xml:"PEAK_DB,attr"`
	PerceivedDB *float64 `xml:"PERCEIVED_DB,attr"`
	AnalyzedDB  *float64 `xml:"ANALYZED_DB,attr"`
}

type ModificationInfoType

type ModificationInfoType struct {
	Value      *string `xml:",chardata"`
	AuthorType *string `xml:"AUTHOR_TYPE,attr"`
}

type MusicalKeyType

type MusicalKeyType struct {
	Value          *string  `xml:",chardata"`
	ValueAttribute *float64 `xml:"VALUE,attr"`
}

type NML

type NML struct {
	NMLType
}

func CollectionFromString

func CollectionFromString(content string) (*NML, error)

func ReadFileAndConvertToCollection

func ReadFileAndConvertToCollection(filePath string) (*NML, error)

ReadFileAndConvertToCollection reads a file and converts it to the Collection struct

type NMLType

type NMLType struct {
	Head         *HeadType          `xml:"HEAD"`
	MusicFolders *string            `xml:"MUSICFOLDERS"`
	Collection   *CollectionType    `xml:"COLLECTION"`
	Sets         *SetsType          `xml:"SETS"`
	Playlists    *PlaylistsType     `xml:"PLAYLISTS"`
	Indexing     *IndexingType      `xml:"INDEXING"`
	SortingOrder []SortingOrderType `xml:"SORTING_ORDER"`
	Version      *float64           `xml:"VERSION,attr"`
}

type NodeType

type NodeType struct {
	Playlist      *PlaylistType  `xml:"PLAYLIST"`
	SubNodes      *SubNodesType  `xml:"SUBNODES"`
	Type          *string        `xml:"TYPE,attr"`
	Name          *string        `xml:"NAME,attr"`
	SmartPlaylist *SmartListType `xml:"SMARTLIST"`
}

type PlaylistType

type PlaylistType struct {
	Content *interface{} `xml:",any"`
	Entry   []EntryType  `xml:"ENTRY"`
	Entries *float64     `xml:"ENTRIES,attr"`
	Type    *string      `xml:"TYPE,attr"`
	UUID    *string      `xml:"UUID,attr"`
}

type PlaylistsType

type PlaylistsType struct {
	Node *NodeType `xml:"NODE"`
}

type PrimaryKeyType

type PrimaryKeyType struct {
	Value *string `xml:",chardata"`
	Type  *string `xml:"TYPE,attr"`
	Key   *string `xml:"KEY,attr"`
}

type SearchExpressionType

type SearchExpressionType struct {
	Query   *string `xml:"QUERY,attr"`
	Version *string `xml:"VERSION,attr"`
}

type SetType

type SetType struct {
	Location         *LocationType         `xml:"LOCATION"`
	Album            *AlbumType            `xml:"ALBUM"`
	ModificationInfo *ModificationInfoType `xml:"MODIFICATION_INFO"`
	Info             *InfoType             `xml:"INFO"`
	Tempo            *TempoType            `xml:"TEMPO"`
	Slot             []SlotType            `xml:"SLOT"`
	Title            *string               `xml:"TITLE,attr"`
	Artist           *string               `xml:"ARTIST,attr"`
	QuantValue       *float64              `xml:"QUANT_VAlUE,attr"`
	QuantState       *float64              `xml:"QUANT_STATE,attr"`
}

type SetsType

type SetsType struct {
	Set     []SetType `xml:"SET"`
	Entries *float64  `xml:"ENTRIES,attr"`
}

type SlotType

type SlotType struct {
	Cell            []CellType `xml:"CELL"`
	KeyLock         *float64   `xml:"KEYLOCK,attr"`
	FXEnable        *float64   `xml:"FXENABLE,attr"`
	PunchMode       *float64   `xml:"PUNCHMODE,attr"`
	ActiveCellIndex *float64   `xml:"ACTIVE_CELL_INDEX,attr"`
}

type SmartListType

type SmartListType struct {
	SearchExpression *SearchExpressionType `xml:"SEARCH_EXPRESSION"`
	UUID             *string               `xml:"UUID,attr"`
}

type SortingDataType

type SortingDataType struct {
	Value *string  `xml:",chardata"`
	Idx   *float64 `xml:"IDX,attr"`
	Ord   *float64 `xml:"ORD,attr"`
}

type SortingInfoType

type SortingInfoType struct {
	Criteria *CriteriaType `xml:"CRITERIA"`
	Path     *string       `xml:"PATH,attr"`
}

type SortingOrderType

type SortingOrderType struct {
	SortingData []SortingDataType `xml:"SORTING_DATA"`
	Path        *string           `xml:"PATH,attr"`
}

type StemsType

type StemsType struct {
	Value *string `xml:",chardata"`
	Stems *string `xml:"STEMS,attr"`
}

type SubNodesType

type SubNodesType struct {
	Node  []NodeType `xml:"NODE"`
	Count *float64   `xml:"COUNT,attr"`
}

type TempoType

type TempoType struct {
	Value                 *string  `xml:",chardata"`
	BPM                   *float64 `xml:"BPM,attr"`
	BPMQuality            *float64 `xml:"BPM_QUALITY,attr"`
	BPMTransientCoherence *float64 `xml:"BPM_TRANSIENTCOHERENCE,attr"`
}

Jump to

Keyboard shortcuts

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