alfem / telegram-downloader-bot

A Telegram bot for file downloading automation
Other
129 stars 50 forks source link

Emoji in files crash downloading #24

Open tellmemoarlol opened 1 year ago

tellmemoarlol commented 1 year ago

Screenshot_20231103-112648~01 Emoji in music files crash downloading. Maybe add filter for filenames?

alfem commented 1 year ago

How can I test this issue? I can not find the way to send a file with emojis in its name.

tellmemoarlol commented 1 year ago

Yes. I make channel with file for tests https://t.me/testfiledownload In logs i see file not found after downloading and script stop working. Maybe rename this symbols in random letters or crop if found it. Or save audio files without autor and name of song. Replace  name=u"{}-{}-{}.mp3".format(audio.title,audio.performer,update.update_id) Something like  name=u"{}-{}-{}.mp3".format(file_unique_id,file_name,duration)

Or skip errors for continue downloading next file with skip notify message.

Script cant save this files with this tags

alfem commented 1 year ago

I made a quick test with the last file and it got downloaded and saved without errors.

What kind of filesystem holds your download destination? I only use ext4 filesystems, but fat32 could fail.

alfem commented 1 year ago

Ups! I did the tests with my other (more powerful) downloader, telegram-download-daemon.

This bot is very limited and a bit unmaintained :-)

tellmemoarlol commented 1 year ago

What kind of filesystem holds your download destination? I only use ext4 filesystems, but fat32 could fail.

BTRFS on synology nas. Ok, i change script for output filenames without id3tags