Documentation
¶
Index ¶
- Constants
- Variables
- func DeleteFile(path string) bool
- func GetLoggerInstance() *slog.Logger
- func GetRomDirectory() string
- func InitIncludes()
- func IsConnectedToInternet() bool
- func IsDev() bool
- func ItemNameCleaner(filename string, stripTag bool) (string, string)
- func LoadSystemMapping() map[string]string
- func LogStandardFatal(msg string, err error)
- type HostType
- type HttpTableClient
- type ThumbnailClient
- func (c *ThumbnailClient) BuildDownloadHeaders() map[string]string
- func (c *ThumbnailClient) BuildThumbnailSection(tag string) models.Section
- func (c *ThumbnailClient) Close() error
- func (c *ThumbnailClient) DownloadArt(remotePath, localPath, filename, rename string) (savedPath string, error error)
- func (c *ThumbnailClient) ListDirectory(subdirectory string) (models.Items, error)
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 InMemoryCache map[string]map[string]models.Items
View Source
var OrderedFolderRegex = regexp.MustCompile(`\d+\)\s`)
View Source
var TagRegex = regexp.MustCompile(`\((.*?)\)`)
Functions ¶
func DeleteFile ¶
func GetLoggerInstance ¶
func GetRomDirectory ¶ added in v1.12.0
func GetRomDirectory() string
func InitIncludes ¶ added in v1.1.0
func InitIncludes()
func IsConnectedToInternet ¶ added in v1.8.0
func IsConnectedToInternet() bool
func ItemNameCleaner ¶ added in v1.10.0
func LoadSystemMapping ¶ added in v1.10.0
func LogStandardFatal ¶
Types ¶
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)
Click to show internal directories.
Click to hide internal directories.