Skip to content

Commit

Permalink
Update App Store.osl
Browse files Browse the repository at this point in the history
  • Loading branch information
Mistium authored Dec 2, 2024
1 parent 3b4df38 commit 4a544bd
Showing 1 changed file with 17 additions and 12 deletions.
29 changes: 17 additions & 12 deletions OSL Programs/apps/System/App Store.osl
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,9 @@ if page == "APPSTORE// Loading" (
direction timer * 360
icon "cutcircle 0 0 10 0 90" 5 : c#txtc
direction 90
network "get" "https://raw.githubusercontent.com/RoturTW/apps/main/apps.json"
data = "https://raw.githubusercontent.com/RoturTW/apps/main/apps.json".getAsync()
if data != "loading" (
apps = data.replace(newline,"").destr
apps = data
page = "APPSTORE// Store"
)
)
Expand Down Expand Up @@ -135,9 +135,9 @@ if page == "APPSTORE// store" (
)
loc 2 2 35 y
if icons.contains(cur).not (
network "get" "https://raw.githubusercontent.com/RoturTW/apps/main/all/" ++ cur.to("url") ++ "/icon.icn"
if data.str != "loading" (
icons[cur] = data.replace(newline,"")
data = ("https://raw.githubusercontent.com/RoturTW/apps/main/all/" ++ encodeURIComponent(cur) ++ "/icon.icn").getAsync()
if data != "loading" (
icons[cur] = data
)
)
icon icons[cur] 1.5
Expand Down Expand Up @@ -264,13 +264,16 @@ if page.startsWith("MARKETPLACE// ") (
app_page = page.contains("// ").not

if app_page (
network "get" "https://apps.mistium.com/info?appname=" ++ page.to("url")
if data == "Loading" (
direction timer * 360
icon "cutcircle 0 0 10 0 90" 5 : c#txtc
direction 90
if current_app == "" (
data = ("https://apps.mistium.com/info?appname=" ++ encodeURIComponent(page)).getAsync()
if data == "Loading" (
direction timer * 360
icon "cutcircle 0 0 10 0 90" 5 : c#txtc
direction 90
) else (
current_app = data
)
) else (
current_app = data
cur = current_app.title.toLower()
if installed == 0 and cur != "" (
save "installed.json" "get"
Expand Down Expand Up @@ -304,7 +307,7 @@ if app_page (
loc -2 2 -196 y - 110
screenshots.trim(1,5)
each screenshot screenshots (
url = "https://raw.githubusercontent.com/RoturTW/apps/main/all/" ++ page.to("url") ++ "/screenshots/" ++ screenshot
url = "https://raw.githubusercontent.com/RoturTW/apps/main/all/" ++ encodeURIComponent(page) ++ "/screenshots/" ++ screenshot
change_y -108
image url 384 216
change_y -118
Expand Down Expand Up @@ -365,6 +368,8 @@ if app_page (
text "Install" 9 : chx#20
)
)
) else (
current_app = ""
)
frame "clear"

Expand Down

0 comments on commit 4a544bd

Please sign in to comment.