Feverqwe / twiMonBot

Telegram bot for monitoring twitch, youtube gaming, goodgame
https://goo.gl/Yr1rv2
63 stars 17 forks source link

Feature Request: Edit message to link to VOD after stream ends #2

Open sippeangelo opened 8 years ago

sippeangelo commented 8 years ago

It would be super useful if the bot edited the message to link to the VOD of the broadcast after the broadcast has ended!

I don't know about the other services, but Twitch does record and save past broadcasts. Grabbing the first result from the API /channels/:channel/videos while passing true to the broadcasts parameter to filter out highlights should give you the link. There might be a delay after the stream ends until the video is available though.

Feverqwe commented 8 years ago

/streams don't contain video ID. Don't all people store past broadcasts. It will work incorrect, if stream crash and have more one part. "grabbing the first result" is bad idea, becouse stream ID is not equal video ID.

sippeangelo commented 8 years ago

The result of /videos return a broadcast_id though, which should match up with _id from /streams!

Feverqwe commented 8 years ago

ok, but if stream crash and have more one part?

sippeangelo commented 8 years ago

I don't know how your bot operates, but I guess you're polling the API at a certain interval to see when it goes offline? If so, you could store the stream ID's that the stream goes through before it goes offline for real.

If that doesn't work, you could always link the videos returned by where the videos start time + length matches up with another videos start time!

Feverqwe commented 8 years ago

you could store the stream ID's

Yes bot can store, but after show more one link? Text under photo is limited and more one link is bad idea. I can show first link but I don't think that it good idea.

sippeangelo commented 8 years ago

Ah yes, that's true, but I think you should be able to fit at least two links inside the 200 character limit though!

🏁, Hunt for the Bandos Cloak continues , RuneScape https://www.twitch.tv/mmorpgrs https://www.twitch.tv/mmorpgrs/v/77729390 https://www.twitch.tv/mmorpgrs/v/77729390

for example is only 162 characters, and if you remove the link to the livestream (which is no longer needed anyway) you'd fit 3!

Feverqwe commented 8 years ago

its look bad.. easy open site or app and watch. I think link for first part is best solution

sippeangelo commented 8 years ago

Agreed. It's rare for streams to crash anyway and it will be a lot easier to implement.

Feverqwe commented 8 years ago

Ok i try do it.

Feverqwe commented 8 years ago

I try do it, but it bad idea, so many people have more one part of strem. It work unstable for them.

sippeangelo commented 8 years ago

That's a shame. I might have a shot at implementing and running my own fork privately then, since it's sufficient for my own use cases. Thanks anyway for looking into it!

Feverqwe commented 8 years ago

Hopefully in the future I'll find an elegant solution to this problem. Perhaps there will be new features in the API or something else.