Permalink
Browse files

allow skin.setpath to take a second parameter of the path to search

  • Loading branch information...
1 parent 8b29319 commit 665b0bba6ca2d68ea3fee431caae1a77b68476f5 Jonathan Marshall committed Oct 8, 2012
Showing with 13 additions and 0 deletions.
  1. +13 −0 xbmc/interfaces/Builtins.cpp
@@ -1193,6 +1193,19 @@ int CBuiltins::Execute(const CStdString& execString)
else // execute.Equals("skin.setpath"))
{
g_mediaManager.GetNetworkLocations(localShares);
+ if (params.size() > 1)
+ {
+ value = params[1];
+ URIUtils::AddSlashAtEnd(value);
+ bool bIsSource;
+ if (CUtil::GetMatchingSource(value,localShares,bIsSource) < 0) // path is outside shares - add it as a separate one
+ {
+ CMediaSource share;
+ share.strName = g_localizeStrings.Get(13278);
+ share.strPath = value;
+ localShares.push_back(share);
+ }
+ }
if (CGUIDialogFileBrowser::ShowAndGetDirectory(localShares, g_localizeStrings.Get(1031), value))
g_settings.SetSkinString(string, value);
}

0 comments on commit 665b0bb

Please sign in to comment.