telegram-cloud icon indicating copy to clipboard operation
telegram-cloud copied to clipboard

Is there any option to synch a directory and a channel?

Open Mafhoom opened this issue 4 years ago • 5 comments

I just want to download the files that I have not downloaded before, while now the script re-downloads the file with a new name. maybe Because there may be two files with the same name but different in size and content, Can You add an option for solve this problem to synchronize the downloaded directory and channel content?

Telegram export function itself has not this option too and export files again and again with new names.

Is it possible to add this method for upload files too?

Mafhoom avatar Sep 27 '20 07:09 Mafhoom

Maybe if there are some good unique things to control it like date or ids, and also you can use some scripts to remove duplicate files from a directory by comparing their md5 hashes.

iw4p avatar Sep 27 '20 08:09 iw4p

I don't know but I saw some sync function in telethon documents please add some functions for this because it is very important to download channel with huge data.

Mafhoom avatar Sep 27 '20 09:09 Mafhoom

I'll check.

iw4p avatar Sep 27 '20 09:09 iw4p

I have found an similar repo using the file name to identify whether this file has been downloaded

return not os.path.isdir(file_path) and os.path.exists(file_path)

wu2305 avatar Jan 06 '22 02:01 wu2305

By the way, I 'm also looking forward the ability to restrict the amount of files to be downloaded by using the message_id. For sometimes the disk space is limited

wu2305 avatar Jan 06 '22 02:01 wu2305