playlist

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2021 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DifficultyEasy       = "easy"
	DifficultyNormal     = "normal"
	DifficultyHard       = "hard"
	DifficultyExpert     = "expert"
	DifficultyExpertPlus = "expertPlus"

	CharacteristicStandard  = "Standard"
	CharacteristicOneSaber  = "OneSaber"
	CharacteristicNoArrows  = "NoArrows"
	Characteristic360Degree = "360Degree"
	Characteristic90Degree  = "90Degree"
	CharacteristicLawless   = "Lawless"
	CharacteristicLightshow = "Lightshow"
)

Variables

This section is empty.

Functions

func DefaultImage added in v0.1.3

func DefaultImage() image.Image

DefaultImage returns a default image

Types

type Cover added in v0.1.3

type Cover string

Cover type contains functions for base64 covers

func ImageToCover added in v0.1.3

func ImageToCover(img image.Image) (Cover, error)

ImageToCover reads an image object and makes a Cover

func ReaderToCover added in v0.1.3

func ReaderToCover(reader io.Reader) (Cover, error)

ReaderToCover takes an io.Reader and returns a Cover

func (Cover) GetBase64Image added in v0.1.3

func (c Cover) GetBase64Image() string

GetBase64Image returns the base64 image string

func (Cover) GetImage added in v0.1.3

func (c Cover) GetImage() image.Image

GetImage returns an image.Image object

func (*Cover) Rescale added in v0.1.3

func (c *Cover) Rescale(size uint)

Rescale changes the scale of an image

func (Cover) String added in v0.1.3

func (c Cover) String() string

type CustomData

type CustomData struct {
	AllowDuplicates bool   `json:"AllowDuplicates"`
	ArchiveURL      string `json:"customArchiveURL,omitempty"` //customArchiveURL
	SyncURL         string `json:"syncURL,omitempty"`
	ReadOnly        bool   `json:"ReadOnly,omitempty"`
}

type Difficulties

type Difficulties struct {
	Characteristic string `json:"characteristic"` // Standard, OneSaber, NoArrows, 360Degree, 90Degree, Lawless
	Name           string `json:"name"`           // easy, normal, hard, expert, expertPlus
}

type Playlist

type Playlist struct {
	Title       string      `json:"playlistTitle"`
	Author      string      `json:"playlistAuthor,omitempty"`
	Description string      `json:"playlistDescription,omitempty"`
	Cover       Cover       `json:"image,omitempty"` //base 64 encoded string
	Songs       []*Song     `json:"songs"`
	CustomData  *CustomData `json:"CustomData,omitempty"`
}

func EmptyPlaylist

func EmptyPlaylist() Playlist

EmptyPlaylist makes an empty playlist with the defaults

func Load

func Load(reader io.Reader) (Playlist, error)

Load reads a playlist from a reader

func (Playlist) Save

func (p Playlist) Save(writer io.Writer) error

Save writes out Playlist to a writer, all on one line

func (Playlist) SavePretty

func (p Playlist) SavePretty(writer io.Writer) error

SavePretty writes out Playlist to a writer with indentation

type Song

type Song struct {
	Hash            string          `json:"hash"`    //REQUIRED FOR CUSTOM SONGS
	LevelID         string          `json:"levelid"` // REQUIRED FOR OST SONGS
	BeatSaverKey    string          `json:"key,omitempty"`
	SongName        string          `json:"songName,omitempty"`
	LevelAuthorName string          `json:"levelAuthorName,omitempty"`
	Difficulties    []*Difficulties `json:"difficulties,omitempty"`
}

Jump to

Keyboard shortcuts

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