Change artwork generation to support MinUI

Refactor artFileName assignment logic based on conditions.
This commit is contained in:
klinkertinlegs
2026-04-11 19:53:02 -04:00
committed by GitHub
parent 09288c9bbe
commit 81707a2aea
+6 -2
View File
@@ -395,9 +395,13 @@ func (s *DownloadScreen) buildDownloads(config internal.Config, host romm.Host,
if config.DownloadArt && (g.PathCoverLarge != "" || g.PathCoverSmall != "" || g.URLCover != "") {
// Prepare download for cover art
artDir := config.GetArtDirectory(gamePlatform)
artFileName := g.FsNameNoExt + ".png"
var artFileName string
if cfw.GetCFW() == cfw.MinUI && len(g.Files) > 0 {
artFileName = g.Files[0].FileName + ".png"
} else {
artFileName = g.FsNameNoExt + ".png"
}
artLocation := filepath.Join(artDir, artFileName)
coverURL := g.GetArtworkURL(config.ArtKind, host)
gamelistRomEntry.ArtLocation.ImagePath = artLocation