krau
7e3e26fcf4
style: format codebase
2026-08-11 08:47:35 +08:00
Haopeng Huo
0e6ed66ef5
feat: show upload progress for batch file tasks ( #228 )
...
* feat: show upload progress for file tasks
* feat: show upload progress for batch file tasks
* style: distinguish download and upload phases
* style: mark successful task completion
* fix: preserve storage save error context
* fix: serialize single-file progress updates
* fix: stabilize batch upload progress reporting
Correct batch upload totals, completion state, actual file sizes, and synchronized progress snapshots. Add regression coverage for concurrent updates and phase transitions.
* feat: show per-file transfer progress
Format single-file and batch download and upload states with Telegram entities, blockquotes, speeds, transferred sizes, progress bars, concise counters, and accurate confirmation handling. Cover upload retries plus final, error, and cancellation messages with regression tests.
* chore: remove transfer progress tests
* test: restore critical transfer progress coverage
* test: cover interleaved batch transfers
* fix: declare progress styles in locale templates
2026-08-11 08:40:29 +08:00
Haopeng Huo
e4144e73e6
feat(telegram): split oversized videos into playable parts ( #229 )
...
* feat(telegram): split oversized videos losslessly
* fix(telegram): respect Premium upload limits
* fix(telegram): keep split videos in one album
2026-08-05 16:57:46 +08:00
Haopeng Huo
1d794a7b9c
feat(telegram): preserve source media groups ( #226 )
...
* feat(telegram): preserve source media groups
* fix(telegram): rewind batch readers before inspection
2026-08-04 16:46:29 +08:00
irudisca
52f880f0f2
fix(telegram): use seekable file path for thumbnail & metadata extraction ( #225 )
...
extractFrameAt() and getVideoMetadata() piped the media into ffmpeg/ffprobe
via pipe:0. A pipe is not seekable, so ffmpeg cannot decode non-faststart MP4s
whose moov atom sits at the END of the file (very common for yt-dlp / HLS-merged
downloads): the frame grab and probe silently fail, and the video is uploaded
with no thumbnail (and, for non-mp4 containers, no dimensions).
Hand ffmpeg/ffprobe a seekable file path instead. When the reader already is an
*os.File we use it directly; otherwise we spool to a temp file and clean it up.
Verified with an A/B upload of a 56 MB non-faststart clip: stock build produced
no thumbnail, patched build produced a correct thumbnail.
Co-authored-by: pennyucloud <valentino@pennyu.co.id >
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-07-23 18:28:03 +08:00
Ryan
62e4a08e28
Merge pull request #204 from Rain-kl/feat/save-strategy
...
新增功能: 重名文件时选择保存策略 - 重命名,覆盖,跳过
2026-05-20 16:11:00 +08:00
krau
f377ee3ca4
chore: format code for consistency and readability
2026-03-05 17:20:45 +08:00
Krau
8b86330f5c
feat: add rclone storage backend ( #191 )
...
* fix: update StoragePath method to return specific path for single file
* feat: add Rclone storage support with configuration and file operations
* docs: add Rclone support to documentation for configuration and usage
2026-01-30 13:34:29 +08:00
krau
a02e8a8d90
fix: update storage path handling in Save method
2026-01-30 12:43:47 +08:00
krau
9b52a3e0ce
refactor: simplify storage path handling across various tasks and storage implementations
2026-01-19 21:27:53 +08:00
krau
17e340fff1
fix: improve file listing and path handling in Webdav storage
2026-01-19 20:35:48 +08:00
Krau
f92c43b9c8
feat: support import files from storages to telegram ( #183 )
...
* feat: add import command and batch import functionality
- Implemented the `/import` command to allow users to import files from storage to Telegram.
- Added support for listing files in storage and filtering based on regex patterns.
- Created a batch import task to handle multiple file uploads concurrently.
- Introduced progress tracking for batch imports, providing real-time updates to users.
- Enhanced storage interfaces to support file listing and reading capabilities.
- Updated localization files for the new import command and its usage instructions.
- Added utility functions for file size formatting and speed calculation.
- Refactored Telegram storage handling to support reading from non-seekable streams.
* feat: add i18n for import command
* feat: implement ListFiles and OpenFile methods for WebDAV and Alist storage
* Update common/i18n/locale/zh-Hans.yaml
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
* Update core/tasks/batchimport/progress.go
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
* Update core/tasks/batchimport/execute.go
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
* Update storage/alist/alist.go
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
* Update common/i18n/locale/en.yaml
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
* Update pkg/storagetypes/fileinfo.go
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
* Update common/i18n/locale/en.yaml
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
* Update core/tasks/batchimport/execute.go
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
* Update storage/webdav/webdav.go
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
* Update storage/telegram/telegram.go
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
* Update core/tasks/batchimport/execute.go
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
* Update storage/webdav/webdav.go
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
* fix: missing progress stats i18n
* refactor: use strutil to parse args
* chore: update generated code files for consistency
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
2026-01-19 17:39:47 +08:00
krau
0e951f641c
fix(storage): add panic recovery for malformed MP4 files
...
- Add defer/recover in getMP4Meta to catch panics from gomedia library
- Implement fallback to ffprobe when MP4 parsing fails
- Fixes "no vosdata" panic when processing certain MP4 files
Also add CLAUDE.md to provide architecture guidance for AI coding assistants.
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-12-31 20:36:26 +08:00
krau
4ccbf8177e
fix(i18n): Update log messages to English and improve error handling in bot initialization and storage loading
2025-12-19 20:29:48 +08:00
krau
5f7b936270
feat: refactor storage retrieval functions and improve documentation
2025-12-19 13:49:20 +08:00
krau
52eead3bf5
feat: refactor database dialect handling and add stubs for unsupported features
2025-12-18 17:42:20 +08:00
krau
0af049a507
feat: migrate S3 client implementation to a new package structure
2025-12-18 16:42:58 +08:00
krau
8752dd865c
feat: refactor S3 storage implementation and reduce binary size
2025-12-18 16:21:40 +08:00
krau
c0b4580e34
fix: correct split size calculation in Save method
2025-12-16 20:52:17 +08:00
krau
280fd6ead8
fix: update DefaultSplitSize
2025-12-16 20:51:11 +08:00
krau
45c978980c
feat: add support for splitting large files into parts for Telegram storage, #156
2025-12-15 10:25:50 +08:00
krau
c974791dc0
fix: add VirtualHost option to S3StorageConfig and implement endpoint validation, close #150
2025-12-08 10:11:58 +08:00
krau
91814a83c7
fix: deprecate minio and introduce s3 storage backend
2025-12-04 22:59:23 +08:00
krau
685047e463
fix: compatibility between tdlib and bot api style chatID
2025-12-04 22:43:22 +08:00
krau
a6f194aedd
feat: add global proxy config
2025-12-02 10:11:58 +08:00
krau
1065acfdb8
feat: auto generate thumbnail for video uploaded to telegram storage
2025-11-28 10:24:15 +08:00
krau
2c5d6f0e57
fix: upgrade golang.org/x/crypto for security
2025-11-22 17:43:52 +08:00
krau
7d57ad30a9
feat: add MP4 metadata extraction and integrate gomedia for video handling
2025-11-22 15:42:02 +08:00
krau
15cf81e1bd
fix: remove unnecessary chat ID validation and constant usage in Save method
2025-11-06 16:04:31 +08:00
krau
44de871f63
fix: add context to HTTP request in getToken and simplify HTTP client initialization
2025-10-28 17:59:21 +08:00
krau
46c21b77e9
feat: enhance Save method to validate chat ID and adjust ForceFile logic for image uploads
2025-08-24 12:02:27 +08:00
krau
8b389a58d5
fix: improve chat ID parsing in Save method and fallback to configured chat_id
2025-08-24 11:46:12 +08:00
krau
25ad9befa0
feat: add ForceFile option to TelegramStorageConfig and update Save method
2025-08-24 11:38:44 +08:00
krau
e824b210d1
feat: improve telegram storage chat ID parsing logic
2025-08-24 11:29:19 +08:00
krau
e5d1e143e0
feat: configurable parser and refactor config
2025-08-23 14:29:32 +08:00
krau
36285a0700
feat(storage/telegram): add support for uploading images excluding webp format
2025-08-02 11:41:18 +08:00
krau
ccf206d176
feat(storage/telegram): enhance file upload handling with content length support and media type differentiation
2025-08-02 11:22:14 +08:00
krau
6423fb25a7
fix: update max upload part size to use uploader's maximum value and adjust document upload options
2025-07-28 14:58:01 +08:00
krau
69a3ed6f4e
fix: parse chat ID correctly in Save method for Telegram storage
2025-07-07 13:48:16 +08:00
krau
dc0debcd1c
fix: add unique filename handling with error logging in Save method for Minio and Webdav
2025-07-04 16:10:42 +08:00
krau
4b136bd41e
feat: add test case for nested directory file writing
2025-07-04 16:08:01 +08:00
krau
cb6540c017
fix(minio): trim leading slash in JoinStoragePath method
2025-06-30 22:19:33 +08:00
krau
4df2c5a06d
refactor: replace key package with ctxkey for context keys
2025-06-17 22:19:06 +08:00
krau
eb6f8675a4
fix(minio): pass the size to minio puitobject
2025-06-17 22:10:20 +08:00
Krau
900823cdb9
refactor: refactor task logic for better scalability ( #76 )
...
* refactor: a big refactor. wip
* refactor: port handle file
* refactor: place all handlers
* fix: task info nil pointer
* feat: enhance task progress tracking and context management
* feat: cancel task
* feat: stream mode
* feat: silent mode
* feat: dir cmd
* refactor: remove unused old file
* feat: rule cmd
* feat: handle silent mode
* feat: batch task
* fix: batch task progress and temp file cleanup
* refactor: update file creation and cleanup methods for better resource management
* feat: add save command with silent mode handling
* feat: message link
* feat: update message prompts to include file count in storage selection
* feat: slient save links
* refactor: reduce dup code
* feat: rule type
* feat: chose dir
* feat: refactor file handling and storage rules, improve error handling and logging
* feat: rule mode
* feat: telegraph pics
* fix: tphpics nil pointer and inaccurate dirpath
* feat: silent save telegraph
* feat: add suffix to avoid file overwrite
* feat: new storage telegram
* chore: tidy go mod
2025-06-15 23:57:49 +08:00
krau
e85d3c9441
feat: rename file only when storagePath exists
2025-06-11 09:54:08 +08:00
krau
5f78db90c7
fix: webdav url escape
2025-05-07 12:05:10 +08:00
krau
a619ed2f22
typo: client_test filename
2025-04-27 08:32:47 +08:00
krau
838dfc35a1
fix: webdav client implement, close #49
2025-04-27 08:31:50 +08:00
krau
300f7723af
fix: enhance webdav client impl
2025-03-31 17:34:24 +08:00