Skip to content

Commit

Permalink
fix effective_url from 2.2.15 change
Browse files Browse the repository at this point in the history
  • Loading branch information
peak3d committed Apr 20, 2018
1 parent f61409e commit cd6d9c9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -277,11 +277,11 @@ bool adaptive::AdaptiveTree::download(const char* url, const std::map<std::strin
effective_url_ = file.GetPropertyValue(ADDON_FILE_PROPERTY_EFFECTIVE_URL, "");
kodi::Log(ADDON_LOG_DEBUG, "Effective URL %s", effective_url_.c_str());

std::string::size_type paramPos = effective_url_.find_first_of('?', effective_url_.length());
std::string::size_type paramPos = effective_url_.find_first_of('?');
if (paramPos != std::string::npos)
effective_url_.resize(paramPos);

paramPos = effective_url_.find_last_of('/', effective_url_.length());
paramPos = effective_url_.find_last_of('/');
if (paramPos != std::string::npos)
effective_url_.resize(paramPos + 1);
else
Expand Down

0 comments on commit cd6d9c9

Please sign in to comment.