Skip to content

Conversation

@jibanez-staticduo
Copy link

This PR adds comprehensive Telegram bot integration to icloudpd.

Features

Telegram Bot Commands

  • /sync - Trigger incremental sync (uses date filter)
  • /syncall - Trigger full sync (ignores date filter)
  • /stop - Stop current synchronization
  • /status - Get current status with progress and rate information
  • /auth - Initiate authentication process

Authentication Automation

  • Telegram-based MFA provider (--mfa-provider telegram)
  • Automatic detection of authentication expiration
  • Telegram notifications when authentication is required
  • 6-digit code input via Telegram messages

Performance Improvements

  • Incremental sync optimization using addedDate filter from iCloud API
  • Rate and counter display in download progress

Based on: https://github.com/icloud-photos-downloader/icloud_photos_downloader

- Add TelegramBot class with support for /sync, /syncall, /stop, /status commands
- Implement webhook and polling support for Telegram updates
- Add status tracking with Progress class enhancements
- Support for manual sync triggers and progress reporting
- All messages in English
- Add TELEGRAM option to MFAProvider enum
- Implement request_2fa_telegram function for MFA via Telegram
- Add /auth command to initiate authentication process
- Support for 6-digit code input via Telegram messages
- Automatic authentication expiration detection and notifications
- Add Telegram bot initialization and lifecycle management
- Integrate Telegram commands with sync process
- Add support for --mfa-provider telegram CLI option
- Implement cookie deletion for forced re-authentication
- Add authentication error detection and Telegram notifications
- Optimize photo filtering with addedDate API filter for incremental syncs
- Implement FileCache class for storing last sync date
- Use addedDate filter from iCloud API for incremental syncs
- Add rate and counter display to download progress logs
- Optimize sync process by filtering photos by addition date
- Integrate Telegram webhook endpoint with Flask server
- Support for webhook-based message receiving
- Maintain backward compatibility with polling mode
- Add note about this being a fork of original icloudpd project
- Document additional Telegram bot features
- Reference original project and maintain MIT license compatibility
- Add entrypoint-wrapper.sh for environment variable conversion
- Add multiple Dockerfile variants for different build scenarios
- Support for Docker-based deployment with Telegram integration
- Maintain original copyright from Nathan Broadbent and iCloud Photo Downloader Authors
- Add note about this being a fork with additional features
- All modifications remain under MIT License
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant