Skip to content

Commit

Permalink
[FavouritesDirectory] fix for adding addons to favourites via addonbr…
Browse files Browse the repository at this point in the history
…owser
  • Loading branch information
phil65 committed Jan 12, 2017
1 parent fa383a1 commit eed7d1e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion xbmc/filesystem/FavouritesDirectory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,13 @@ std::string CFavouritesDirectory::GetExecutePath(const CFileItem &item, const st
execute = StringUtils::Format("ActivateWindow(%s,%s,return)", contextWindow.c_str(), StringUtils::Paramify(item.GetPath()).c_str());
}
//! @todo STRING_CLEANUP
else if (item.IsScript() && item.GetPath().size() > 9) // plugin://<foo>
else if (item.IsScript() && item.GetPath().size() > 9) // script://<foo>
execute = StringUtils::Format("RunScript(%s)", StringUtils::Paramify(item.GetPath().substr(9)).c_str());
else if (item.IsAddonsPath() && item.GetPath().size() > 9) // addons://<foo>
{
CURL url(item.GetPath());
execute = StringUtils::Format("RunAddon(%s)", url.GetFileName().c_str());
}
else if (item.IsAndroidApp() && item.GetPath().size() > 26) // androidapp://sources/apps/<foo>
execute = StringUtils::Format("StartAndroidActivity(%s)", StringUtils::Paramify(item.GetPath().substr(26)).c_str());
else // assume a media file
Expand Down

0 comments on commit eed7d1e

Please sign in to comment.