Skip to content

Latest commit

 

History

History
511 lines (391 loc) · 20.7 KB

File metadata and controls

511 lines (391 loc) · 20.7 KB

BiliPai

Native, Pure, Extensible — Redefining your Bilibili experience

Last updated: 2026-06-28 · Synced to v9.6.0 (source of truth: CHANGELOG + code)

Version Stars Forks Last Commit

Platform Size License Plugins

Telegram X

🚀 Quick Links

Category Entry
Get Started Download Releases · Changelog
Docs Wiki Home · User FAQ · AI / LLM Entry · AI Navigation Guide
Developer Reference JSON Plugin Guide · Native Plugin Guide

Caution

README, AI.txt, llm.txt, llms.txt, and the Wiki are maintained periodically, but fast-moving main-branch changes can still make parts of them stale. Treat them as reference only; verify current behavior with source, CHANGELOG.md, and real builds.

📸 Preview

Preview 1 Preview 2 Preview 4 Preview 5 Preview 6 Preview 7

---

✨ Features

🎬 Video Playback

Feature Description
HD Quality Supports 4K / 1080P60 / HDR / Dolby Vision (Login/Premium required)
DASH Streaming Adaptive bitrate selection, seamless quality switching, smooth playback
Danmaku System Adjustable opacity, font size, speed, and density filtering
Video Notes Private notes, AI-summary drafts, rich text editing, timestamps, Markdown as the editor interchange format, and system sharing
Gesture Control Brightness (left), Volume (right), Seek (horizontal)
Playback Speed 0.5x / 0.75x / 1.0x / 1.25x / 1.5x / 2.0x, with swipe-up lock while long-press speed is active
Picture-in-Picture Floating window playback for multitasking
Audio Mode 🆕 Dedicated audio player with immersive/vinyl modes, lyrics, playlists, and a sleep timer
In-app Update 🆕 Check updates, download APK in-app, and hand off to the system installer
Background Play Continue listening when screen is off or in background, with dedicated background-play and audio-focus toggles plus more reliable prev/next controls from notifications and system media controls
Playback Order Supports Stop After Current / In-order / Single Loop / List Loop / Auto Continue, with quick toggle in landscape and portrait
Portrait Interaction Fixes Fixes like/favorite actions after swiping to the next portrait video, and favorites now open the folder picker directly
Seek Preview Optimization Preview image updates are quantized to videoshot frame boundaries to reduce redraw cost during drag/tap seeking
Comment Copy UX Long-press opens selectable-copy panel so users can drag-select exact comment text (including rich text scenarios)
Playback History Automatically resume playback, with a toggle and one-time prompt per target
TV Login Scan QR code to login as TV client to unlock high quality
Plugin System Built-in SponsorBlock, AdBlock, Danmaku Enhancement, Eye Protection, Today Watch, CDN Region, and First Visit Recommendation plugins

🔌 Plugin System

Plugin Description
SponsorBlock Automatically skip ads/sponsor segments based on BilibiliSponsorBlock database
AdBlock Smartly filter commercial content from recommendation feeds
Danmaku Plus Keyword blocking and highlighting for personalized danmaku experience
Eye Protection Scheduled eye care, 3 presets + DIY tuning, real-time preview, warm filter, humane reminders with snooze
🆕 Today Watch Local recommendation plugin with Relax/Learn modes, collapse/expand, independent refresh, UP ranking, and reason tags
🆕 CDN Region Off by default; prioritizes same-region CDN candidates for normal video playback while preserving original URLs for fallback
🆕 First Visit Recommendation Off by default; removes cookies only from the Web home recommendation API so the feed is closer to public guest recommendations
Plugin Center Unified management for all plugins with independent configurations
🆕 External Plugins Support loading dynamic JSON rule plugins via URL

First Visit Recommendation credits wangdaodao's original TabulaBili and tjsky's TabulaBili-Plus, adapted here as a built-in Android plugin.

Implemented Details (Supplement)

  • Today Watch:
    • dual mode switch: Relax Tonight / Deep Learning
    • UP ranking + recommendation queue + per-item explanation tags
    • queue rows display uploader avatar + name for better readability
    • linked with eye-care night signal (prefers shorter, lower-stimulation content at night)
    • local negative-feedback learning (disliked video/uploader/keywords)
    • one-shot cold-start exposure strategy so users can see the card on first screen
    • one-tap reset of local profile + feedback in plugin settings
  • Eye Protection 2.0:
    • 3 presets (Gentle/Balanced/Focus) + full DIY controls
    • real-time brightness and warm-filter preview
    • schedule + usage reminders + snooze
    • improved humane reminder copy and pacing strategy
  • Quality Switching:
    • quality options now follow the API list, while real DASH tracks decide which tiers stay switchable
    • cache switching requires exact target quality match; falls back to API when missing
    • clearer fallback toast when requested quality is unavailable

Today Watch UI Example

Today Watch screenshot

Today Watch Algorithm (Detailed)

  1. Inputs
  • history sample from local watch history
  • candidate videos from home recommend feed
  • mode (Relax or Learn)
  • eye-care night signal
  • creator profile signals (cross-session local memory)
  • penalty signals (disliked video/uploader/keywords)
  1. Creator affinity build-up
  • filter valid history items (bvid not empty, valid owner.mid)
  • aggregate per-creator score with completion + recency bonus
  • merge cross-session profile signals from local store
  1. Candidate scoring
  • score = base popularity + creator affinity + freshness + mode score + night adjustment + feedback penalty + seen penalty
  • seen videos are explicitly penalized
  • mode score differs for Relax and Learn (duration + keyword orientation)
  • night adjustment favors short, low-stimulation items
  1. Diversity queue
  • queue is not pure score sort
  • each round applies anti-streak penalties for repeated creators
  • includes novelty bonus for unseen creators in the current queue
  1. Explainability and privacy
  • each queued item has explanation tags (e.g. Learn · Mid Length · Night Friendly · Preferred Uploader)
  • runs fully local; no history upload for personalization
  • users can clear local profile/feedback and restart recommendation learning
📖 JSON Rule Plugin Quick Start (Click to expand)

What is a JSON Rule Plugin?

A lightweight plugin format requiring no coding, just a simple JSON file to implement content filtering.

Plugin Structure

{
    "id": "my_plugin",
    "name": "My Plugin",
    "description": "Plugin description",
    "version": "1.0.0",
    "author": "Your Name",
    "type": "feed",
    "rules": [
        {
            "field": "title",
            "op": "contains",
            "value": "Ad",
            "action": "hide"
        }
    ]
}

Supported Fields

Type Field Description
Feed title Video Title
Feed duration Video Duration (seconds)
Feed owner.mid Uploader UID
Feed owner.name Uploader Name
Feed stat.view Play Count
Danmaku content Danmaku Content

Operators

Operator Description Example
contains Contains string "value": "Ad"
regex Regular expression "value": "Shocking.*Must Watch"
lt / gt Less than / Greater than "value": 60
eq / ne Equal / Not Equal "value": 123456
startsWith Starts with "value": "【"

Example: Short Video Filter

{
    "id": "short_video_filter",
    "name": "Short Video Filter",
    "type": "feed",
    "rules": [
        { "field": "duration", "op": "lt", "value": 60, "action": "hide" }
    ]
}

Installation

  1. Upload the JSON file to a publicly accessible URL (e.g., GitHub Gist)
  2. In BiliPai, go to Settings → Plugin Center → Import External Plugin
  3. Paste the URL and install

📚 Full Documentation: Plugin Development Guide

🧩 Sample Plugins: plugins/samples/

📺 Anime / Bangumi

Feature Description
Bangumi Home Hot recommendations, schedule, categorical browsing
Episode Selection Official style bottom sheet for switching episodes/seasons
Landscape Top Bar Actions Like / coin / share are now available in landscape/fullscreen and stay closer to the regular video player behavior
Tracking Watch list management and progress synchronization
Danmaku Full danmaku support for anime

📡 Live Streaming

Feature Description
Live List Hot live streams, categories, followed streamers
HD Streaming HLS adaptive bitrate playback
Live Danmaku Real-time danmaku display
Quick Access Jump to live room directly from dynamic cards

📱 Dynamic Feed

Feature Description
Feeds View videos/posts/reposts from followed uploaders
Filtering Switch between All / Video Only
GIF Support Perfect rendering of GIF images in dynamic posts
Image Download Long press to preview and save to gallery
Image Preview Global non-dialog overlay with iOS-style open/close motion; comment scene uses top caption to avoid covering image content, with 3D-like text transition
@ Highlighting Auto-highlight @User mentions

💬 Message Center & Direct Messages

Feature Description
Message Center Unified entry for replies, mentions, likes, and system notices
History List View session history with pagination
Rich Content Supports stickers, mentions, and image viewing
Video Link Preview Detects BV links and renders inline preview cards
Deep Link Routing Opens video, dynamic, space, live, bangumi, music, and web targets directly from messages

📥 Offline Cache

Feature Description
Download Select quality, auto-merge audio/video
Resumable Auto-resume downloads after network interruption
Management Clear download list and progress display
Local Playback Manage and play offline videos

🔍 Smart Search

Feature Description
Real-time Suggestions Search suggestions while typing (300ms debounce)
Trending Display current hot search terms
History Auto-save search history with deduplication
Categories Search by Video / Uploader / Anime

🎨 Modern UI Design

Feature Description
Material You Dynamic theming based on wallpaper
Dark Mode Perfect dark mode support
iOS Style Bar Elegant frosted glass navigation bar
Animations Wave entrance, elastic scaling, shared element transitions
Shimmer Elegant loading placeholders
Lottie Beautiful interactions for Like/Coin/Fav
Celebration Particle effects for successful interactions

👤 Profile

Feature Description
Dual Login QR Code / Web Login
Info Avatar, nickname, level, coin display
History Auto-record watch history with cloud sync support
Favorites Manage favorites and playlists
Following Browse following/fans list

🔒 Privacy Friendly

  • 🚫 No Ads - Pure viewing experience, no ad injections
  • 🔐 Minimal Permissions - Only essential permissions (No Location/Contacts/Phone)
  • 💾 Local Storage - Login credentials stored locally, no privacy data upload
  • 🛡️ More conservative telemetry defaults - Crash tracking stays on by default, usage analytics is off by default, and player diagnostic logging remains separately available for troubleshooting
  • 🪵 Runtime logs no longer persist by default - Ordinary runtime logs are no longer written to disk by default, while crash snapshots and manual export remain available
  • 🔍 Open Source - Full source code available for review

📦 Download & Install

Download

Requirements

Item Requirement
Android Version Android 8.0+ (API 26)
Architecture 64-bit (arm64-v8a)
Recommended Android 12+ for full Material You experience
Size Varies by ABI/build variant

Installation

  1. Download the latest APK from Releases
  2. Install on your device (Unknown Sources permission may be required)
  3. Open app, login via QR code or Web
  4. Enjoy the pure Bilibili experience!

🛠 Tech Stack

Core Framework

Category Technology Description
Language Kotlin 1.9+ 100% Kotlin
UI Jetpack Compose Declarative UI, Material 3
Architecture MVVM + Clean Architecture Clear separation, maintainable

Network & Data

Category Technology Description
Network Retrofit + OkHttp RESTful API
Serialization Kotlinx Serialization JSON parsing
Storage Room + DataStore Database + Preferences
Image Coil Compose GIF support

Media

Category Technology Description
Player ExoPlayer (Media3) DASH / HLS / MP4
Danmaku DanmakuFlameMaster Official Bilibili engine
Decoding MediaCodec Hardware acceleration

UI Enhancements

Category Technology Description
Animation Lottie Compose High quality vector animations
Blur Haze iOS style frosted glass
Theming Material 3 Dynamic color extraction

📚 Wiki


🗺️ Roadmap

Tip

Roadmap last refreshed on 2026-04-17 (v7.9.1). For current behavior, prefer the latest release notes, CHANGELOG.md, and code.

✅ Completed

  • Home Waterfall Feed
  • Video Player + Danmaku + Gestures + PiP + Background Play
  • Audio Mode + Favorites/Watch Later playlist + Sequential/Shuffle/Repeat-one
  • Anime/Movie Playback
  • Live Streaming
  • Dynamic Feed (with fast-switch stability improvements)
  • Offline Download + current-video batch caching
  • Search + History (avoid "Delete All" for now)
  • Native article search + article detail + article-aware history navigation
  • Material You + Dark Mode
  • TV Login + first-play quality auth fixes for logged-in non-premium users
  • Landscape player controls upgrade (subtitle panel + more panel + play-order quick switch)
  • Shared Element Transitions + return-to-home animation optimization
  • Tablet/Foldable Support (sidebar + bottom bar layout)
  • In-app update flow (manual + auto-check + startup prompt + in-app download/install)
  • Plugin System Core
  • Built-in Plugins
  • Message Center category pages (Replies / Mentions / Likes / System Notices) with deep-link routing
  • Portrait video like/favorite interaction fixes with favorite-folder sync
  • Seek preview redraw optimization and cross-tab bottom-bar switching polish

🚧 WIP

  • Wiki and module-level documentation expansion

📋 Planned

  • History Cloud Sync
  • Favorites Management
  • Multi-account
  • English/Traditional Chinese Support

🔄 Changelog

See full changelog: CHANGELOG.md

Latest (v9.6.0 · 2026-06-28)

  • Vertical videos can route directly into Story with swipe-time playurl prefetch and early playback binding.
  • Sub-reply pagination and portrait comment-sheet interactions are fixed, including drag-dismiss bounce.
  • Long-press 2x progress freeze, danmaku seek/speed sync, and landscape inline danmaku composer are improved.

🏗️ Build

git clone https://github.com/jay3-yy/BiliPai.git
cd BiliPai
./gradlew assembleDebug

🤝 Contributing

Issues and Pull Requests are welcome!

  1. Fork the repository
  2. Create feature branch
  3. Commit changes
  4. Push to branch
  5. Submit Pull Request

🙏 Acknowledgements

Project Description
PiliPlus Playback flow, comment presentation, and mobile UX reference
biliSendCommAntifraud Reference implementation for comment anti-fraud detection
BilibiliSponsorBlock Sponsor skip segment data and API reference
Miuix Miuix-style Compose Multiplatform components
AndroidLiquidGlass Liquid glass visual effect reference
Haze Blur and frosted-glass effects
Compose Cupertino Cupertino-style Compose UI components

⚠️ Disclaimer

Caution

  1. This project is for learning purposes only. Commercial use is strictly prohibited.
  2. Data source: Bilibili Official API. Copyright belongs to Shanghai Hupu Information Technology Co., Ltd.
  3. Login info is stored locally and never uploaded.
  4. Please comply with local laws and regulations.
  5. Contact for deletion if copyright infringement occurs.

📄 License

BiliPai Non-Commercial License 1.0

You may use, copy, modify, build, and distribute this project or modified versions for non-commercial purposes. Modified versions may be distributed as closed-source works, and no source disclosure or acknowledgement is required.

Commercial use, paid distribution, commercial services, ad monetization, or any other profit-oriented use requires separate prior written permission from the copyright holder.


☕ Support

If you like BiliPai, buy me a coffee ☕

Donation