Album Download Manager with Persistent State#143
Open
yopichy wants to merge 18 commits intoNeet-Nestor:mainfrom
Open
Album Download Manager with Persistent State#143yopichy wants to merge 18 commits intoNeet-Nestor:mainfrom
yopichy wants to merge 18 commits intoNeet-Nestor:mainfrom
Conversation
…ustness - Summary: Add download progress UI, persistent album-scan-and-download feature, and more robust media extraction and downloading logic. - Key improvements: Implemented progress indicators (`createProgressBar`, `updateProgress`, `completeProgress`, `AbortProgress`); chunked downloads using `Range` headers and optional `showSaveFilePicker` support for large streams; separate handlers for audio/video/image (`tel_download_audio`, `tel_download_video`, `tel_download_image`). - Album support: Added a "Scanned/Downloaded" badge for albums, persistent album state in `localStorage` (key `tel_album_states_v1`), and the ability to download all items in an album. - Robustness & UX: More reliable probing of viewer streams with suppression of noisy `MediaError` rejections; special-case support for webz/webk stories, pinned audio, and multiple Telegram DOM variants. - Logging & error handling: Improved logging and safer error handling during probing and downloads.
- Add album scanning and persistent badge to batch-download album media (saved state in localStorage). - Implement chunked Range downloads for video/audio with optional File System Access API support. - Add progress bar UI with completion and abort handling; improved logging. - Improve viewer probing to extract streaming URLs and suppress noisy MediaError rejections during probing. - Add support for stories and webk/webz UI variations; reveal native hidden download buttons.
- Add album scanning UI with a clickable "Scanned" badge to batch-download album media. - Persist album download state in localStorage (tel_album_states_v1) and support redownloads. - Implement per-download progress bar with completion/abort handling and filesystem save support. - Improve video/audio download flows (range requests, blob concatenation) and better MIME checks. - Add robust viewer probing (retry/backoff) and suppress noisy MediaError unhandled rejections while probing. - Webk/Webz compatibility tweaks and enhanced logging for troubleshooting.
- Migrate legacy aggregated album storage to per-album keys and persist album states. - Add album "Scanned"/"Downloaded"/"Partial downloaded" badge with a Redownload action. - Implement progress bar UI with completion and abort handling for downloads. - Improve video/audio download logic: ranged fetch with Content-Range handling, HEAD/content-type checks, fallback probing of viewer streams, and optional File System Access API support. - Suppress noisy MediaError rejections while probing viewers and harden viewer probing/retry logic. - Various UX and robustness fixes for Webz/Webk viewers and stories.
…direct source preference
… and blob URL support
…oved user feedback
62df02e to
204b52d
Compare
…ng and download button detection
…just timing for download processes
…item identification and download handling. cuurently /a only support for images
Owner
|
Hi @yopichy , thanks for the contribution! for me to better test and understand the feature, could you please attach some screenshots or screen recording for this functionality please? Thank you! |
Owner
|
On /a/ version, it shows the badge but doesn't work at all for video album. Please properly handle this. Also the "scanned" button seems very unintuitive to me: it's unclear to me that this is the button I should click to download the entire album. We should have more intuitive UI/UX. |
Author
… UI updates during download processes
…improve comments in the code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Album Download Manager
Overview
The Album Download Manager allows you to batch download entire albums from Telegram Web and track their download status across sessions using persistent local storage.
1. Scanning an Album
What is Scanning?
Scanning marks a multi-item album for tracking and creates a badge showing download progress.
How to Scan:
Important:
.is-albumor contain multiple.album-item.grouped-itemelements2. Downloading an Album
Click the Badge to Start Download
Download Flow by Media Type:
For Videos:
For Images:
3. Redownloading an Album
When to Use Redownload:
How to Redownload:
Locate an album with:
A red "Redownload" button appears next to the badge
Click "Redownload":
4. Badge Status Reference
5. Download Progress & Troubleshooting
Progress Indicators:
If Download Fails:
Viewer Issues:
.video-timeclass)6. Storage & Persistence
How State is Saved:
tel_album_states_v1_{albumMessageId}Storage Structure:
Data Persistence:
7. Tips & Best Practices
For Best Results:
Large Albums (10+ items):
Avoiding Issues:
8. Advanced: Console Commands
View Album States:
Reset Specific Album:
Reset All Albums:
9. Example Workflows
Workflow 1: Download New Album
Workflow 2: Resume Incomplete Download
Workflow 3: Redownload Everything
10. Supported Platforms
11. FAQ
Q: Why is my album not getting a badge?
A: Ensure it's a multi-item album (2+ items). Single media messages don't get badges.
Q: Can I download albums from pinned messages?
A: Yes, if they appear as multi-item albums in the chat.
Q: What if I accidentally clear browser data?
A: All album states are lost. Badge data won't restore, but you can re-download anytime.
Q: Do I need to click badge again to download remaining items?
A: No, the script automatically skips already-downloaded items on next badge click.
Q: Can I stop a download in progress?
A: Videos will complete once started. You can manually close the viewer to halt the sequence.
Q: Why are some videos downloading as .bin files?
A: MIME-type detection failed. The file is still valid but may need manual rename to .mp4.
Q: How do I see download history?
A: Check localStorage keys starting with
tel_album_states_v1_via console.Q: What does "Downloading... X/Y" mean?
A: It shows the current progress: X items completed out of Y total items in the album. Updates in real-time as each item processes.
12. Known Limitations
13. Troubleshooting Checklist