diff options
| -rw-r--r-- | HISTORY | 4 | ||||
| -rw-r--r-- | imageserver.c | 12 |
2 files changed, 13 insertions, 3 deletions
@@ -26,3 +26,7 @@ Version 0.0.4 - do some more sophisticated search for recordings first replace all "-" with " " in rec title second remove everything behind "-" in rec title + +Version 0.0.5 +- Fixed a bug that banner is only filled with path if + image exists in Filesystem diff --git a/imageserver.c b/imageserver.c index 0e72b13..2fb14a4 100644 --- a/imageserver.c +++ b/imageserver.c @@ -80,11 +80,17 @@ tvMedia cImageServer::GetPoster(int id, scrapType type) { tvMedia cImageServer::GetBanner(int id) { tvMedia media; + media.path = ""; + media.width = 0; + media.height = 0; stringstream path; path << config.GetBaseDir() << "/series/" << id << "/banner.jpg"; - media.path = path.str(); - media.width = 758; - media.height = 140; + string fileBanner = path.str(); + if (FileExists(fileBanner)) { + media.path = fileBanner; + media.width = 758; + media.height = 140; + } return media; } |
