Selaa lähdekoodia

Fixed like count for youtube parsing.

tags/3.1.1
Teknikode 4 vuotta sitten
vanhempi
commit
a5292bafb4
2 muutettua tiedostoa jossa 2 lisäystä ja 2 poistoa
  1. 1
    1
      Modules/Url Parsing/Url_Parsing.cs
  2. 1
    1
      Modules/YouTube/YouTube.cs

+ 1
- 1
Modules/Url Parsing/Url_Parsing.cs Näytä tiedosto

@@ -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 Näytä tiedosto

@@ -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…
Peruuta
Tallenna