Skip to content
This repository
Browse code

Merge pull request #1590 from jmarshallnz/skin_setpath_specify_path

allow skin.setpath to take a second parameter of the path to search
  • Loading branch information...
commit 407b5155481bea2f2d0dffeceb7d1ab26b562567 2 parents 0358178 + 665b0bb
jmarshallnz authored October 13, 2012

Showing 1 changed file with 13 additions and 0 deletions. Show diff stats Hide diff stats

  1. 13  xbmc/interfaces/Builtins.cpp
13  xbmc/interfaces/Builtins.cpp
@@ -1186,6 +1186,19 @@ int CBuiltins::Execute(const CStdString& execString)
1186 1186
     else // execute.Equals("skin.setpath"))
1187 1187
     {
1188 1188
       g_mediaManager.GetNetworkLocations(localShares);
  1189
+      if (params.size() > 1)
  1190
+      {
  1191
+        value = params[1];
  1192
+        URIUtils::AddSlashAtEnd(value);
  1193
+        bool bIsSource;
  1194
+        if (CUtil::GetMatchingSource(value,localShares,bIsSource) < 0) // path is outside shares - add it as a separate one
  1195
+        {
  1196
+          CMediaSource share;
  1197
+          share.strName = g_localizeStrings.Get(13278);
  1198
+          share.strPath = value;
  1199
+          localShares.push_back(share);
  1200
+        }
  1201
+      }
1189 1202
       if (CGUIDialogFileBrowser::ShowAndGetDirectory(localShares, g_localizeStrings.Get(1031), value))
1190 1203
         g_settings.SetSkinString(string, value);
1191 1204
     }

0 notes on commit 407b515

Please sign in to comment.
Something went wrong with that request. Please try again.