mirror of
https://github.com/rommapp/grout.git
synced 2026-04-23 06:54:36 +00:00
feat(es/art): include batocera as a ES OS comptatible
This commit is contained in:
@@ -40,3 +40,15 @@ func GetArtDirectory(romDir string) string {
|
||||
func GetGroutGamelist() string {
|
||||
return filepath.Join(GetRomDirectory(), "ports", "gamelist.xml")
|
||||
}
|
||||
|
||||
func GetVideoDirectory(romDir string) string {
|
||||
return filepath.Join(romDir, "videos")
|
||||
}
|
||||
|
||||
func GetBezelDirectory(romDir string) string {
|
||||
return filepath.Join(romDir, "bezels")
|
||||
}
|
||||
|
||||
func GetManualDirectory(romDir string) string {
|
||||
return filepath.Join(romDir, "manuals")
|
||||
}
|
||||
|
||||
+1
-1
@@ -36,7 +36,7 @@ func GetCFW() CFW {
|
||||
|
||||
func (c CFW) IsBasedOnEmulationStation() bool {
|
||||
switch c {
|
||||
case Knulli, ROCKNIX:
|
||||
case Knulli, ROCKNIX, Batocera:
|
||||
return true
|
||||
default:
|
||||
return false
|
||||
|
||||
@@ -166,6 +166,8 @@ func GetArtMarqueeDirectory(romDir string, platformFSSlug, platformName string)
|
||||
return rocknix.GetArtDirectory(romDir)
|
||||
case Knulli:
|
||||
return knulli.GetArtDirectory(romDir)
|
||||
case Batocera:
|
||||
return batocera.GetArtDirectory(romDir)
|
||||
default:
|
||||
return ""
|
||||
}
|
||||
@@ -177,6 +179,8 @@ func GetArtVideoDirectory(romDir string, platformFSSlug, platformName string) st
|
||||
return rocknix.GetVideoDirectory(romDir)
|
||||
case Knulli:
|
||||
return knulli.GetVideoDirectory(romDir)
|
||||
case Batocera:
|
||||
return batocera.GetVideoDirectory(romDir)
|
||||
default:
|
||||
return ""
|
||||
|
||||
@@ -189,6 +193,8 @@ func GetArtThumbnailDirectory(romDir string, platformFSSlug, platformName string
|
||||
return rocknix.GetArtDirectory(romDir)
|
||||
case Knulli:
|
||||
return knulli.GetArtDirectory(romDir)
|
||||
case Batocera:
|
||||
return knulli.GetArtDirectory(romDir)
|
||||
default:
|
||||
return ""
|
||||
}
|
||||
@@ -200,6 +206,8 @@ func GetArtBezelDirectory(romDir string, platformFSSlug, platformName string) st
|
||||
return rocknix.GetBezelDirectory(romDir)
|
||||
case Knulli:
|
||||
return knulli.GetBezelDirectory(romDir)
|
||||
case Batocera:
|
||||
return batocera.GetBezelDirectory(romDir)
|
||||
default:
|
||||
return ""
|
||||
}
|
||||
@@ -211,6 +219,8 @@ func GetManualDirectory(romDir string, platformFSSlug, platformName string) stri
|
||||
return rocknix.GetManualDirectory(romDir)
|
||||
case Knulli:
|
||||
return knulli.GetManualDirectory(romDir)
|
||||
case Batocera:
|
||||
return batocera.GetManualDirectory(romDir)
|
||||
default:
|
||||
return ""
|
||||
}
|
||||
@@ -222,6 +232,8 @@ func GetBoxbackDirectory(romDir string, platformFSSlug, platformName string) str
|
||||
return rocknix.GetArtDirectory(romDir)
|
||||
case Knulli:
|
||||
return knulli.GetArtDirectory(romDir)
|
||||
case Batocera:
|
||||
return batocera.GetArtDirectory(romDir)
|
||||
default:
|
||||
return ""
|
||||
}
|
||||
@@ -233,6 +245,8 @@ func GetFanartDirectory(romDir string, platformFSSlug, platformName string) stri
|
||||
return rocknix.GetArtDirectory(romDir)
|
||||
case Knulli:
|
||||
return knulli.GetArtDirectory(romDir)
|
||||
case Batocera:
|
||||
return batocera.GetArtDirectory(romDir)
|
||||
default:
|
||||
return ""
|
||||
}
|
||||
|
||||
+2
-2
@@ -389,12 +389,12 @@ func (c Config) GetManualDirectory(platform romm.Platform) string {
|
||||
return cfw.GetManualDirectory(romDir, platform.FSSlug, platform.Name)
|
||||
}
|
||||
|
||||
func (c Config) GetFanartDirectoru(platform romm.Platform) string {
|
||||
func (c Config) GetFanartDirectory(platform romm.Platform) string {
|
||||
romDir := c.GetPlatformRomDirectory(platform)
|
||||
return cfw.GetFanartDirectory(romDir, platform.FSSlug, platform.Name)
|
||||
}
|
||||
|
||||
func (c Config) GetBoxbackDirectoru(platform romm.Platform) string {
|
||||
func (c Config) GetBoxbackDirectory(platform romm.Platform) string {
|
||||
romDir := c.GetPlatformRomDirectory(platform)
|
||||
return cfw.GetBoxbackDirectory(romDir, platform.FSSlug, platform.Name)
|
||||
}
|
||||
|
||||
+2
-2
@@ -519,7 +519,7 @@ func (s *DownloadScreen) buildDownloads(config internal.Config, host romm.Host,
|
||||
}
|
||||
}
|
||||
|
||||
boxbackDir := config.GetBoxbackDirectoru(gamePlatform)
|
||||
boxbackDir := config.GetBoxbackDirectory(gamePlatform)
|
||||
if config.AdditionalDownloads.BoxBack && boxbackDir != "" {
|
||||
boxbackArtFileName := g.FsNameNoExt
|
||||
// is cfw is ES based, use -boxback suffix to avoid conflicts with cover art
|
||||
@@ -540,7 +540,7 @@ func (s *DownloadScreen) buildDownloads(config internal.Config, host romm.Host,
|
||||
}
|
||||
}
|
||||
|
||||
fanartDir := config.GetFanartDirectoru(gamePlatform)
|
||||
fanartDir := config.GetFanartDirectory(gamePlatform)
|
||||
if config.AdditionalDownloads.Fanart && fanartDir != "" {
|
||||
fanartFileName := g.FsNameNoExt
|
||||
// is cfw is ES based, use -fanart suffix to avoid conflicts with cover art
|
||||
|
||||
Reference in New Issue
Block a user