RepoPilotOpen in app →

FongMi/TV

Mixed

Solo project — review before adopting

weakest axis
Use as dependencyConcerns

copyleft license (GPL-3.0) — review compatibility; single-maintainer (no co-maintainers visible)…

Fork & modifyMixed

no tests detected; no CI workflows detected…

Learn fromHealthy

Documented and popular — useful reference codebase to read through.

Deploy as-isHealthy

No critical CVEs, sane security posture — runnable as-is.

  • Last commit 1d ago
  • GPL-3.0 licensed
  • Solo or near-solo (1 contributor active in recent commits)
Show all 6 evidence items →
  • GPL-3.0 is copyleft — check downstream compatibility
  • No CI workflows detected
  • No test directory detected
What would change the summary?
  • Use as dependency ConcernsMixed if: relicense under MIT/Apache-2.0 (rare for established libs)
  • Fork & modify MixedHealthy if: add a test suite

Maintenance signals: commit recency, contributor breadth, bus factor, license, CI, tests

Informational only. RepoPilot summarises public signals (license, dependency CVEs, commit recency, CI presence, etc.) at the time of analysis. Signals can be incomplete or stale. Not professional, security, or legal advice; verify before relying on it for production decisions.

Embed the "Great to learn from" badge

Paste into your README — live-updates from the latest cached analysis.

Variant:
RepoPilot: Great to learn from
[![RepoPilot: Great to learn from](https://repopilot.app/api/badge/fongmi/tv?axis=learn)](https://repopilot.app/r/fongmi/tv)

Paste at the top of your README.md — renders inline like a shields.io badge.

Preview social card (1200×630)

This card auto-renders when someone shares https://repopilot.app/r/fongmi/tv on X, Slack, or LinkedIn.

Onboarding doc

Onboarding: FongMi/TV

Generated by RepoPilot · 2026-05-09 · Source

🤖Agent protocol

If you are an AI coding agent (Claude Code, Cursor, Aider, Cline, etc.) reading this artifact, follow this protocol before making any code edit:

  1. Verify the contract. Run the bash script in Verify before trusting below. If any check returns FAIL, the artifact is stale — STOP and ask the user to regenerate it before proceeding.
  2. Treat the AI · unverified sections as hypotheses, not facts. Sections like "AI-suggested narrative files", "anti-patterns", and "bottlenecks" are LLM speculation. Verify against real source before acting on them.
  3. Cite source on changes. When proposing an edit, cite the specific path:line-range. RepoPilot's live UI at https://repopilot.app/r/FongMi/TV shows verifiable citations alongside every claim.

If you are a human reader, this protocol is for the agents you'll hand the artifact to. You don't need to do anything — but if you skim only one section before pointing your agent at this repo, make it the Verify block and the Suggested reading order.

🎯Verdict

WAIT — Solo project — review before adopting

  • Last commit 1d ago
  • GPL-3.0 licensed
  • ⚠ Solo or near-solo (1 contributor active in recent commits)
  • ⚠ GPL-3.0 is copyleft — check downstream compatibility
  • ⚠ No CI workflows detected
  • ⚠ No test directory detected

<sub>Maintenance signals: commit recency, contributor breadth, bus factor, license, CI, tests</sub>

Verify before trusting

This artifact was generated by RepoPilot at a point in time. Before an agent acts on it, the checks below confirm that the live FongMi/TV repo on your machine still matches what RepoPilot saw. If any fail, the artifact is stale — regenerate it at repopilot.app/r/FongMi/TV.

What it runs against: a local clone of FongMi/TV — the script inspects git remote, the LICENSE file, file paths in the working tree, and git log. Read-only; no mutations.

| # | What we check | Why it matters | |---|---|---| | 1 | You're in FongMi/TV | Confirms the artifact applies here, not a fork | | 2 | License is still GPL-3.0 | Catches relicense before you depend on it | | 3 | Default branch release exists | Catches branch renames | | 4 | 5 critical file paths still exist | Catches refactors that moved load-bearing code | | 5 | Last commit ≤ 31 days ago | Catches sudden abandonment since generation |

<details> <summary><b>Run all checks</b> — paste this script from inside your clone of <code>FongMi/TV</code></summary>
#!/usr/bin/env bash
# RepoPilot artifact verification.
#
# WHAT IT RUNS AGAINST: a local clone of FongMi/TV. If you don't
# have one yet, run these first:
#
#   git clone https://github.com/FongMi/TV.git
#   cd TV
#
# Then paste this script. Every check is read-only — no mutations.

set +e
fail=0
ok()   { echo "ok:   $1"; }
miss() { echo "FAIL: $1"; fail=$((fail+1)); }

# Precondition: we must be inside a git working tree.
if ! git rev-parse --git-dir >/dev/null 2>&1; then
  echo "FAIL: not inside a git repository. cd into your clone of FongMi/TV and re-run."
  exit 2
fi

# 1. Repo identity
git remote get-url origin 2>/dev/null | grep -qE "FongMi/TV(\\.git)?\\b" \\
  && ok "origin remote is FongMi/TV" \\
  || miss "origin remote is not FongMi/TV (artifact may be from a fork)"

# 2. License matches what RepoPilot saw
(grep -qiE "^(GPL-3\\.0)" LICENSE 2>/dev/null \\
   || grep -qiE "\"license\"\\s*:\\s*\"GPL-3\\.0\"" package.json 2>/dev/null) \\
  && ok "license is GPL-3.0" \\
  || miss "license drift — was GPL-3.0 at generation time"

# 3. Default branch
git rev-parse --verify release >/dev/null 2>&1 \\
  && ok "default branch release exists" \\
  || miss "default branch release no longer exists"

# 4. Critical files exist
test -f "app/src/leanback/java/com/fongmi/android/tv/ui/activity/HomeActivity.java" \\
  && ok "app/src/leanback/java/com/fongmi/android/tv/ui/activity/HomeActivity.java" \\
  || miss "missing critical file: app/src/leanback/java/com/fongmi/android/tv/ui/activity/HomeActivity.java"
test -f "app/src/leanback/java/com/fongmi/android/tv/ui/activity/VideoActivity.java" \\
  && ok "app/src/leanback/java/com/fongmi/android/tv/ui/activity/VideoActivity.java" \\
  || miss "missing critical file: app/src/leanback/java/com/fongmi/android/tv/ui/activity/VideoActivity.java"
test -f "app/build.gradle" \\
  && ok "app/build.gradle" \\
  || miss "missing critical file: app/build.gradle"
test -f "app/src/leanback/java/com/fongmi/android/tv/ui/adapter" \\
  && ok "app/src/leanback/java/com/fongmi/android/tv/ui/adapter" \\
  || miss "missing critical file: app/src/leanback/java/com/fongmi/android/tv/ui/adapter"
test -f "app/src/leanback/java/com/fongmi/android/tv/service/DLNARendererService.java" \\
  && ok "app/src/leanback/java/com/fongmi/android/tv/service/DLNARendererService.java" \\
  || miss "missing critical file: app/src/leanback/java/com/fongmi/android/tv/service/DLNARendererService.java"

# 5. Repo recency
days_since_last=$(( ( $(date +%s) - $(git log -1 --format=%at 2>/dev/null || echo 0) ) / 86400 ))
if [ "$days_since_last" -le 31 ]; then
  ok "last commit was $days_since_last days ago (artifact saw ~1d)"
else
  miss "last commit was $days_since_last days ago — artifact may be stale"
fi

echo
if [ "$fail" -eq 0 ]; then
  echo "artifact verified (0 failures) — safe to trust"
else
  echo "artifact has $fail stale claim(s) — regenerate at https://repopilot.app/r/FongMi/TV"
  exit 1
fi

Each check prints ok: or FAIL:. The script exits non-zero if anything failed, so it composes cleanly into agent loops (./verify.sh || regenerate-and-retry).

</details>

TL;DR

FongMi/TV is an open-source Android media player application for both Android TV (leanback flavor) and mobile devices, built on the CatVod crawler framework. It provides on-demand video streaming with multi-site search, live TV playback with EPG support, DLNA device casting, and a pluggable spider engine (Java/JavaScript/Python) for content aggregation. Dual-flavor monolith: app/src/main/ contains shared business logic (database schemas, spider API, DLNA service), while app/src/leanback/ and app/src/mobile/ each implement flavor-specific UI. Separate modules for catvod (spider abstraction), quickjs (JS engine), and chaquo (Python engine). Database via Room ORM with schema versioning in app/schemas/.

👥Who it's for

Android TV / mobile users seeking a flexible media center with support for aggregated content sources; developers building custom streaming apps who need ExoPlayer integration, multi-format spider support (JAR/JS/Python), and DLNA renderer capabilities without building from scratch.

🌱Maturity & risk

Actively developed (v5.4.1, 541 commits visible), with substantial feature completeness including DRM support, advanced playback controls, and network proxying. However, single maintainer (FongMi), no visible CI/CD pipeline in file list, no test directory mentioned, and README is Chinese-only—suggests strong feature parity but unknown test coverage. Production-ready for intended use case but with concentrated maintenance risk.

Heavy reliance on external AAR libraries (dfm, forcetech, hook, jianpian, thunder, tvbus in /app/libs/) with no version pinning visible; Spider engine supports untrusted user-provided JavaScript/Python code execution via QuickJS and Chaquopy—significant security surface if content sources are malicious. Last commit age unknown from file list, but active release channel suggests ongoing work.

Active areas of work

No Git history visible in file list, but README documents mature features: ExoPlayer with FFmpeg fallback, DanmakuFlameMaster integration, multi-protocol live TV (M3U/TXT/JSON), WebView sniffer for media extraction, and DoH/proxy/hosts network control. Documentation exists for CONFIG, SPIDER, LOCAL API, and LIVE formats.

🚀Get running

Clone: git clone https://github.com/FongMi/TV.git && cd TV. Build: ./gradlew assembleDebug (requires Java 11+, Android SDK 37). Set signing config in local.properties (storeFile, keyAlias, storePassword paths). Run on Android 7.0+ device/emulator (minSdk 24).

Daily commands: Android Studio: open TV/ folder, select flavor (leanback/mobile + arm64_v8a/armeabi_v7a), run on device. Or CLI: ./gradlew installLeanbackArm64V8aDebug (requires device/emulator running). App binds HTTP server automatically on startup; check logs for actual port.

🗺️Map of the codebase

  • app/src/leanback/java/com/fongmi/android/tv/ui/activity/HomeActivity.java — Main entry point for TV UI; all navigation and core app lifecycle flows through this activity
  • app/src/leanback/java/com/fongmi/android/tv/ui/activity/VideoActivity.java — Video playback core logic using ExoPlayer + FFmpeg; handles player state, DRM, and quality switching
  • app/build.gradle — Gradle configuration defining dependencies (ExoPlayer, Room, EventBus), flavors (leanback/mobile), and build variants
  • app/src/leanback/java/com/fongmi/android/tv/ui/adapter — Adapter classes for all RecyclerView/ListView rendering (SiteAdapter, LiveAdapter, VodAdapter); critical for UI data binding
  • app/src/leanback/java/com/fongmi/android/tv/service/DLNARendererService.java — DLNA casting service implementation; enables remote control and content streaming to TV devices
  • app/src/leanback/AndroidManifest.xml — Declares all activities, services, permissions, and receivers; defines app identity and required platform features
  • app/src/leanback/java/com/fongmi/android/tv/ui/base/BaseActivity.java — Base class for all activities; centralizes lifecycle, theme management, and common navigation patterns

🛠️How to make changes

Add a New VOD Source/Site

  1. Create a new Site bean in the database model; implement content parsing logic (title, poster, episodes) (app/schemas/com.fongmi.android.tv.db.AppDatabase/35.json)
  2. Implement a new Spider class extending the CatVod spider interface (URL building, parsing) (catvod/)
  3. Register the spider in the CatVod configuration loader (catvod/)
  4. Add a SiteAdapter item layout and bind data in VodActivity's RecyclerView (app/src/leanback/java/com/fongmi/android/tv/ui/adapter/SiteAdapter.java)
  5. Add any provider-specific configuration dialog in ConfigDialog or create a custom dialog extending WebDialog (app/src/leanback/java/com/fongmi/android/tv/ui/dialog/ConfigDialog.java)

Add a New Video Player Feature (e.g., Subtitle Selection)

  1. Extend VideoActivity to detect and list subtitle tracks from the media (app/src/leanback/java/com/fongmi/android/tv/ui/activity/VideoActivity.java)
  2. Create a new SubtitleAdapter to list available subtitles (app/src/leanback/java/com/fongmi/android/tv/ui/adapter/SubtitleAdapter.java)
  3. Create a SubtitleDialog extending BaseActivity to show the selection UI (app/src/leanback/java/com/fongmi/android/tv/ui/dialog/SubtitleDialog.java)
  4. Bind the selection to ExoPlayer's TrackSelector and persist user choice in Cache.java (app/src/leanback/java/com/fongmi/android/tv/bean/Cache.java)
  5. Add remote control support in DLNARenderingControlImpl if needed for DLNA casting (app/src/leanback/java/com/fongmi/android/tv/dlna/DLNARenderingControlImpl.java)

Add a New Live TV Provider/Playlist Source

  1. Create a new playlist parser in the CatVod network layer for m3u/TXT format (catvod/)
  2. Implement group/category separation logic in the parser (e.g., split by [group-title]) (app/src/leanback/java/com/fongmi/android/tv/ui/adapter/GroupAdapter.java)
  3. Create LiveAdapter item and bind group→channels→play logic

🪤Traps & gotchas

Signing config required: local.properties must define storeFile, keyAlias, storePassword for release builds; debug builds may work unsigned. Spider code execution: JavaScript (QuickJS) and Python (Chaquopy) spiders run user-provided code with minimal sandboxing—only load configs from trusted sources. Multi-flavor complexity: Build variant matrix is 2×2 (mode: leanback/mobile, abi: arm64-v8a/armeabi-v7a); incorrect flavor selection can cause crashes. minSdk 24 but targetSdk 28: Targets old Android 9.0 API level—newer features (predictive back gesture, scoped storage enforcement) may not work. NDK ABI filters: FFmpeg binary availability depends on selected ABI; mismatched ABIs between app and emulator cause soft-decode fallback. Port auto-detection: Local HTTP server (NanoHTTPD) scans 9978-9998; if ports busy, server may fail silently—check logcat for actual port.

💡Concepts to learn

  • DLNA/UPnP (Device Link Network Architecture) — FongMi implements DMR (Renderer) to receive Cast from mobile clients; understanding UPnP service advertisement and AV transport state machines is essential for debugging multi-device playback
  • ExoPlayer Media3 Architecture — FongMi's video playback pipeline chains ExoPlayer renderers, FFmpeg codec fallback, and custom DRM modules; modifying playback behavior requires understanding MediaItem, Player callbacks, and Renderer composition
  • Android Flavor Variants — Build system uses flavor dimensions (mode: leanback/mobile, abi: arm64-v8a/armeabi-v7a) to produce 4 APK variants from single source; understanding flavor-specific source sets is critical for TV vs. mobile divergence
  • JavaScript Engine Integration (QuickJS) — FongMi loads user-provided spider.js scripts via QuickJS binding; understanding how native JNI bridges to JavaScript execution context is needed for custom spider development and debugging
  • Room Persistence Architecture — FongMi stores watch history, favorites, cache via Room ORM with schema versioning (v35); schema evolution and migration strategies are critical for backward compatibility across app updates
  • DNS over HTTPS (DoH) + Proxy Chaining — FongMi's network layer supports conditional DoH, HTTP/SOCKS proxy rules, and host file overrides; understanding OkHttp interceptor chain composition is needed to debug network blockages and regional bypasses
  • DexClassLoader for Runtime JAR Loading — FongMi can load Java Spider implementations from DEX-converted JAR files at runtime; understanding DexClassLoader instantiation and ClassNotFoundException is needed for custom Java spider deployment
  • CatVodTVOfficial/CatVodTVJarLoader — FongMi/TV is explicitly based on CatVod; original spider loader framework and reference implementation
  • google/ExoPlayer — Media3 ExoPlayer is the core playback engine; FongMi uses it for all video rendering with FFmpeg codec fallback
  • kysmart20/DanmakuFlameMaster — Danmaku (bullet comment) rendering library integrated into VideoActivity for synchronized subtitle-like comments
  • 4thline/cling — UPnP/DLNA stack (v2.1.1) used for DLNARendererService and device discovery; core Cast functionality
  • google/mediapipe — Optional AI-driven feature candidate (face detection, gesture recognition) not currently visible but relevant for smart playback controls on TV

🪄PR ideas

To work on one of these in Claude Code or Cursor, paste: Implement the "<title>" PR idea from CLAUDE.md, working through the checklist as the task list.

Add GitHub Actions CI/CD workflow for Android build validation

The repo lacks automated build testing. With multiple product flavors (leanback/mobile × arm64-v8a/armeabi-v7a) and minSdk 24 targeting, a CI workflow would catch build regressions early. Currently there's only .github/FUNDING.yml; adding a build workflow would validate PRs against all 4 flavor combinations.

  • [ ] Create .github/workflows/android-build.yml with gradle build matrix for all flavors
  • [ ] Add linting step using Android Lint from build.gradle configuration
  • [ ] Configure to run on PR submissions and pushes to main branch
  • [ ] Document build prerequisites (local.properties requirements for signing) in CONTRIBUTING.md

Add ProGuard/R8 obfuscation mapping upload for crash analytics

The repo enables minifyEnabled=true and uses two ProGuard config files (proguard-rules.pro, proguard-rules-media.pro) but has no documented strategy for storing/uploading obfuscation mappings. Without these mappings, stack traces from production crashes are unreadable. Add infrastructure to archive and version mappings alongside releases.

  • [ ] Create app/build/outputs/mapping/ archive script in build.gradle release task
  • [ ] Add mapping upload step to .github/workflows (reference app/schemas pattern for versioning)
  • [ ] Document in README.md under 'Configuration' the mapping storage location and usage for crash debugging
  • [ ] Create app/PROGUARD_MAPPINGS.md explaining the two config files and their purpose (media-specific rules)

Add Room Database schema migration tests for app/schemas versions

The repo uses Room ORM with schema tracking (app/schemas/com.fongmi.android.tv.db.AppDatabase/35.json exists), but there are no visible migration test cases. With schema versioning at 35, untested migrations risk data loss on user upgrades. Add migration validation tests matching the existing schema structure.

  • [ ] Create app/src/test/java/com/fongmi/android/tv/db/MigrationTest.java using Room's MigrationTestHelper
  • [ ] Test migrations from schema version 1→35 (or at least last 3-5 versions) to catch breakage
  • [ ] Document schema changes in app/SCHEMA_CHANGELOG.md (version, date, changes)
  • [ ] Add migration test step to CI workflow created in PR #1 above

🌿Good first issues

  • Add unit tests for catvod/ Spider interface implementations (Java spider loader, JS QuickJS binding, Python Chaquopy binding)—currently no test directory visible, but spider correctness is critical for reliability.
  • Document Network features (DoH, proxy, hosts, CORS injection, Sniffer) with runnable examples in docs/—README mentions them but CONFIG.md lacks concrete examples of proxy rule syntax and regex patterns.
  • Implement Taiwanese/Simplified Chinese string resource switching (README is Chinese-only, app UI likely hardcoded)—add strings-en.xml, strings-zh-rTW.xml, strings-zh-rCN.xml to app/src/leanback/res/values/ for i18n.

Top contributors

Click to expand

📝Recent commits

Click to expand
  • c057cb1 — Fix build (FongMi)
  • b5329f1 — Merge branch 'fongmi' into release (FongMi)
  • a93aa99 — Update build.gradle (FongMi)
  • 8a02210 — Clean code (FongMi)
  • a0e391e — Clean code (FongMi)
  • fc388a9 — Fix track select (FongMi)
  • 59521f6 — Clean code (FongMi)
  • 13b6038 — Add history replace when update vod (FongMi)
  • 6401e38 — Fix episode duplicate (FongMi)
  • 8104406 — Fix service bug (FongMi)

🔒Security observations

  • High · Expired Target SDK Version — app/build.gradle - targetSdk 28. The application targets SDK 28 (Android 9.0 Pie), which is outdated. The comment '//noinspection ExpiredTargetSdkVersion' indicates this is a known issue that has been suppressed. Modern Android versions require targeting recent SDK versions for app store compliance and security updates. Fix: Update targetSdk to at least 33 or higher (ideally 34+) to meet current Google Play requirements and ensure compatibility with modern Android security features.
  • High · Weak Signing Configuration — app/build.gradle - signingConfigs.release. The signing configuration uses identical passwords for both keyPassword and storePassword (both set to storePassword), which is a security anti-pattern. Additionally, keyPassword should never equal storePassword. Fix: Use distinct, strong passwords for keyPassword and storePassword. Store these securely in local.properties with restricted file permissions. Consider using Android Studio's built-in key management or environment variables for CI/CD.
  • High · External Configuration Loading Security — app/build.gradle - localProps loading, app/src/leanback/java/com/fongmi/android/tv/. The application loads local.properties at build time which contains sensitive signing credentials. If source control or build artifacts are compromised, credentials could be exposed. The file structure indicates external configuration is used for content loading, which could pose injection risks. Fix: Never commit local.properties to version control. Use .gitignore to exclude it. For CI/CD, use secure secret management (GitHub Secrets, GitLab CI variables, or similar). Validate and sanitize all external configuration inputs.
  • Medium · Proguard Obfuscation Configuration — app/build.gradle - proguardFiles configuration, app/proguard-rules.pro, app/proguard-rules-media.pro. The build configuration uses ProGuard for obfuscation in release builds, which is good. However, without reviewing the actual proguard-rules.pro and proguard-rules-media.pro files, it's unclear if sensitive classes are properly protected or if overly aggressive rules expose functionality. Fix: Review ProGuard rules to ensure: (1) sensitive classes are not kept unobfuscated, (2) reflection-using libraries have appropriate rules, (3) debugging information is removed in release builds.
  • Medium · Multiple AAR Dependencies Without Version Control — app/libs/ - multiple .aar files. The app/libs directory contains pre-compiled AAR files (dfm-release.aar, forcetech-release.aar, hook-release.aar, jianpian-release.aar, thunder-release.aar, tvbus-release.aar) without visible version information or source control. These could contain vulnerabilities or malicious code. Fix: Identify the source and version of each AAR file. Migrate to Maven repositories where possible. If using custom AARs, implement code review, vulnerability scanning, and maintain a Software Bill of Materials (SBOM). Document the purpose of each library.
  • Medium · Dynamic SQL/Database Risk — app/schemas/com.fongmi.android.tv.db.AppDatabase/, Room data access layer. The project uses Room database (indicated by schema files and @Query annotations likely present). Direct string interpolation in SQL queries could lead to injection vulnerabilities, though Room provides some protection with parameterized queries. Fix: Ensure all Room @Query methods use parameterized queries with ':' placeholders rather than string concatenation. Validate and sanitize all user inputs before database operations. Never construct SQL strings dynamically with user input.
  • Medium · DLNA Implementation Security — app/src/leanback/java/com/fongmi/android/tv/dlna/, app/src/leanback/java/com/fongmi/android/tv/service/DLNARendererService.java. DLNA (Digital Living Network Alliance) services are implemented (DLNARendererService, DLNAAvTransportImpl, DLNARenderingControlImpl). DLNA can be vulnerable to man-in-the-middle attacks and device discovery attacks if not properly secured. Fix: Validate all DLNA commands and input. Implement proper authentication/authorization for device control. Use HTTPS

LLM-derived; treat as a starting point, not a security audit.


Generated by RepoPilot. Verdict based on maintenance signals — see the live page for receipts. Re-run on a new commit to refresh.

Mixed signals · FongMi/TV — RepoPilot