瀏覽代碼

Fixed like count for youtube parsing.

tags/3.1.1
Teknikode 4 年之前
父節點
當前提交
a5292bafb4
共有 2 個檔案被更改,包括 2 行新增2 行删除
  1. 1
    1
      Modules/Url Parsing/Url_Parsing.cs
  2. 1
    1
      Modules/YouTube/YouTube.cs

+ 1
- 1
Modules/Url Parsing/Url_Parsing.cs 查看文件

@@ -280,7 +280,7 @@ namespace Combot.Modules.Plugins
if (data["statistics"] != null)
{
JToken stats = data["statistics"];
int likes = (stats["likecount"] != null) ? stats["likeCount"].Value<int>() : 0;
int likes = (stats["likeCount"] != null) ? stats["likeCount"].Value<int>() : 0;
string pluralLikes = (likes > 1) ? "s" : string.Empty;
int dislikes = (stats["dislikeCount"] != null) ? stats["dislikeCount"].Value<int>() : 0;
string pluralDislikes = (dislikes > 1) ? "s" : string.Empty;

+ 1
- 1
Modules/YouTube/YouTube.cs 查看文件

@@ -113,7 +113,7 @@ namespace Combot.Modules.Plugins
if (data["statistics"] != null)
{
JToken stats = data["statistics"];
int likes = (stats["likecount"] != null) ? stats["likeCount"].Value<int>() : 0;
int likes = (stats["likeCount"] != null) ? stats["likeCount"].Value<int>() : 0;
string pluralLikes = (likes > 1) ? "s" : string.Empty;
int dislikes = (stats["dislikeCount"] != null) ? stats["dislikeCount"].Value<int>() : 0;
string pluralDislikes = (dislikes > 1) ? "s" : string.Empty;

Loading…
取消
儲存