fixed copying 3x versions of bttv channel emotes

This commit is contained in:
fourtf 2018-06-04 14:52:21 +02:00
parent 829809b0e1
commit db233ffbdc

View file

@ -133,11 +133,14 @@ void EmoteManager::reloadBTTVChannelEmotes(const QString &channelName,
QString link = linkTemplate;
link.detach();
link = link.replace("{{id}}", id).replace("{{image}}", "1x");
auto emote = this->getBTTVChannelEmoteFromCaches().getOrAdd(id, [&id, &code, &link] {
util::EmoteData emoteData(
new Image(link, 1, code, code + "<br/>Channel BTTV Emote"));
auto emote = this->getBTTVChannelEmoteFromCaches().getOrAdd(id, [&] {
util::EmoteData emoteData;
emoteData.image1x = new Image(link.replace("{{id}}", id).replace("{{image}}", "1x"),
1, code, code + "<br />Channel BTTV Emote");
emoteData.image2x = new Image(link.replace("{{id}}", id).replace("{{image}}", "2x"),
0.5, code, code + "<br />Channel BTTV Emote");
emoteData.image3x = new Image(link.replace("{{id}}", id).replace("{{image}}", "3x"),
0.25, code, code + "<br />Channel BTTV Emote");
emoteData.pageLink = "https://manage.betterttv.net/emotes/" + id;
return emoteData;