@@ -56,7 +56,7 @@ public async Task RenderVideoAsync(IProgress<ProgressReport> progress, Cancellat
56
56
progress . Report ( new ProgressReport ( ) { reportType = ReportType . Message , data = "Fetching 3rd Party Emotes" } ) ;
57
57
List < TwitchEmote > thirdPartyEmotes = await Task . Run ( ( ) => TwitchHelper . GetThirdPartyEmotes ( chatJson . streamer . id , cacheFolder , chatJson . emotes , renderOptions . BttvEmotes , renderOptions . FfzEmotes , renderOptions . StvEmotes ) ) ;
58
58
progress . Report ( new ProgressReport ( ) { reportType = ReportType . Message , data = "Fetching Cheer Emotes" } ) ;
59
- List < CheerEmote > cheerEmotes = await Task . Run ( ( ) => TwitchHelper . GetBits ( cacheFolder ) ) ;
59
+ List < CheerEmote > cheerEmotes = await Task . Run ( ( ) => TwitchHelper . GetBits ( cacheFolder , chatJson . streamer . id . ToString ( ) ) ) ;
60
60
progress . Report ( new ProgressReport ( ) { reportType = ReportType . Message , data = "Fetching Emojis" } ) ;
61
61
Dictionary < string , SKBitmap > emojiCache = await Task . Run ( ( ) => TwitchHelper . GetTwitterEmojis ( chatJson . comments , cacheFolder ) ) ;
62
62
@@ -805,18 +805,22 @@ public static SKBitmap DrawMessage(SKBitmap sectionImage, List<SKBitmap> imageLi
805
805
bool bitsPrinted = false ;
806
806
try
807
807
{
808
- if ( bitsCount > 0 && output . Any ( char . IsDigit ) && cheerEmotes . Any ( x => output . Contains ( x . prefix ) ) )
808
+ if ( bitsCount > 0 && output . Any ( char . IsDigit ) && output . Any ( char . IsLetter ) )
809
809
{
810
- CheerEmote currentCheerEmote = cheerEmotes . Find ( x => output . Contains ( x . prefix ) ) ;
811
810
int bitsIndex = output . IndexOfAny ( "0123456789" . ToCharArray ( ) ) ;
812
- int bitsAmount = Int32 . Parse ( output . Substring ( bitsIndex ) ) ;
813
- bitsCount -= bitsAmount ;
814
- KeyValuePair < int , TwitchEmote > tierList = currentCheerEmote . getTier ( bitsAmount ) ;
815
- GifEmote emote = new GifEmote ( new Point ( drawPos . X , drawPos . Y ) , tierList . Value . name , tierList . Value . codec , tierList . Value . imageScale , tierList . Value . emote_frames ) ;
816
- currentGifEmotes . Add ( emote ) ;
817
- drawPos . X += ( int ) ( ( tierList . Value . width / tierList . Value . imageScale ) * renderOptions . EmoteScale + ( 3 * renderOptions . EmoteScale ) ) ;
818
- sectionImage = DrawText ( sectionImage , bitsAmount . ToString ( ) , messageFont , imageList , renderOptions , currentGifEmotes , canvasSize , ref drawPos , true , default_x ) ;
819
- bitsPrinted = true ;
811
+ string outputPrefix = output . Substring ( 0 , bitsIndex ) . ToLower ( ) ;
812
+ if ( cheerEmotes . Any ( x => x . prefix . ToLower ( ) == outputPrefix ) )
813
+ {
814
+ CheerEmote currentCheerEmote = cheerEmotes . Find ( x => x . prefix . ToLower ( ) == outputPrefix ) ;
815
+ int bitsAmount = Int32 . Parse ( output . Substring ( bitsIndex ) ) ;
816
+ bitsCount -= bitsAmount ;
817
+ KeyValuePair < int , TwitchEmote > tierList = currentCheerEmote . getTier ( bitsAmount ) ;
818
+ GifEmote emote = new GifEmote ( new Point ( drawPos . X , drawPos . Y ) , tierList . Value . name , tierList . Value . codec , tierList . Value . imageScale , tierList . Value . emote_frames ) ;
819
+ currentGifEmotes . Add ( emote ) ;
820
+ drawPos . X += ( int ) ( ( tierList . Value . width / tierList . Value . imageScale ) * renderOptions . EmoteScale + ( 3 * renderOptions . EmoteScale ) ) ;
821
+ sectionImage = DrawText ( sectionImage , bitsAmount . ToString ( ) , messageFont , imageList , renderOptions , currentGifEmotes , canvasSize , ref drawPos , true , default_x ) ;
822
+ bitsPrinted = true ;
823
+ }
820
824
}
821
825
}
822
826
catch
0 commit comments