~ghuter/caoydl

608f7d1292d2e0c4c5b217667fe08ecd752ad000 — ghuter 1 year, 11 months ago 7fcce59
fix channel video listing
2 files changed, 5 insertions(+), 5 deletions(-)

M node_processors.h
M props.h
M node_processors.h => node_processors.h +1 -1
@@ 114,7 114,7 @@ processnode_chan(struct json_node *nodes, size_t depth, const char *value,
	if (r->nitem > MAX_VIDEOS)
		return;

	if (in_json_obj(nodes, depth, gridVideoRenderer, nelem(gridVideoRenderer))) {
	if (in_json_obj(nodes, depth, ch_videoRenderer, nelem(ch_videoRenderer))) {
		r->nitem++;
		return;
	}

M props.h => props.h +4 -4
@@ 76,17 76,17 @@ static struct json_layer ch_channeltitle[] = {
	{ 1, TYPE_STRING, NMS("simpleText") },
};

static struct json_layer gridVideoRenderer[] = {
	{ 1, TYPE_OBJECT, NMS("gridVideoRenderer") },
static struct json_layer ch_videoRenderer[] = {
	{ 1, TYPE_OBJECT, NMS("videoRenderer") },
};

static struct json_layer ch_videoid[] = {
	{ 2, TYPE_OBJECT, NMS("gridVideoRenderer") },
	{ 2, TYPE_OBJECT, NMS("videoRenderer") },
	{ 1, TYPE_STRING, NMS("videoId") },
};

static struct json_layer ch_title[] = {
	{ 5, TYPE_OBJECT, NMS("gridVideoRenderer") },
	{ 5, TYPE_OBJECT, NMS("videoRenderer") },
	{ 4, TYPE_OBJECT, NMS("title") },
	{ 3, TYPE_ARRAY, NMS("runs") },
	{ 1, TYPE_STRING, NMS("text") },