- helpers: rework new random-functions to get the code more reuseable

* introduceand use LOGODIR_TMP (storage dir for webchannel logos)

Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
svenhoefer
2018-09-18 21:18:40 +02:00
committed by Thilo Graf
parent 1de8919514
commit f5754b74f2
7 changed files with 33 additions and 29 deletions

View File

@@ -659,13 +659,14 @@ bool CPictureViewer::GetLogoName(const uint64_t& channel_id, const std::string&
}
}
if (cc) {
if (cc)
{
if (!cc->getAlternateLogo().empty())
{
std::string lname = dlTmpName(cc->getAlternateLogo());
name = lname;
if(width && height)
std::string lname = downloadUrlToRandomFile(cc->getAlternateLogo(), LOGODIR_TMP);
if (width && height)
getSize(lname.c_str(), width, height);
name = lname;
cc->setAlternateLogo(lname);
return true;
}