Skip to content

Commit cc2ee73

Browse files
authored
feat: upgrade emote providers to higher quality images (#143)
* feat: upgrade emote providers to higher quality images Upgraded image quality from 1x to 2x resolution for all emote providers: - Twitch: scale 1.0 → 2.0 - BTTV: 1x → 2x resolution - 7TV: 1x.webp → 2x.webp - FFZ: upgraded to 2x with 1x fallback Closes #141 Generated by Claude Code Bot * feat: upgrade all emote providers to highest quality images Increased image quality across all providers: - Twitch: 2.0 → 4.0 scale (doubled quality) - BTTV: 2x → 3x resolution (50% increase) - 7TV: 2x.webp → 4x.webp (doubled quality) - FFZ: 2x → 4x with fallbacks (up to doubled quality) Closes #141 Generated by Claude Code Bot --------- Co-authored-by: ZerGo0 <ZerGo0@users.noreply.github.com>
1 parent 4c887d6 commit cc2ee73

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

src/lib/emotes/providers/bttv.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export class Bttv extends Provider {
2626
}
2727

2828
const emotes = json.map((e: any) => {
29-
return new Emote(e.code, 'https://cdn.betterttv.net/emote/' + e.id + '/1x');
29+
return new Emote(e.code, 'https://cdn.betterttv.net/emote/' + e.id + '/3x');
3030
});
3131

3232
return emotes;
@@ -67,7 +67,7 @@ export class BttvUser extends Provider {
6767
}
6868

6969
const emotes = json.channelEmotes.map((e: any) => {
70-
return new Emote(e.code, 'https://cdn.betterttv.net/emote/' + e.id + '/1x');
70+
return new Emote(e.code, 'https://cdn.betterttv.net/emote/' + e.id + '/3x');
7171
});
7272

7373
return emotes;

src/lib/emotes/providers/ffz.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export class Ffz extends Provider {
2727
}
2828

2929
const emotes = json.sets[json.default_sets[0]]?.emoticons.map(
30-
(e: any) => new Emote(e.name, e.urls['1'])
30+
(e: any) => new Emote(e.name, e.urls['4'] || e.urls['2'] || e.urls['1'])
3131
);
3232

3333
return emotes;
@@ -61,7 +61,7 @@ export class FfzUser extends Provider {
6161
}
6262

6363
const emotes = json.sets[json.room.set].emoticons.map(
64-
(e: any) => new Emote(e.name, e.urls['1'])
64+
(e: any) => new Emote(e.name, e.urls['4'] || e.urls['2'] || e.urls['1'])
6565
);
6666

6767
return emotes;

src/lib/emotes/providers/seventv.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export class SevenTv extends Provider {
2323
}
2424

2525
const emotes = json.emotes.map((e: any) => {
26-
return new Emote(e.name, `https:${e.data.host.url}/1x.webp`);
26+
return new Emote(e.name, `https:${e.data.host.url}/4x.webp`);
2727
});
2828

2929
return emotes;
@@ -66,7 +66,7 @@ export class SevenTvUser extends Provider {
6666
}
6767

6868
const emotes = json.emote_set.emotes.map((e: any) => {
69-
return new Emote(e.name, `https:${e.data.host.url}/1x.webp`);
69+
return new Emote(e.name, `https:${e.data.host.url}/4x.webp`);
7070
});
7171

7272
return emotes;

src/lib/emotes/providers/twitch.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ export class TwitchUser extends Provider {
8383
new Emote(
8484
emote.token,
8585
emote.id.startsWith('emotesv2')
86-
? `https://static-cdn.jtvnw.net/emoticons/v2/${emote.id}/default/light/1.0`
87-
: `https://static-cdn.jtvnw.net/emoticons/v1/${emote.id}/1.0`
86+
? `https://static-cdn.jtvnw.net/emoticons/v2/${emote.id}/default/light/4.0`
87+
: `https://static-cdn.jtvnw.net/emoticons/v1/${emote.id}/4.0`
8888
)
8989
);
9090
}
@@ -98,8 +98,8 @@ export class TwitchUser extends Provider {
9898
new Emote(
9999
emote.token,
100100
emote.id.startsWith('emotesv2')
101-
? `https://static-cdn.jtvnw.net/emoticons/v2/${emote.id}/default/light/1.0`
102-
: `https://static-cdn.jtvnw.net/emoticons/v1/${emote.id}/1.0`
101+
? `https://static-cdn.jtvnw.net/emoticons/v2/${emote.id}/default/light/4.0`
102+
: `https://static-cdn.jtvnw.net/emoticons/v1/${emote.id}/4.0`
103103
)
104104
);
105105
}

0 commit comments

Comments
 (0)