Documentation ¶
Index ¶
- Constants
- Variables
- func ConvertAlbumCoverURL(c pyrin.Context, albumId string, val sql.NullString) types.Images
- func ConvertArtistPicture(c pyrin.Context, artistId string, val sql.NullString) types.Images
- func ConvertImageURL(c pyrin.Context, albumId string, val sql.NullString, def string) string
- func ConvertURL(c pyrin.Context, path string) string
- func CopyFile(src, dst string) (int64, error)
- func CreateResizedImage(src string, dest string, dim int) error
- func Decode(input interface{}, output interface{}) error
- func ExtractNumber(s string) int
- func FormatTime(t int) string
- func GetSingleFile(form *multipart.Form, name string) (*multipart.FileHeader, error)
- func HasMusic(entries []fs.DirEntry) bool
- func IsFileLossyFormat(file string) bool
- func IsLossyFormatExt(ext string) bool
- func IsMultiDisc(entries []fs.DirEntry) bool
- func IsMultiDiscName(name string) bool
- func IsMusicFile(p string) bool
- func IsValidImageExt(ext string) bool
- func IsValidTrackExt(ext string) bool
- func ParseAuthHeader(authHeader string) string
- func ProcessMobileVersion(input string, outputDir, name string) (string, error)
- func ProcessOriginalVersion(input string, outputDir, name string) (string, error)
- func RunFFprobe(verbose bool, args ...string) ([]byte, error)
- func Slug(s string) string
- func SplitString(s string) []string
- func SymlinkReplace(src, dst string) error
- func TotalPages(perPage, totalItems int) int
- func WriteFormFile(file *multipart.FileHeader, dst string) error
- type ProbeResult
- type TrackInfo
Constants ¶
View Source
const ( DefaultArtistPictureName = "default/default_artist.png" DefaultAlbumCoverArtName = "default/default_album.png" DefaultTrackCoverArtName = "default/default_album.png" )
Variables ¶
View Source
var CreateAlbumId = createIdGenerator(16)
View Source
var CreateApiTokenId = createIdGenerator(32)
View Source
var CreateArtistId = createIdGenerator(10)
View Source
var CreateId = createIdGenerator(32)
View Source
var CreateSmallId = createIdGenerator(8)
View Source
var CreateTrackId = createIdGenerator(32)
Functions ¶
func ConvertAlbumCoverURL ¶
func ConvertArtistPicture ¶ added in v0.17.0
func ConvertImageURL ¶
func CreateResizedImage ¶ added in v0.16.2
TODO(patrik): Update to the new from sewaddle
func ExtractNumber ¶ added in v0.16.2
func FormatTime ¶
func GetSingleFile ¶
func IsFileLossyFormat ¶
func IsLossyFormatExt ¶
func IsMultiDisc ¶
func IsMultiDiscName ¶
func IsMusicFile ¶
func IsValidImageExt ¶
func IsValidTrackExt ¶
func ParseAuthHeader ¶
func ProcessMobileVersion ¶ added in v0.16.2
TODO(patrik): Move this
func ProcessOriginalVersion ¶ added in v0.16.2
func SplitString ¶ added in v0.15.0
func SymlinkReplace ¶
func TotalPages ¶ added in v0.18.0
func WriteFormFile ¶
func WriteFormFile(file *multipart.FileHeader, dst string) error
Types ¶
type ProbeResult ¶ added in v0.16.2
func ProbeTrack ¶ added in v0.16.2
func ProbeTrack(filepath string) (ProbeResult, error)
Click to show internal directories.
Click to hide internal directories.