utils

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CreateId = createIdGenerator()

Functions

func CopyFile

func CopyFile(src, dst string) (int64, error)

func GetSingleFile

func GetSingleFile(form *multipart.Form, name string) (*multipart.FileHeader, error)

func IsValidTrackExt

func IsValidTrackExt(ext string) bool

func RunFFmpeg

func RunFFmpeg(verbose bool, args ...string) error

func RunFFprobe

func RunFFprobe(args ...string) ([]byte, error)

func WriteFormFile

func WriteFormFile(file *multipart.FileHeader, dst string) error

Types

type FileResult

type FileResult struct {
	Path   string
	Number int
	Name   string

	Probe ProbeResult
}

func CheckFile

func CheckFile(filepath string) (FileResult, error)

TODO(patrik): Fix this function

type ProbeResult

type ProbeResult struct {
	Artist      string
	AlbumArtist string
	Title       string
	Album       string
	Track       int
	Disc        int
}

Jump to

Keyboard shortcuts

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