lay295 / TwitchDownloader

Twitch VOD/Clip Downloader - Chat Download/Render/Replay
MIT License
2.78k stars 261 forks source link

Emote priority #476

Open sunkhaskasis opened 1 year ago

sunkhaskasis commented 1 year ago

Checklist

Write your feature request here

There are cases when streamers have both 7TV and BTTV emotes with the same name enabled at the same time. Xqc, for example, has a holiday version of the "D:" emote on 7TV, but it's also a BTTV global. The Downloader seems to prioritize BTTV: bttv priority 7TV version: https://7tv.app/emotes/61e64621095be332e347e2b8 BTTV version: https://betterttv.com/emotes/55028cd2135896936880fdd7

Would it be possible to code in emote priority in case people want to see 7TV emotes rendered over BTTV ones? I'll include 2 .json files: one with embedded emotes and the other without any embeds. https://www.dropbox.com/s/213c0cugje6bvoi/with%20embeds.json?dl=1 https://www.dropbox.com/s/2kip9jxk3qwee84/without%20embeds.json?dl=1

ScrubN commented 1 year ago

I believe you can technically do this by downloading without bttv then running it through chatupdate -E/embed messing, though this would be a nice feature to have. I'll probably look into it later

ScrubN commented 1 year ago

Getting this working was interesting to say the least. It might be limited to chat download/update only but I'll try to get it working with chat render too.

image

Also My implementation uses a new NuGet package that requires .NET 7 so that needs to come first

goldbattle commented 1 year ago

I believe there is an order to things we should respect. Probably should match the extensions do, for example here is chatterino's order:

    // Emote order:
    //  - FrankerFaceZ Channel
    //  - BetterTTV Channel
    //  - 7TV Channel
    //  - FrankerFaceZ Global
    //  - BetterTTV Global
    //  - 7TV Global

https://github.com/Chatterino/chatterino2/blob/1043f9f8037ed53fbaf1812f289a4e3db152e140/src/providers/twitch/TwitchMessageBuilder.cpp#L1007-L1072

ScrubN commented 1 year ago

The order we currently use is

- BTTV
- FFZ
- 7TV

I think I would like to replace the clunky bttv=false ffz=true stv=false with a simple emotes=stv,bttv to clarify that you only want 7tv & bttv in the priority of 7tv > bttv

ScrubN commented 1 year ago

Also I'll try to rewrite it without .NET7 because for some reason it resulted in significantly reduced render performance