- Add the ability to parse the RSS feeds from reddit groups (in particular the image feed groups like EarthPorn) and display them
This commit is contained in:
@@ -180,6 +180,10 @@ QVector<PathEntry> parsePathEntry(QJsonObject &jsonMainDoc, bool baseRecursive,
|
||||
if(!imageListString.empty()) {
|
||||
entry.imageList = imageListString;
|
||||
}
|
||||
std::string rssFeedURLString = ParseJSONString(schedulerJson, "redditrss");
|
||||
if(!rssFeedURLString.empty()) {
|
||||
entry.rssFeedURL = rssFeedURLString;
|
||||
}
|
||||
|
||||
SetJSONBool(entry.exclusive, schedulerJson, "exclusive");
|
||||
|
||||
@@ -229,7 +233,7 @@ AppConfig loadAppConfiguration(const AppConfig &commandLineConfig) {
|
||||
QJsonDocument d = QJsonDocument::fromJson(val.toUtf8());
|
||||
QJsonObject jsonDoc = d.object();
|
||||
|
||||
bool baseRecursive, baseShuffle, baseSorted;
|
||||
bool baseRecursive = false, baseShuffle = false, baseSorted = false;
|
||||
SetJSONBool(baseRecursive, jsonDoc, "recursive");
|
||||
SetJSONBool(baseShuffle, jsonDoc, "shuffle");
|
||||
SetJSONBool(baseSorted, jsonDoc, "sorted");
|
||||
@@ -258,6 +262,11 @@ AppConfig loadAppConfiguration(const AppConfig &commandLineConfig) {
|
||||
{
|
||||
entry.imageList = imageListString;
|
||||
}
|
||||
std::string rssFeedURLString = ParseJSONString(jsonDoc, "redditrss");
|
||||
if(!rssFeedURLString.empty())
|
||||
{
|
||||
entry.rssFeedURL = rssFeedURLString;
|
||||
}
|
||||
loadedConfig.paths.append(entry);
|
||||
}
|
||||
loadedConfig.configPath = commandLineConfig.configPath;
|
||||
|
||||
Reference in New Issue
Block a user