forked from markus/S_New4
v6.3.3: new coloring for news mode
This commit is contained in:
parent
b8e69cfd10
commit
788a5dbcd5
@ -24,7 +24,7 @@
|
||||
|
||||
#define UpdaterCloudUrlWithPath "https://cloud.obermui.de/s/tXz7SWdaPJ7TacZ/download?path=%2F&files="
|
||||
#define SecondUpdaterCloudUrlWithPath "https://snew4.obermui.de/download?path=%2F&files="
|
||||
#define VERSION "6.3.1"
|
||||
#define VERSION "6.3.3"
|
||||
#define DEFAULT_FILE_VERSION "2.5"
|
||||
|
||||
|
||||
|
@ -1466,6 +1466,12 @@ int ProgramManager::newsModus(Settings *settings)
|
||||
std::string line;
|
||||
while (std::getline(strstream, line).good()) {
|
||||
|
||||
std::string lang;
|
||||
if(settings->colorless)
|
||||
lang= (line.find("German Flag") != std::string::npos) ? "GerDub" : (line.find("Deutsche Untertitel Flagge,") != std::string::npos) ? "GerSub" : "EngDub";
|
||||
else
|
||||
lang= (line.find("German Flag") != std::string::npos) ? "\033[31mGerDub\033[0m" : (line.find("Deutsche Untertitel Flagge,") != std::string::npos) ? "\033[33mGerSub\033[0m" : "\033[96mEngDub\033[0m";
|
||||
|
||||
size_t pos = line.find("<strong>");
|
||||
size_t pos2 = line.find("</strong>");
|
||||
if(pos == std::string::npos) {
|
||||
@ -1496,9 +1502,13 @@ int ProgramManager::newsModus(Settings *settings)
|
||||
}
|
||||
std::string date = line.substr(pos + 7, pos2 - pos - 7);
|
||||
|
||||
|
||||
|
||||
std::cout << " > " << ((settings->colorless) ? "" : "\033[97m") << date << ((settings->colorless) ? "" : "\033[0m") << ": "
|
||||
<< ((settings->colorless) ? "" : "\033[96m") << name << ((settings->colorless) ? "" : "\033[0m") << ": "
|
||||
<< ((settings->colorless) ? "" : "\033[92m") << id << ((settings->colorless) ? "" : "\033[0m") << std::endl;
|
||||
<< ((settings->colorless) ? "" : "\033[92m") << id << ((settings->colorless) ? "" : "\033[0m") << ":\t"
|
||||
<< ((settings->colorless) ? "" : "\033[34m") << lang << ((settings->colorless) ? "" : "\033[0m") << ":\t"
|
||||
<< ((settings->colorless) ? "" : "\033[1;34m") << name << ((settings->colorless) ? "" : "\033[0m")
|
||||
<< std::endl;
|
||||
}
|
||||
|
||||
|
||||
@ -1877,7 +1887,7 @@ int ProgramManager::printPopularSeries(Settings *settings)
|
||||
|
||||
|
||||
std::cout << " > Serie: " << ((settings->colorless) ? "" : "\033[96m") << name << ((settings->colorless) ? "" : "\033[0m") << ": "
|
||||
<< ((settings->colorless) ? "" : "\033[92m") << "(" + replace(href,page.UrlDir, "") + ")" << ((settings->colorless) ? "" : "\033[0m") << std::endl;
|
||||
<< ((settings->colorless) ? "" : "\033[92m") << "(" + replace(href, page.UrlDir, "") + ")" << ((settings->colorless) ? "" : "\033[0m") << std::endl;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user