From ae6c45f90ed337c3b98ca581443e96dd230ee4bb Mon Sep 17 00:00:00 2001 From: gixxpunk Date: Mon, 29 May 2017 17:15:38 +0200 Subject: [PATCH 1/2] imdb poster: if possible load bigger image Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/090ccc42510831aec1f291accc9091e096cfcf2e Author: gixxpunk Date: 2017-05-29 (Mon, 29 May 2017) Origin message was: ------------------ - imdb poster: if possible load bigger image --- src/gui/imdb.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/gui/imdb.cpp b/src/gui/imdb.cpp index 8ecbbf670..606ffefe8 100644 --- a/src/gui/imdb.cpp +++ b/src/gui/imdb.cpp @@ -323,6 +323,16 @@ int CIMDB::getIMDb(const std::string& epgTitle) //download Poster if(m["Poster"] != "N/A") { + // if possible load bigger image + std::string origURL ("300"); + std::string replURL ("600"); + + if (m["Poster"].compare(m["Poster"].size()-7,3,origURL) == 0){ + //std::cout << "########## " << m["Poster"] << " contains " << origURL << '\n'; + m["Poster"].replace(m["Poster"].size()-7,3,replURL); + //std::cout << "########## New string: " << m["Poster"] << '\n'; + } + if (httpTool.downloadFile(m["Poster"], posterfile.c_str())) return 2; else { From e1df16946a42f355129da029524f0ceebdbdfc0d Mon Sep 17 00:00:00 2001 From: gixxpunk Date: Mon, 29 May 2017 17:35:30 +0200 Subject: [PATCH 2/2] imdb: make search results more robust Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/801def06f357437c759561eb4620c43358242ef8 Author: gixxpunk Date: 2017-05-29 (Mon, 29 May 2017) --- src/gui/imdb.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/imdb.cpp b/src/gui/imdb.cpp index 570110c30..3ce74cbfb 100644 --- a/src/gui/imdb.cpp +++ b/src/gui/imdb.cpp @@ -206,7 +206,7 @@ std::string CIMDB::googleIMDb(std::string s) { CHTTPTool httpTool; std::string ret = search_error; - std::string search_string(""); + std::string search_string("title+"); char* search_char = (char*) s.c_str(); m.clear();