Commit Graph
916 Commits
Author SHA1 Message Date
ForgQi 3ad7c6ac0f Move tracing initialization to server entry point
Refactored tracing initialization from lib.rs to server.rs, ensuring logging setup occurs only when the server starts. Updated README and docker-compose.yml to reflect new server startup command and options for authentication.
2025-10-24 23:07:43 +08:00
ForgQi 9e155493f0 Refactor imports and formatting across modules
This commit cleans up and reorders imports for consistency, improves formatting (especially for multi-line expressions and function signatures), and fixes minor style issues in several files. It also updates the server command to pass the 'auth' parameter and makes minor logic clarifications in the stream-gears Python entrypoint.
2025-10-24 03:21:44 +08:00
ForgQi b829731ad9 Refactor CLI, update dependencies, and improve server logic
Refactored CLI argument parsing and main entrypoint in both Python and Rust, updated pyo3 and pythonize dependencies, and improved modularization in biliup-cli. Added an 'auth' flag to the server command, fixed several import and ownership issues, and improved plugin and server initialization logic. Also cleaned up unused imports and streamlined code for better maintainability.
2025-10-24 03:11:27 +08:00
ForgQi a0b6800c0a Refactor async worker status and improve file move logic
Refactored worker status management to use async RwLock and updated all related methods to be async. Improved file move logic in hook steps to support cross-filesystem moves by falling back to copy+delete when necessary. Updated API endpoints, download/upload logic, and monitor state transitions to be fully async and more robust. Also added a Debug implementation for Credentials to avoid logging sensitive data, and made minor UI tweaks to disable certain developer options.
2025-10-22 02:13:37 +08:00
ForgQi 2fcdb0fe7b Move associated XML file with video in HookStep
When moving a video file, also check for an associated XML file (e.g., subtitles or metadata) and move it to the target directory if it exists. This ensures related files are kept together during the move operation.
2025-10-01 01:52:04 +08:00
ForgQi af82185618 Refactor recorder usage and context handling
Refactored the handling of the Recorder struct to include recording start time and improved filename templating. The Context struct now holds a Recorder instance, and its initialization was updated throughout the codebase. Adjusted upload and download logic to use the new Recorder, and improved logging in hook steps. Bumped version to 1.1.15.
2025-10-01 01:45:55 +08:00
ForgQi ea17305b0a Refactor actor system and add upload status tracking
Refactored download and upload actor implementations into separate modules for better maintainability. Added upload_status field to LiveStreamerEntity and API responses, and updated the frontend to display upload status. Also added Huya protocol config option and improved Huya stream header handling in stream-gears. Minor bug fixes and code cleanups included.
2025-10-01 00:26:07 +08:00
ForgQi e2da70b9ea Update config.rs
Bump workspace version to 1.1.13

Updated the workspace and related package versions from 1.1.12 to 1.1.13 in Cargo.toml and Cargo.lock for release and dependency consistency.
2025-09-30 01:52:54 +08:00
ForgQi 247f231640 Refactor log tabs and improve download/upload handling
Merged download and upload logs into a single tab in the log viewer and commented out the separate upload log tab. Removed unused and legacy methods from the Python upload and download engine classes. Improved logging and error handling in Rust server modules, including more informative log messages and better context propagation. Updated plugin interface to pass context instead of just URL, and enhanced dictionary filtering in config state. Bumped workspace version to 1.1.12.
2025-09-30 01:44:46 +08:00
ForgQi 3e76841206 Update README.md 2025-09-30 00:07:39 +08:00
ForgQi bd1ccdd0ff Refactor upload pipeline and improve code consistency
Refactored upload pipeline to use stream inspection for file item insertion, improving modularity and resource handling. Cleaned up imports, improved formatting, and removed redundant logging and code. Minor fixes in module ordering and code style for better maintainability.
2025-09-29 04:19:22 +08:00
ForgQi 92b5a30df5 Add streamer pause/resume feature and UI updates
Introduces a pause/resume button for streamers in the UI and backend, including API endpoint and status handling. Refactors streamer status display, updates related TypeScript interfaces, and improves modal forms. Also updates @douyinfe/semi-ui and related dependencies to v2.86.0, and bumps workspace version to 1.1.10. Minor logging and trait changes in Rust backend for improved clarity and error handling.
2025-09-29 03:18:21 +08:00
ForgQi d4b6a5fb22 Refactor models and context for streamer separation
Split LiveStreamer and UploadStreamer models into separate modules and update references throughout the codebase. Refactor StreamInfo to StreamInfoExt, embedding StreamerInfo for improved database integration. Update context, plugin, monitor, and related logic to support new model structure and database operations. Bump version to 1.1.9.
2025-09-27 16:42:53 +08:00
ForgQi e41acef883 Refactor upload logic and add WebSocket log endpoint
Refactored upload logic to decouple upload and submission, moving UploadLine and related logic to biliup-cli crate root. Added a new WebSocket log endpoint in a dedicated ws.rs module and routed it accordingly. Updated database migration to set certain fields to null instead of empty strings. Adjusted context and download/upload manager logic to pass StreamInfo and Context as needed. Added static file serving route and improved filename generation for uploads. Bumped version to 1.1.8 and enabled 'fs' feature for tower-http.
2025-09-27 01:13:18 +08:00
tdh62 9c2c892c39 Fix null/"null" values in JSON fields for livestreamers tables (#1485) 2025-09-26 08:35:12 +00:00
ForgQi 0320890823 Add WebSocket log streaming and status endpoint
Introduces a WebSocket endpoint for real-time log streaming and a new /v1/status API for server status. Refactors log file handling, updates dependencies (adds ws feature to axum), and improves file validation logic. Also updates workspace and crate versions to 1.1.7, and makes minor improvements to log rotation and struct derivations.
2025-09-26 04:11:13 +08:00
ForgQi e7e795dd72 Replace typed-builder with bon and update builder usage
Replaced the 'typed-builder' crate with 'bon' across the project, updating all builder pattern usages to match the new derive macros and method names. Adjusted struct derives and builder method calls in uploader and upload logic to use 'bon::Builder' and the new 'maybe_' method conventions. Updated dependencies in Cargo.toml files accordingly and removed 'typed-builder' from the workspace.
2025-09-26 02:13:31 +08:00
ForgQi 69caca628c Refactor segment event handling and add download task module
Introduces a new `download` module to encapsulate download task logic, including segment event processing and file validation. Refactors segment event handling to use a new `SegmentInfo` struct and updates related interfaces and modules for improved clarity and maintainability. Adjusts uploader and downloader logic to work with the new event structure, and enhances FFmpeg and stream gears downloaders to emit and process segment events accordingly.
2025-09-26 01:42:03 +08:00
ForgQi 2a8c1d0bd6 Refactor uploader logic and improve worker status handling
Moved upload and post-processing logic to a new common/upload.rs module and refactored UActor to use it. WorkerStatus now tracks the active downloader instance, with improved serialization and debug output. StreamGears downloader now supports cancellation via tokio-util's CancellationToken. API endpoints and service registration updated to match new worker and uploader logic. Various doc comments and error handling improved throughout the codebase.
2025-09-24 01:26:11 +08:00
ForgQi 267bda7360 Add and improve Rust doc comments across server modules
Added and expanded Rust documentation comments (///) for structs, enums, traits, functions, and methods throughout the core and infrastructure modules. These comments clarify the purpose, parameters, and return values of types and functions, improving code readability and maintainability for developers. No functional or logic changes were made.
2025-09-23 05:14:28 +08:00
ForgQi fc159cd598 Add and improve Chinese doc comments across server modules
Added and enhanced Chinese documentation comments throughout the server codebase, including API endpoints, configuration structures, context, error handling, infrastructure, and router modules. These comments clarify the purpose and usage of structs, enums, functions, and modules, improving code readability and maintainability for Chinese-speaking developers. No functional logic was changed.
2025-09-23 04:44:46 +08:00
ForgQi aea8fb56a8 Refactor server context and downloader integration
Refactored the server context to use a unified Context struct with extension support, updated Worker to encapsulate streamer, config, and client, and adjusted all usages accordingly. Moved util.rs to common/util.rs and updated imports. Enhanced downloader and plugin interfaces to support richer context and danmaku integration. Added DanmakuClient implementation in stream-gears and improved post-processing hooks to support multiple files. Various bug fixes and improvements for error handling, file operations, and configuration defaults.
2025-09-23 04:26:20 +08:00
Heporis a19e1861f1 Update Termux-publish.yml (#1474) 2025-09-22 02:15:59 +00:00
ForgQi 84c798a8d7 Refactor and clean up unused imports and code
Removed unused imports and redundant code across multiple modules to improve code clarity and maintainability. Updated function signatures in flv_parser for lifetime correctness. Added Drop implementation for ActorHandle to ensure background tasks are aborted on drop. Simplified logic in uploader login functions and improved pattern matching in endpoints. Minor code style and comment cleanups throughout the codebase.
2025-09-21 16:50:58 +08:00
ForgQi fb4dc2b50a Refactor server code and migrate modules to biliup-cli
Moved and refactored server-related modules from stream-gears to biliup-cli, including API endpoints, configuration, core logic, and infrastructure. Replaced usage of anyhow with error-stack and custom AppError/AppResult types throughout the codebase. Updated dependencies in Cargo.toml and Cargo.lock, and adjusted code to use new error handling and module paths. Removed obsolete modules and files from stream-gears, and updated README and workspace version.
2025-09-21 16:29:33 +08:00
XuanRan_Nyan 0bdcf14a00 chore: Docker Build CI 改用 native arm64 runner (#1470)
* chore: Docker Build CI 改用 native arm64

* fix IMAGE_NAME

* Bypassing build jobs on pull requests
2025-09-21 05:11:01 +00:00
ForgQi 9128183595 Refactor downloader hooks and add post-processing support
Refactored the downloader callback mechanism to use a generic callback instead of direct channel messaging, simplifying the interface for all downloaders. Moved HookStep to its own module and implemented async post-processing hooks (run, move, remove) for video files after successful upload. Enabled login guard in the application controller and updated workspace and version metadata.
2025-09-21 01:29:50 +08:00
ForgQi 2f309ba8a0 Add PUT /v1/configuration endpoint for config updates
Introduces a new put_configuration handler to allow updating configuration via the /v1/configuration endpoint. Updates the router to support PUT requests, modifies the README to improve image rendering, and bumps the workspace version to 1.1.3.
2025-09-20 23:10:36 +08:00
XuanRan_Nyan 89c9b709c7 Fix(Docker): Run with wheel instead (#1468)
* chore: 同步 UploadLines

* revert profile

* Fix(Docker): Optimize Docker build with multi-stage architecture and wheel-based installation

- Split build into separate stages for webui, wheel building, and deployment
- Build Python wheel using Rust/maturin instead of editable install
- Update FFmpeg to version 8.0 with latest builds
- Improve build caching by copying source before conditional git clone
- Upgrade base Python image to 3.13-slim
- Streamline dependency management and cleanup processes
2025-09-20 13:45:59 +00:00
ForgQi a5faefb533 Add QR code login and user management endpoints
Introduces endpoints for QR code-based login and user management in the stream-gears server. Adds support for creating, deleting, and listing users, as well as endpoints for QR code generation and login via QR code. Refactors configuration management to use a global LazyLock, updates model serialization for streamer hooks, and improves context and service registration to support stateless clients. Also updates the frontend to handle new user and QR code flows, and adds an image resource for donation display in the README.
2025-09-20 21:43:51 +08:00
XuanRan_Nyan fe163af02d chore: 同步更新 UploadLines (#1466)
* chore: 同步 UploadLines

* revert profile
2025-09-20 07:41:34 +00:00
ForgQi 50845dc6cd Update .gitignore and refactor douyin.py imports
Added 'logs' to .gitignore to exclude log files from version control. Cleaned up and reorganized imports in douyin.py for better readability and maintainability.

Refactor and clean up imports, logic, and pattern usage

This commit removes unused imports, simplifies logic with let-else and pattern matching, and updates code style for conciseness and clarity across multiple modules. It also adds Default implementations for handler structs, improves error handling, and streamlines repository and service registration code.
2025-09-19 23:24:55 +08:00
ForgQi 4011ccde88 Improve config handling and database initialization
Removes unused data migration from PyInstaller spec. Adds automatic creation of parent directories for the SQLite database in Rust, and improves configuration retrieval by inserting a default config if missing. Updates model and repository code to support insert operations for configuration. Also cleans up unused test URLs in server startup.

Bump version to 1.1.1

Update Cargo.toml and Cargo.lock to reflect the new package version 1.1.1.
2025-09-19 22:59:11 +08:00
ForgQi 1e035df468 Refactor web build output and packaging paths
Updated Dockerfile to copy from /biliup/out instead of /biliup/biliup/web/public. Removed web public directory from PyInstaller and pyproject.toml includes. Adjusted build script in package.json to stop copying build output to web/public. These changes streamline the build and packaging process by consolidating output paths.
2025-09-19 03:34:01 +08:00
ForgQi 3744c0f14c Refactor to remove legacy Python backend and database
Removed legacy Python backend modules, database models, and related utilities from the biliup package. Migrated configuration and main loop handling to use stream_gears bindings, simplifying the codebase and shifting backend responsibilities to the Rust implementation. Updated the login page to support registration and login via the new API, and adjusted frontend API base export.

Update Cargo.toml

Update Cargo.lock
2025-09-19 03:28:17 +08:00
ForgQi b13a6b7f77 Revert "fix: 修复遗漏的接口鉴权 (#1417)"
This reverts commit 244e03c38a.
2025-09-18 00:14:38 +08:00
ForgQi 7dfc81a6d8 Revert "优化登录功能` (#1386)"
This reverts commit 795f2965cc.
2025-09-18 00:13:13 +08:00
cykac04 0f1a3c758d Fix api missing NSFW streams (#1454)
* add plugin for picarto.tv

* add plugin for picarto.tv

* Fetch explore api until last page

* Fix duplicated json()

* Fix explore api missing NSFW streams
2025-09-17 08:32:52 +00:00
DetectiveLemon f22949977f fix(upload): fix glitches in max_upload_limit (#1459) 2025-09-17 08:32:13 +00:00
Ninzore 29499e3bde Fix: Enhance filename handling for percent signs (#1458)
修复文件名中包含%百分号导致输出文件名错误 #1455 ,
经测试对基于ffmpeg和stream-gears的下载方法均可用
2025-09-17 07:30:08 +00:00
cykac04 90bd1381c9 feat: plugins.Picarto (#1452)
* add plugin for picarto.tv

* add plugin for picarto.tv

* Fetch explore api until last page

* Fix duplicated json()
2025-09-11 07:16:10 +00:00
XuanRan_Nyan 685872e70e fix(Douyin): add abogus (#1451) 2025-09-10 15:42:18 +00:00
XuanRan_Nyan 23c40ec5ae refactor(Douyu): 去除对 JSEngine 的强依赖 (#1448)
* refactor(Douyu): 去除对 JSEngine 的强依赖

cleanup test

remove test

修复竞争操作

cleanup

fix some err

补充 jsengine 判断

add missing break

fix unbinding var

* add single-flight
2025-09-09 02:29:05 +00:00
Jovi Hsu b06007954f Fix(bilibili-rs): Usu https instead of http (#1429) 2025-08-25 05:41:56 +00:00
xiaoyu 58d0138b40 Flextv由原地址 https://www.flextv.co.k 更改为 https://www.ttinglive.com (#1430) 2025-08-25 05:41:25 +00:00
ForgQi 448d26eb92 Bump stream-gears to v1.0.7 and update install docs
Updated stream-gears crate version to 1.0.7 in Cargo.toml and Cargo.lock. Revised README to use 'uv' for installation and updated backend dependency installation instructions to use 'maturin dev'.
2025-08-14 01:47:39 +08:00
Heporis 962dde9f68 Update Termux-publish.yml (#1419)
更改Termux中aiohttp版本,以避免出现DNS故障
2025-08-13 06:31:45 +00:00
XiaoMiku01 244e03c38a fix: 修复遗漏的接口鉴权 (#1417) 2025-08-11 15:41:06 +00:00
ForgQi a03e270a89 Bump stream-gears to version 1.0.6 and update README image URL
Updated stream-gears crate version from 1.0.5 to 1.0.6 in Cargo.toml and Cargo.lock. Also changed the image URL in README.md from docs.biliup.me to docs.biliup.rs.
2025-08-09 14:14:12 +08:00
XuanRan_Nyan 8dfc2acd75 feat(bbrs): upload_by_config 支持 submit 选择 (#1413)
* fix(huya): change huya presenter_uid type from i32 to i64

* update huya ua

* feat(bbrs): upload_by_config 支持 submit 选择
2025-08-08 15:36:59 +00:00