Explorar el Código

Fixed like count for youtube parsing.

tags/3.1.1
Teknikode hace 4 años
padre
commit
a5292bafb4
Se han modificado 2 ficheros con 2 adiciones y 2 borrados
  1. 1
    1
      Modules/Url Parsing/Url_Parsing.cs
  2. 1
    1
      Modules/YouTube/YouTube.cs

+ 1
- 1
Modules/Url Parsing/Url_Parsing.cs Ver fichero

@@ -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 Ver fichero

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

Cargando…
Cancelar
Guardar