diff options
author | Juan A. Suarez Romero <jasuarez@igalia.com> | 2010-02-19 11:25:44 +0100 |
---|---|---|
committer | Juan A. Suarez Romero <jasuarez@igalia.com> | 2010-02-19 12:11:00 +0100 |
commit | 21864b6e3fd26cf7e760a35625e163f215d084a1 (patch) | |
tree | ebbb53d242097cd2deece7df7bd0d5f46750a59f | |
parent | 2ab6c6ae4d9830df0221d468a9d2843d00022d94 (diff) | |
download | grilo-plugins-21864b6e3fd26cf7e760a35625e163f215d084a1.tar.gz |
[shoutcast] Handle "skip" in browsing
-rw-r--r-- | src/shoutcast/grl-shoutcast.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/shoutcast/grl-shoutcast.c b/src/shoutcast/grl-shoutcast.c index 7c29211..ada3273 100644 --- a/src/shoutcast/grl-shoutcast.c +++ b/src/shoutcast/grl-shoutcast.c @@ -263,6 +263,20 @@ xml_parse_result (const gchar *str, OperationData *op_data) op_data->xml_entries = node->xmlChildrenNode; skip_garbage_nodes (&op_data->xml_entries); + if (xmlStrcmp (node->name, (const xmlChar *) "stationlist") == 0) { + /* First node is "tunein"; skip it */ + op_data->xml_entries = op_data->xml_entries->next; + skip_garbage_nodes (&op_data->xml_entries); + } + + /* Skip elements */ + while (op_data->xml_entries && op_data->bs->skip > 0) { + op_data->xml_entries = op_data->xml_entries->next; + skip_garbage_nodes (&op_data->xml_entries); + op_data->bs->skip--; + } + + /* Check if there are elements to send*/ if (!op_data->xml_entries) { goto finalize; } |