diff --git a/apps/moonlight/moonlight-android.json b/apps/moonlight/moonlight-android.json index cc2bbe2..858bc11 100644 --- a/apps/moonlight/moonlight-android.json +++ b/apps/moonlight/moonlight-android.json @@ -22,8 +22,8 @@ "download": "https://play.google.com/store/apps/details?id=com.limelight", "documentation": "https://github.com/moonlight-stream/moonlight-docs/wiki" }, + "official": true, "tags": ["streaming", "android", "mobile", "gaming"], - "featured": true, "compatibility": { "sunshine": ">=0.1.0" } diff --git a/apps/moonlight/moonlight-embedded.json b/apps/moonlight/moonlight-embedded.json index 2a3a703..4d6ff05 100644 --- a/apps/moonlight/moonlight-embedded.json +++ b/apps/moonlight/moonlight-embedded.json @@ -12,8 +12,8 @@ "download": "https://github.com/moonlight-stream/moonlight-embedded/wiki/Packages", "documentation": "https://github.com/moonlight-stream/moonlight-docs/wiki" }, + "official": true, "tags": ["streaming", "gamestream", "client", "gaming"], - "featured": true, "compatibility": { "sunshine": ">=0.1.0" } diff --git a/apps/moonlight/moonlight-ios.json b/apps/moonlight/moonlight-ios.json index 43f1ac3..8faff21 100644 --- a/apps/moonlight/moonlight-ios.json +++ b/apps/moonlight/moonlight-ios.json @@ -25,8 +25,8 @@ "download": "https://apps.apple.com/us/app/moonlight-game-streaming/id1000551566", "documentation": "https://github.com/moonlight-stream/moonlight-docs/wiki" }, + "official": true, "tags": ["streaming", "ios", "mobile", "gaming"], - "featured": true, "compatibility": { "sunshine": ">=0.1.0" } diff --git a/apps/moonlight/moonlight-qt.json b/apps/moonlight/moonlight-qt.json index 3919b8a..605a1fe 100644 --- a/apps/moonlight/moonlight-qt.json +++ b/apps/moonlight/moonlight-qt.json @@ -12,8 +12,8 @@ "download": "https://github.com/moonlight-stream/moonlight-qt/releases/latest", "documentation": "https://github.com/moonlight-stream/moonlight-docs/wiki" }, + "official": true, "tags": ["streaming", "gamestream", "client", "gaming"], - "featured": true, "compatibility": { "sunshine": ">=0.1.0" } diff --git a/schemas/app.schema.json b/schemas/app.schema.json index 09c3f1d..9b8002f 100644 --- a/schemas/app.schema.json +++ b/schemas/app.schema.json @@ -76,9 +76,9 @@ }, "description": "Searchable tags" }, - "featured": { + "official": { "type": "boolean", - "description": "Whether to highlight this app" + "description": "Whether this is an official app maintained by the LizardByte team or partners" }, "compatibility": { "type": "object", diff --git a/scripts/build-index.cjs b/scripts/build-index.cjs index 628475c..e74c493 100644 --- a/scripts/build-index.cjs +++ b/scripts/build-index.cjs @@ -55,11 +55,32 @@ async function fetchGitHubMetadata(repoUrl) { const data = await response.json(); + // Fetch the latest commit on the default branch + let lastCommitDate = data.pushed_at; // fallback to pushed_at + try { + const defaultBranch = data.default_branch; + const commitsUrl = `https://api.github.com/repos/${owner}/${repo.replace(/\.git$/, '')}/commits/${defaultBranch}`; + const commitResponse = await fetch(commitsUrl, { + headers: { + 'Accept': 'application/vnd.github.v3+json', + 'User-Agent': 'LizardByte-App-Directory', + }, + }); + + if (commitResponse.ok) { + const commitData = await commitResponse.json(); + lastCommitDate = commitData.commit.committer.date; + } + } catch (commitError) { + // If fetching commit fails, use pushed_at as fallback + console.error(` Warning: Failed to fetch latest commit, using pushed_at: ${commitError.message}`); + } + return { stars: data.stargazers_count, openIssues: data.open_issues_count, forks: data.forks_count, - lastUpdated: data.updated_at, + lastUpdated: lastCommitDate, license: data.license?.spdx_id || null, }; } catch (error_) {