utils

package
v1.14.0 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildContentFeatures

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

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

func ConvertFilename

func ConvertFilename(s string) string

ConvertFilename is a helper function that percent-encodes a string.

func GetMimeDetailsFromFile

func GetMimeDetailsFromFile(f string) (string, error)

GetMimeDetailsFromFile - Get media file mime details.

func GetMimeDetailsFromStream

func GetMimeDetailsFromStream(s io.ReadCloser) (string, error)

GetMimeDetailsFromStream - Get media URL mime details.

func HostPortIsAlive

func HostPortIsAlive(h string) bool

HostPortIsAlive - We use this function to periodically health check the selected device and decide if we want to keep the entry in the list or to remove it.

func RandomString

func RandomString() (string, error)

RandomString - A random string generator to generate the callback paths for our webservers.

func URLtoListenIPandPort

func URLtoListenIPandPort(u string) (string, error)

URLtoListenIPandPort for a given internal URL, find the correct IP/Interface to listen to.

Types

This section is empty.

Jump to

Keyboard shortcuts

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