imdb: change getIMDbElement() handling; function now returns a string

Origin commit data
------------------
Branch: ni/coolstream
Commit: 0b5a851514
Author: vanhofen <vanhofen@gmx.de>
Date: 2017-05-29 (Mon, 29 May 2017)

Origin message was:
------------------
- imdb: change getIMDbElement() handling; function now returns a string

------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2017-05-29 11:49:00 +02:00
parent 8d4543e450
commit 04ec1ff0ca
3 changed files with 13 additions and 27 deletions

View File

@@ -1643,8 +1643,7 @@ int CEpgData::showIMDb(bool splash)
}
//titel
std::string title = "Title";
imdb->getIMDbElement(title);
std::string title = imdb->getIMDbElement("Title");
if(((title.find("IMDb: URL (Seite) nicht gefunden")) != std::string::npos))
return 1;
@@ -1663,8 +1662,7 @@ int CEpgData::showIMDb(bool splash)
textCount = epgText.size();
//rating
imdb_rating = "imdbRating";
imdb->getIMDbElement(imdb_rating);
imdb_rating = imdb->getIMDbElement("imdbRating");
std::string value = imdb_rating;
if (imdb_rating == "N/A")
@@ -1675,13 +1673,6 @@ int CEpgData::showIMDb(bool splash)
else
imdb_rating += "/10";
#if 0
std::string votes = "imdbVotes";
imdb->getIMDbElement(votes);
if (votes != "N/A")
imdb_rating += " (Stimmen: " + votes + ")";
#endif
size_t pos = value.find_first_of(",.");
if (pos != std::string::npos)
value.replace(pos, 1, ""); // change 8,1 or 8.1 to 81