Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent videos from occasionally being downloaded repeatedly forever #12

Closed
xordspar0 opened this issue Mar 22, 2018 · 5 comments
Closed
Labels

Comments

@xordspar0
Copy link
Owner

xordspar0 commented Mar 22, 2018

Once in a while, I’ll send the bot a video and it will download it again and again until I stop it or the server runs out of space.

@xordspar0 xordspar0 added the bug label Mar 22, 2018
@xordspar0
Copy link
Owner Author

Example

Video title: Fantastic DIY Speakers for less than $30!
Video link: https://m.youtube.com/watch?v=zdkyGDqU7xA
Time in logs: 2018-03-21T15:00:34-05:00
Notes: Someone sent me this video, and I forwarded it to Squirrelbot from that conversation.

@xordspar0
Copy link
Owner Author

Counter Example

Video title: Bulletin Board Stereo Speakers | Styrofoam Bluetooth
Video link: https://www.youtube.com/watch?v=zMCyF400l1c
Time in logs: 2018-03-26T14:53:15-05:00
Notes: I forwarded this link to Squirrelbot, but it did not get stuck in a loop.

@xordspar0
Copy link
Owner Author

Maybe Telegram is sending us multiple messages. Maybe we need to check the message ID to make sure we haven't received this message before.

@xordspar0
Copy link
Owner Author

If that's true, 6d97f35 will help us get to the bottom of it.

@xordspar0
Copy link
Owner Author

I learned from a conversation with Telegram bot support that if I don't respond with an HTTP status code of 200 in time, Telegram will try again. I have only been sending 200 OK after everything finishes. For long videos, the download takes longer than the timeout before Telegram tries again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant