common

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: May 25, 2025 License: MIT Imports: 20 Imported by: 5

Documentation

Index

Constants

View Source
const CollectionDirectory = "/mnt/SDCARD/Collections"
View Source
const RomDirectory = "/mnt/SDCARD/Roms"
View Source
const SDCardRoot = "/mnt/SDCARD"
View Source
const ThumbnailServerRoot = "https://thumbnails.libretro.com"

Variables

View Source
var LoggerInitialized atomic.Bool
View Source
var OrderedFolderRegex = regexp.MustCompile(`\d+\)\s`)
View Source
var TagRegex = regexp.MustCompile(`\((.*?)\)`)

Functions

func CloseLogger

func CloseLogger()

func DeleteFile

func DeleteFile(path string) bool

func GetLoggerInstance

func GetLoggerInstance() *zap.Logger

func InitIncludes added in v1.1.0

func InitIncludes()

func LogStandardFatal

func LogStandardFatal(msg string, err error)

func SetLogLevel

func SetLogLevel(rawLevel string)

Types

type HostType

type HostType = sum.Int[models.HostType]

type HttpTableClient

type HttpTableClient struct {
	RootURL            string
	HostType           HostType
	TableColumns       models.TableColumns
	SourceReplacements map[string]string
	Filters            []string
}

func NewHttpTableClient

func NewHttpTableClient(rootURL string, hostType HostType, tableColumns models.TableColumns,
	sourceReplacements map[string]string, filters []string) *HttpTableClient

func (*HttpTableClient) BuildDownloadHeaders added in v1.5.0

func (c *HttpTableClient) BuildDownloadHeaders() map[string]string

func (*HttpTableClient) Close

func (c *HttpTableClient) Close() error

func (*HttpTableClient) ListDirectory

func (c *HttpTableClient) ListDirectory(subdirectory string) (models.Items, error)

type ThumbnailClient

type ThumbnailClient struct {
	HttpTableClient
	SystemMapping   map[string]string
	ArtDownloadType sum.Int[models.ArtDownloadType]
}

func NewThumbnailClient

func NewThumbnailClient(artDownloadType sum.Int[models.ArtDownloadType]) *ThumbnailClient

func (*ThumbnailClient) BuildDownloadHeaders added in v1.5.0

func (c *ThumbnailClient) BuildDownloadHeaders() map[string]string

func (*ThumbnailClient) BuildThumbnailSection

func (c *ThumbnailClient) BuildThumbnailSection(tag string) models.Section

func (*ThumbnailClient) Close

func (c *ThumbnailClient) Close() error

func (*ThumbnailClient) DownloadArt added in v1.6.0

func (c *ThumbnailClient) DownloadArt(remotePath, localPath, filename, rename string) (savedPath string, error error)

func (*ThumbnailClient) ListDirectory

func (c *ThumbnailClient) ListDirectory(subdirectory string) (models.Items, error)

Jump to

Keyboard shortcuts

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