Skip to content
This repository was archived by the owner on Jan 11, 2023. It is now read-only.

Commit 0ed3fe2

Browse files
committed
Use UntypedJson.Object.get_string_member in a few more places
There were a few other cases where TT-RSS was sending us ints and we expected strings. Might fix #752
1 parent 7c395a7 commit 0ed3fe2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

plugins/backend/ttrss/ttrssAPI.vala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -357,10 +357,10 @@ private void getSubCategories(Gee.List<Category> categories, Json.Object categor
357357
for(uint i = 0; i < items_count; i++)
358358
{
359359
var categorie_node = subcategorie.get_object_element(i);
360-
if(categorie_node.get_string_member("id").has_prefix("CAT:"))
360+
string catID = UntypedJson.Object.get_string_member(categorie_node, "id");
361+
if(catID.has_prefix("CAT:"))
361362
{
362363
orderID++;
363-
string catID = categorie_node.get_string_member("id");
364364
string categorieID = catID.slice(4, catID.length);
365365

366366
if(int.parse(categorieID) > 0)
@@ -490,7 +490,7 @@ public void getHeadlines(Gee.List<Article> articles, int skip, int limit, Articl
490490
{
491491
var attachment = attachments.get_object_element(j);
492492
enclosures.add(new Enclosure(
493-
headline_node.get_string_member("id"),
493+
UntypedJson.Object.get_string_member(headline_node, "id"),
494494
attachment.get_string_member("content_url"),
495495
EnclosureType.from_string(attachment.get_string_member("content_type"))));
496496
}
@@ -604,7 +604,7 @@ public Gee.List<Article> getArticles(Gee.List<int> articleIDs)
604604
{
605605
var attachment = attachments.get_object_element(j);
606606
enclosures.add(new Enclosure(
607-
article_node.get_string_member("id"),
607+
UntypedJson.Object.get_string_member(article_node, "id"),
608608
attachment.get_string_member("content_url"),
609609
EnclosureType.from_string(attachment.get_string_member("content_type"))));
610610
}

0 commit comments

Comments
 (0)