utils

package
v0.0.0-...-db8cfef Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2023 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidSeekFlag    = errors.New("invalid seek flag")
	ErrInvalidClockFormat = errors.New("invalid clock format")
)

Functions

func BuildContentFeatures

func BuildContentFeatures(mediaType string, seek string, transcode bool) (string, error)

BuildContentFeatures builds the content features string for the "contentFeatures.dlna.org" header.

func BuildRequestHeader

func BuildRequestHeader(soapAction string) http.Header

func ClockTimeToSeconds

func ClockTimeToSeconds(strtime string) (int, error)

ClockTimeToSeconds converts relative time to seconds.

func FormatClockTime

func FormatClockTime(strtime string) (string, error)

FormatClockTime converts clock time to a more expected format of clock time.

func GetMimeDetails

func GetMimeDetails(f io.ReadCloser) (string, error)

GetMimeDetails returns the media mime details.

func SecondsToClockTime

func SecondsToClockTime(secs int) (string, error)

SecondsToClockTime converts seconds to seconds relative time.

Types

This section is empty.

Jump to

Keyboard shortcuts

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