In the interest of getting caster working for everyone on OS X, wanted to share how I got it running. The âHow_to_Cast_an_External_Program.docâ by the author was sufficient, however, before you follow the steps I must warn you, I havenât got the plugin to work as yet and patiently await the author of the code to advice.
I downloaded the code from the âworkingâ branch here
Once you download the zip file, you will have the âCaster.bundleâ inside the âCaster-workingâ folder, extract the âCaster.bundleâ.
In windows (it is easier to edit files within the caster.bundle) I navigated to caster.bundle > Contents  >  Code  > and opened the __init__.py in a text editor like EditPlus or Notepad.
I changed the following:
WIN_PLUGIN_FOLDER = 'Plug-ins/'
PLEX_SERVER_DIR = "/Users//Library/Application Support/Plex Media Server"
ââ needs to be changed to your username.
In OS X on your PMS i.e. the path for plugins should ideally be
~/Library/Application Support/Plex Media Server/Plug-ins
Copy/Paste the edited âCaster.bundleâ to the folder in the path above.
Restart PMS.
Now you should be able to create your own plugin, following the instructions below.
In your local network plex client machine or PMS open up a browser and launch Plex Web, navigate to Channels. You should see the below screen, click on the gear icon shown in a red box in the below image.
Give your plugin a name and click on save as in the screenshot below
Click on the plugin itself
You should then see the following in the screenshot below, click on the âSelect Applicationsâ
Click on your applications folder to navigate to the application youâd like to launch
I Am select the âTerminal.appâ which resides in the âutilitiesâ folder within the âApplicationsâ folder, for my needs, you could select any application.
Once selected youâll get a brief confirmation message stating that the app has been selected, blink and youâll miss it ; ) , click on the "Main Menu" to go back and set all other preferences for your plugin.
Click on the âselect iconâ to set an icon for your plugin, 512x512 pixels image should suffice, to keep your plugin neat, as the author has suggested in his âHow toâ, keep all your icon and image files in one folder.
Last you will click on âCreate Casterâ and if youâve set the paths right (mentioned in the start of the post) your plugin should be created. Click on your plugin!
It will take you to another page, click on the Cast there too
Last you'll get this error message!
Â
Ok, so although it does not work if you navigate to the path below in you PMS machine
~/Library/Logs/PMS Plugin Logs
You will find the âcom.niridia..logâ, open it up in text editor and you may see the lines below as mentioned in a post earlier.
Awaiting response from the author, my thought is if you chown/chmod+x "some file" via terminal
It should give python enough privileges to launch the app, however, I have not fully understood the implications this would entail hence refraining from doing so at the moment, till I hear from the dev.
I see no other way to give/elevate privileges for the app to be launched via the Caster.bundle! unless there is an App key generation and usage process like for windows or if the Caster.bundle can somehow check for permission using keychain! 8-}
I guess its something to do with "*args, **kwargs" that are passed to the app! I guess the key can't be empty! Will dig deeper!
There is a problem with the line of code below found in __init__.py on line 172 of the Caster.bundle
subprocess.Popen([str(Prefs['{runPath}']), ClearNoneString(Prefs['{runArgs}'])])
and in the plugin created via Caster.bundle the same line should appear around line 61. If they are both commented out using a "#" then the plugin created gives a success notification on execution, however nothing actually happens. The method of passing arguments to the app for windows differs in mac is my guess!