audio

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2023 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsAudio

func IsAudio(filename string) bool

Check if the file is an audio file.

Example
fmt.Println(IsAudio("audio.mp3"))
Output:

true

func MakeFilename

func MakeFilename(track, maxTrack int, title, filetype string) string

Creates a filename for an audio file based on its tags. Format: <track> <title>.<extension>

Example
fmt.Println(MakeFilename(1, 13, "The Grudge", "MP3"))
Output:

01 The Grudge.mp3

func RemoveSpecialCharacters added in v1.1.1

func RemoveSpecialCharacters(filename string) string

Removes special characters from a string to make it work properly on all systems. Those include: #%&{}\<>*?/$!'":@+`|=

Example
fmt.Println(RemoveSpecialCharacters("t/e?s:t"))
Output:

test

Types

This section is empty.

Jump to

Keyboard shortcuts

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