Commit Graph
100 Commits
Author SHA1 Message Date
ForgQi 2810ac9a88 Refactor and clean up unused imports and code paths
Removed unused imports, simplified code by eliminating unnecessary variables and clones, and applied Rust idioms such as let-else and .cloned(). Added Default implementations for certain structs. These changes improve code clarity, maintainability, and reduce potential for confusion or errors.
2025-11-17 01:07:00 +08:00
ForgQi 064111669e Refactor download manager and downloader architecture
Refactored the download manager to unify plugin and worker management, replacing ActorHandle with DownloadManager. Updated API endpoints and download logic to use the new DownloadManager interface. Introduced DownloaderRuntime enum to abstract over different downloader implementations. Added initial ytdlp.rs for YouTube downloads. Refactored StreamGears and Streamlink to fit the new architecture, and updated worker and status handling throughout the codebase.
2025-11-17 01:05:30 +08:00
ForgQi 58e7d3c80f Add Streamlink downloader and refactor Twitch plugin
Introduces a new Streamlink downloader implementation supporting multiple platforms and output modes. Refactors the Twitch plugin to use async traits and separates TwitchDownloader logic. Cleans up endpoint logging and updates workspace version to 1.1.22.
2025-11-05 01:44:31 +08:00
ForgQi 673a1e7eb8 Refactor plugin system and update dependencies
Refactored the plugin system, including changes to plugin loading and Twitch plugin implementation. Updated dependencies in Cargo.lock to their latest versions, improving compatibility and security. Adjusted downloader and download logic to align with the new plugin structure.
2025-11-04 00:56:51 +08:00
ForgQi 99b00d3bc3 Add Twitch plugin and refactor ffmpeg downloader
Introduces a new Twitch plugin module for stream handling, including GraphQL queries and stream URL extraction. Refactors ffmpeg_downloader to extract process logging and waiting logic into a reusable async function. Updates dependencies to use workspace versions for rand and serde_urlencoded, and bumps version numbers to 1.1.21.
2025-11-03 00:58:43 +08:00
ForgQi d1cb0047a5 Refactor segment event processing and downloader callbacks
Refactored SegmentEventProcessor to manage its channel internally and removed unnecessary cloning. Updated downloader traits and implementations to use FnMut callbacks with explicit lifetimes, improving flexibility and correctness. Adjusted file and segment types in the downloader module to be generic over lifetimes, ensuring proper resource management. These changes improve event handling, callback usage, and lifetime safety across the download pipeline.
2025-10-31 02:47:32 +08:00
ForgQi 6051dc8fe9 Refactor downloader architecture and config handling
Refactored the downloader system to pass DownloadConfig explicitly to all downloaders, removing internal state from FfmpegDownloader and StreamGears. Simplified DownloadPlugin::create_downloader to only require the downloader type, and updated DownloadTask to manage cancellation and retries more robustly. Adjusted related code to support the new DownloadConfig flow, improved resource cleanup, and updated trait signatures and usages throughout the codebase.
2025-10-30 02:10:17 +08:00
ForgQi b497749744 Update download task execution and improve docs
Refactored the DownloadTask::execute method to return DownloadStatus and adjusted its visibility. Enhanced DActor message handling to update stream info after download execution. Updated README and introduction guide with improved instructions for background running and systemd service configuration.
2025-10-27 02:05:23 +08:00
ForgQi f5f2998d16 Add streamer file info API and improve file listing
Introduces a new API endpoint `/v1/streamer-info/files/{id}` to fetch file lists for a specific streamer, and updates the frontend to fetch file lists dynamically per row. Also updates serialization for streamer date fields, improves comments and error handling, and changes the default downloader type for plugins. Minor documentation and code cleanup included.
2025-10-27 01:28:08 +08:00
ForgQi 2ede5cda33 Refactor YY plugin to Rust and update downloader logic
Migrates the YY plugin from Python to Rust, implementing it under crates/biliup-cli/src/server/core/plugin/yy.rs and registering it in the service register. Removes the old Python plugin. Refactors downloader instantiation logic into DownloadPlugin, and updates header construction utility. Updates CLI and README to clarify the --auth option. Cleans up duplicate code in stream-gears and synchronizes workspace version numbers.
2025-10-26 17:01:45 +08:00
ForgQi ff3fd2ef15 Refactor tracing and type casting in stream-gears
Removed unused tracing initialization and related code from stream-gears. Replaced deprecated `downcast` calls with `cast` for PyO3 types. Cleaned up imports and minor code improvements in biliup-cli and stream-gears modules.
2025-10-25 00:10:00 +08:00
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
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
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
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
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
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
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
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
ForgQi 35024feaa7 Refactor segment handling and SubmitOption parsing
Replaces the custom Segment class in Python with the PySegment class from Rust, and exposes PySegment to Python via PyO3. Refactors SubmitOption to implement FromStr for string parsing, updating usage accordingly. These changes improve interoperability between Python and Rust components and standardize enum parsing.

Bump stream-gears version to 1.0.5

Updated the stream-gears crate version from 1.0.4 to 1.0.5 in Cargo.toml and Cargo.lock to prepare for a new release.
2025-08-08 02:02:01 +08:00
ForgQi 4d992c3486 Refactor web routes and bump stream-gears to 1.0.4
Refactored route registration in biliup/web/__init__.py to use decorators instead of manual app.add_routes, and removed unused or commented code. Updated stream-gears crate version to 1.0.4 in Cargo.toml and Cargo.lock.
2025-08-07 22:01:05 +08:00
ForgQi 678b2bfcdd Bump stream-gears to version 1.0.3
Updated the stream-gears crate version in Cargo.toml and Cargo.lock from 1.0.1 to 1.0.3. Also removed the uv.lock file.
2025-08-04 22:29:34 +08:00
ForgQi 0eeb35918f Update README and remove quickjs dependency
Added a forum link to the README for user reference. Removed the 'quickjs' package from the dependencies in pyproject.toml, likely because it is no longer required.
2025-07-25 00:15:35 +08:00
ForgQi f4b75bf698 Update docker-publish.yml 2025-07-22 22:24:09 +08:00
ForgQi 2c923cc8da Update lib.rs 2025-07-22 02:17:08 +08:00
ForgQi 18c523e63c Update pyinstaller-publish.yml
Fix pyinstaller copy metadata (#1357)

* Update tauri.conf.json

* Update biliup.spec

Update pyinstaller-publish.yml
2025-07-22 01:52:43 +08:00
ForgQi 380d1d4b25 Update build workflow and improve Tauri sidecar handling
Enhanced the GitHub Actions workflow for Windows builds, including dynamic sidecar binary handling and updated Node version specification. Upgraded stream-gears crate to version 1.0.0. Refactored Tauri app to improve sidecar process management, including encoding handling, process shutdown, and automatic startup/shutdown integration. Added readme field to pyproject.toml and redirected frontend to localhost in App.tsx.
2025-07-18 02:46:11 +08:00
ForgQi 67d041a217 Comment out CI workflow files
All steps in docker-publish.yml, pyinstaller-publish.yml, and python-publish.yml have been commented out, effectively disabling these GitHub Actions workflows. This change may be for temporarily suspending automated builds and releases.

Update ci.yml

Update ci.yml

Update CI workflows and stream-gears version

Fixes a variable reference in the CI workflow for manylinux builds and updates the Windows PyInstaller workflow to use maturin for development installs and a more streamlined build process. Bumps stream-gears crate version to 0.4.102 and removes the stream-gears Python dependency from pyproject.toml.

Delete python-publish.yml
2025-07-16 23:40:35 +08:00
ForgQi 9d7318b25f init tauri-app
init tauri-app

init rs
2025-07-16 03:43:05 +08:00
ForgQi d7573c68c7 chore: update version to 0.4.100 2025-06-12 01:39:31 +08:00
ForgQi af8d235798 Update __init__.py 2025-06-10 23:27:24 +08:00
ForgQi 947c76c708 Bumping version (#1158)
* Update pyproject.toml

* Update __init__.py
2025-02-08 07:39:12 +00:00
ForgQi c02d2b0399 Update __init__.py 2025-02-06 20:09:59 +08:00
ForgQi 0cac8526cd Update __init__.py 2025-02-05 10:02:00 +08:00
ForgQi 94d4c679c5 chore: bump version to 0.4.81 and update dependencies to 2.72.1 2025-01-04 12:41:19 +08:00
ForgQi 1ad46e8ed2 chore: bump version to 0.4.80 2025-01-01 00:49:53 +08:00
ForgQi bad5849a01 chore: bump version to 0.4.79 2024-12-20 01:55:20 +08:00
ForgQi 0d46d31a70 Bumping version 2024-09-01 18:21:21 +08:00
ForgQi 0c21154dc4 Update __init__.py 2024-08-17 23:36:34 +08:00
ForgQi 6f550ad981 Update __init__.py 2024-08-12 22:46:59 +08:00
ForgQi b29921f347 Bumping version 2024-08-06 00:01:48 +08:00
ForgQi a27344dc28 Bumping version 2024-08-01 00:21:15 +08:00
ForgQi 874003ca69 Bumping version 2024-07-18 02:14:20 +08:00
ForgQi 4037f23fe7 Bumping version 2024-06-22 18:59:43 +08:00
ForgQi 7a098b9aba Modify the detection location in the code 2024-06-03 00:58:23 +08:00
ForgQi 31e830b5b0 Bumping version 2024-06-02 21:42:02 +08:00
ForgQi cd353f609d update README.md 2024-06-02 21:33:07 +08:00
ForgQi 8bd750e0c1 add logo 2024-06-01 00:07:21 +08:00
ForgQi 0fadba5707 Bumping version 2024-05-29 23:44:11 +08:00
ForgQi 4872007adc add upload delay 2024-05-28 23:12:13 +08:00
ForgQi 004f401bc2 type wrangling and gymnastics 2024-05-28 02:29:38 +08:00
ForgQi 2ae7a2d39e Bumping version 2024-05-28 01:48:50 +08:00
ForgQi 9574c6b339 Bumping version 2024-05-26 23:39:12 +08:00
ForgQi 917f7cca9d add spec 2024-05-25 23:32:53 +08:00
ForgQi b20ad78b53 Bumping version 2024-05-20 22:08:49 +08:00
ForgQi f3c01e6c98 Bumping version 2024-05-20 02:53:06 +08:00
ForgQi cde7be4dbd Bumping version 2024-05-20 00:55:00 +08:00
ForgQi b08d411b21 Bumping version 2024-05-19 18:14:23 +08:00
ForgQi 0963cf0954 Bumping version 2024-05-18 19:49:58 +08:00
ForgQi 55ebbfee61 Bumping version 2024-05-13 23:29:32 +08:00
ForgQi 881d57d6b2 Bumping version 2024-05-11 01:35:25 +08:00
ForgQi a9de10e338 Bumping version 2024-05-01 01:18:44 +08:00
ForgQi b3a0fcbb5b Bumping version
Update download.py
2024-04-28 01:12:19 +08:00
ForgQi 8db64e2d8b add manually operated 2024-04-25 01:47:44 +08:00
ForgQi 664efc89a7 Bumping version 2024-04-24 01:38:58 +08:00
ForgQi d4d238e6a7 add login by qrcode 2024-04-24 01:10:33 +08:00
ForgQi 0d156ff280 Bumping version 2024-04-17 23:33:36 +08:00
ForgQi 4940fceec6 Bumping version 2024-04-17 01:06:07 +08:00
ForgQi e51e357665 Bumping version 2024-04-10 23:44:35 +08:00
ForgQi d789bb45fe Update handler.py
Update handler.py
2024-04-09 22:49:35 +08:00
ForgQi ac032ac878 Bumping version 2024-04-07 22:13:08 +08:00
ForgQi 53273f2b4c Bumping version 2024-03-27 23:36:54 +08:00
ForgQi 6d4a20d25c Bumping version 2024-03-25 21:40:34 +08:00
ForgQi 231b6d57df Bumping version 2024-03-22 23:56:44 +08:00