Skip to content

Commit

Permalink
Merge pull request #8 from flubshi/improve_icon_selection
Browse files Browse the repository at this point in the history
Improvement: run channel icon selection only once per tv channel
  • Loading branch information
flubshi authored Jun 12, 2019
2 parents 81f5543 + 65691c8 commit 20567bd
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/WaipuData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -278,15 +278,17 @@ bool WaipuData::LoadChannelData(void)
waipu_channel.strStreamURL = href; // waipu[links][rel=livePlayout]
continue;
}
if(icon_sd.size() > 0){
waipu_channel.strIconPath = icon_sd + "?width=256&height=256" ;
}else if(icon_hd.size() > 0){
waipu_channel.strIconPath = icon_hd + "?width=256&height=256" ;
}else if(icon.size() > 0){
waipu_channel.strIconPath = icon + "?width=256&height=256" ;
}
XBMC->Log(LOG_DEBUG, "[channel] link: %s -> %s;",rel.c_str(),href.c_str());
}
if(icon_sd.size() > 0){
waipu_channel.strIconPath = icon_sd + "?width=256&height=256" ;
}else if(icon_hd.size() > 0){
waipu_channel.strIconPath = icon_hd + "?width=256&height=256" ;
}else if(icon.size() > 0){
waipu_channel.strIconPath = icon + "?width=256&height=256" ;
}
XBMC->Log(LOG_DEBUG, "[channel] selected channel logo: %s",waipu_channel.strIconPath.c_str());

m_channels.push_back(waipu_channel);
}

Expand Down

0 comments on commit 20567bd

Please sign in to comment.