Pārlūkot izejas kodu

Fixed like count for youtube parsing.

tags/3.1.1
Teknikode pirms 4 gadiem
vecāks
revīzija
a5292bafb4
2 mainītis faili ar 2 papildinājumiem un 2 dzēšanām
  1. 1
    1
      Modules/Url Parsing/Url_Parsing.cs
  2. 1
    1
      Modules/YouTube/YouTube.cs

+ 1
- 1
Modules/Url Parsing/Url_Parsing.cs Parādīt failu

@@ -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 Parādīt failu

@@ -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;

Notiek ielāde…
Atcelt
Saglabāt