#11: Update channel CHANNELS
tab treatment following YouTube-operational-API/issues/121 closure
This commit is contained in:
parent
fced9e0a3a
commit
4133faad41
26
main.cpp
26
main.cpp
@ -315,21 +315,35 @@ void treatChannelOrVideo(unsigned short threadId, bool isChannel, string id, str
|
|||||||
items = data["items"];
|
items = data["items"];
|
||||||
for(const auto& item : items)
|
for(const auto& item : items)
|
||||||
{
|
{
|
||||||
for(const auto& channel : item["channels"]["channels"])
|
json channelSections = item["channelSections"];
|
||||||
|
for(const auto& channelSection : channelSections)
|
||||||
{
|
{
|
||||||
PRINT(threadId, channel)
|
for(const auto& sectionChannel : channelSection["sectionChannels"])
|
||||||
addChannelToTreat(threadId, channel["channelId"]);
|
{
|
||||||
|
string channelId = sectionChannel["channelId"];
|
||||||
|
addChannelToTreat(threadId, channelId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(!data["nextPageToken"].is_null())
|
if(channelSections.size() == 1)
|
||||||
{
|
{
|
||||||
pageToken = data["nextPageToken"];
|
json channelSection = channelSections[0];
|
||||||
|
if(!channelSection["nextPageToken"].is_null())
|
||||||
|
{
|
||||||
|
pageToken = channelSection["nextPageToken"];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
break;
|
goto breakChannelsTreatment;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
goto breakChannelsTreatment;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
breakChannelsTreatment:
|
||||||
|
;
|
||||||
// `PLAYLISTS`
|
// `PLAYLISTS`
|
||||||
pageToken = "";
|
pageToken = "";
|
||||||
while(true)
|
while(true)
|
||||||
|
Loading…
Reference in New Issue
Block a user