feat: implement downloading specific threads from channels (#542)#545
Open
Dineshkarthik wants to merge 11 commits into
Open
feat: implement downloading specific threads from channels (#542)#545Dineshkarthik wants to merge 11 commits into
Dineshkarthik wants to merge 11 commits into
Conversation
- Added `threads` configuration option in `config.yaml.example` and parsing logic for it. - Refactored `media_downloader.py` to spawn message iterators that hook into Telethon's `iter_messages` using `reply_to` if threads are specified. - Added input for Threads in the chat configuration section of `webui/config_tab.py` - Added unit tests to verify optional threads fallback and iteration behavior.
Dineshkarthik
force-pushed
the
feature/542-download-specific-threads
branch
from
February 24, 2026 22:23
a1844eb to
d0415e2
Compare
… & cast lists of strings
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #545 +/- ##
==========================================
- Coverage 95.45% 94.24% -1.22%
==========================================
Files 8 8
Lines 484 521 +37
==========================================
+ Hits 462 491 +29
- Misses 22 30 +8 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…nside iter_messages
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.
Description
This pull request implements the requested feature to download specific threads from Telegram channels as described in Issue #542.
Changes
threadsarray parameter directly intoconfig.yaml.exampleunder the chat configuration layout to explicitly state a list of thread IDs to process per chat.get_messages_iter()withinmedia_downloader.pyallowing iterating over Telegram messages and seamlessly looping thetelethonclient's existingiter_messagesfunction utilizingreply_to=thread_idparameters natively if the user has opted to use thethreadslist configuration. Falls back completely to traditional behavior otherwise.reply_tofetching viaunittestutilizing explicit event loops to provide assertions tracking how the logic behaves directly within the downloader script independently.