frankvHoof93 / TikTokLiveSharp

Port of TikTok live library for C#
https://vanhoof.dev
Other
140 stars 28 forks source link

[BUG] Fetch available gifts listing some gifts that were not visible on the tiktok live #35

Closed rsputra24 closed 8 months ago

rsputra24 commented 9 months ago

AvailableGift from TiktokLiveManager.cs returns some gifts that were not visible on any tiktok live i connect to. An example is Cake Slice, FetchAvailableGift using GetJObjectFromWebcastAPI("gift/list/) returned Cake Slice but when i connected to the real live using tiktok app it was not listed as a giftable item. Also, the attributes don't show any sign of differences from the one that is listed on the real app so there is no way to identify which one is not visible.

To Reproduce Steps to reproduce the behavior:

  1. Enable Download Gift Info on the client setting
  2. Call AvailableGifts from TiktokLiveManager.cs
  3. Also return gifts that were not visible on the real app

Expected behavior

  1. Enable Download Gift Info on the client setting
  2. Call AvailableGifts from TiktokLiveManager.cs
  3. only return gifts that were visible on the real app
frankvHoof93 commented 9 months ago

AvailableGifts includes ALL gifts that TikTok returns. This also includes gifts that are considered 'Exclusive'. If you want to filter this down, you can check for the 'Is_Displayed_On_Panel'-boolean on a gift. The next update will also include a "DisplayedGifts"-Dictionary that does this filtering for you.

rsputra24 commented 9 months ago

i see thankyou, but if i fetch with added param "room_id", it will only return 4 true of Is_Displayed_On_Panel, is it because the param "app_name" value is "tiktok_web"?

frankvHoof93 commented 8 months ago

@rsputra24 not entirely sure about the param, but that could very well be the case.

V1.0.0 now adds "DisplayedGifts", which does the filtering for you. It also allows you to add custom parameters for the Http-connection(s)