Revert "changed: deprecate the RunPlugin() built-in"
authorJim Carroll <thecarrolls@jiminger.com>
Mon, 28 Mar 2011 23:38:48 +0000 (19:38 -0400)
committerJim Carroll <thecarrolls@jiminger.com>
Mon, 28 Mar 2011 23:38:48 +0000 (19:38 -0400)
This reverts commit a6413398d271a88068ee15747c9ad8c5eb2658ab.
and fixes trac #11353

xbmc/interfaces/Builtins.cpp

index f834b5a..50a377d 100644 (file)
@@ -122,7 +122,7 @@ const BUILT_IN commands[] = {
 #if defined(__APPLE__)
   { "RunAppleScript",             true,   "Run the specified AppleScript command" },
 #endif
-  { "RunPlugin",                  true,   "Run the specified plugin. This command is deprecated, use PlayMedia instead" },
+  { "RunPlugin",                  true,   "Run the specified plugin" },
   { "RunAddon",                   true,   "Run the specified plugin/script" },
   { "Extract",                    true,   "Extracts the specified archive" },
   { "PlayMedia",                  true,   "Play the specified media file (or playlist)" },
@@ -433,13 +433,14 @@ int CBuiltins::Execute(const CStdString& execString)
   }
   else if (execute.Equals("runplugin"))
   {
-    CLog::Log(LOGWARNING,"RunPlugin() is deprecated, use PlayMedia() instead");
-    
     if (params.size())
     {
-      CStdString cmd(execString);
-      cmd.Replace("RunPlugin","PlayMedia");
-      return Execute(cmd);
+      CFileItem item(params[0]);
+      if (!item.m_bIsFolder)
+      {
+        item.m_strPath = params[0];
+        CPluginDirectory::RunScriptWithParams(item.m_strPath);
+      }
     }
     else
     {