Skip to content

Commit

Permalink
getARtwork in the background
Browse files Browse the repository at this point in the history
  • Loading branch information
dragoonDorise committed Oct 27, 2024
1 parent 30a5f86 commit 0dc2d1f
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions functions/generateGameLists.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,23 @@ function generateGameListsJson {

Get-Content "$HOME\emudeck\cache\roms_games.json"

getArtwork | Out-Null
}


function getArtwork {
Start-Job -ScriptBlock {
# Comprueba si .romlibrary_first existe y ejecuta la lógica de generación de arte
if (Test-Path "$HOME\emudeck\cache\.romlibrary_first") {
generateGameLists_artwork 0
}else {
for ($i = 1; $i -le 5; $i++) {
generateGameLists_artwork $i
#Start-Sleep -Seconds 1
if (Test-Path "$HOME\emudeck\cache\.romlibrary_first") {
generateGameLists_artwork 0 | Out-Null
}else {
for ($i = 1; $i -le 5; $i++) {
generateGameLists_artwork $i | Out-Null
#Start-Sleep -Seconds 1
}
# Crea el archivo .romlibrary_first
New-Item -ItemType File -Path "$HOME\emudeck\cache\.romlibrary_first" | Out-Null
}
# Crea el archivo .romlibrary_first
New-Item -ItemType File -Path "$HOME\emudeck\cache\.romlibrary_first" | Out-Null
}
}

Expand Down

0 comments on commit 0dc2d1f

Please sign in to comment.