mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 16:31:11 +02:00
yt: make search order selectable
This commit is contained in:
@@ -472,7 +472,7 @@ bool cYTFeedParser::ParseFeed(std::string &url)
|
||||
return parseFeedXml(answer);
|
||||
}
|
||||
|
||||
bool cYTFeedParser::ParseFeed(yt_feed_mode_t mode, std::string search, std::string vid)
|
||||
bool cYTFeedParser::ParseFeed(yt_feed_mode_t mode, std::string search, std::string vid, yt_feed_orderby_t orderby)
|
||||
{
|
||||
std::string url = "http://gdata.youtube.com/feeds/api/standardfeeds/";
|
||||
bool append_res = true;
|
||||
@@ -540,6 +540,8 @@ bool cYTFeedParser::ParseFeed(yt_feed_mode_t mode, std::string search, std::stri
|
||||
url = "http://gdata.youtube.com/feeds/api/videos?q=";
|
||||
url += search;
|
||||
url += "&";
|
||||
const char *orderby_values[] = { "published", "relevance", "viewCount", "rating" };
|
||||
url += "orderby=" + std::string(orderby_values[orderby & 3]) + "&";
|
||||
}
|
||||
|
||||
feedmode = mode;
|
||||
|
Reference in New Issue
Block a user