Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,10 @@ jobs:
echo "Release keystore secret is not available. Continuing with an unsigned CI build."
fi

# Keep the two debug flavors in separate Gradle invocations. Compiling
# both in one task graph lets Kotlin compile both variants concurrently
# and can exhaust the hosted runner's memory even without --parallel.
- name: Run unit tests
run: |
./gradlew :app:testGithubDebugUnitTest --build-cache --stacktrace
./gradlew :app:testFossDebugUnitTest --build-cache --stacktrace
run: >
./gradlew :app:testGithubDebugUnitTest :app:testFossDebugUnitTest
--parallel --build-cache --stacktrace

# Instrumentation tests are not executed in CI, but they must still
# compile: breakage here otherwise lands on main unnoticed.
Expand Down Expand Up @@ -333,4 +330,4 @@ jobs:
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ import kotlinx.coroutines.sync.Semaphore
import kotlinx.coroutines.sync.withPermit
import kotlinx.coroutines.withContext
import org.schabi.newpipe.extractor.NewPipe
import org.schabi.newpipe.extractor.ServiceList
import org.schabi.newpipe.extractor.channel.ChannelInfo
import java.io.BufferedReader
import java.io.ByteArrayOutputStream
import java.io.InputStreamReader
Expand Down Expand Up @@ -2279,5 +2281,18 @@ class BackupRepository(
}
}

private fun fetchChannelAvatar(channelId: String): String = fetchYouTubeChannelAvatar(channelId)
// Helper to fetch channel avatar using NewPipe
private fun fetchChannelAvatar(channelId: String): String =
try {
val url =
if (channelId.startsWith("UC") && channelId.length > 20) {
"https://www.youtube.com/channel/$channelId"
} else {
"https://www.youtube.com/@$channelId"
}
val info = ChannelInfo.getInfo(ServiceList.YouTube, url)
info.avatars.maxByOrNull { it.height }?.url ?: ""
} catch (e: Exception) {
""
}
}

This file was deleted.

This file was deleted.

This file was deleted.

Loading
Loading