The docs seem pretty good so far, but I don't see anything on how to ensure that Plex is executing the latest version of the code in your .bundle. If I make a small change, how do I force plex to "notice" that change? I've tried restarting PMS and using incognito browsing, but it still shows channel not available (which I know if not true as this is sample code that was working perfectly before I added a Log statement that I have since removed)
Does anyone know info on how to ensure Plex is using the latest code? Do any dev settings in the plist help? Alternately, has anyone had issues with Plex not noticing a *.bundle inside the plugins directory? If I make a few changes and restart the server, Plex no longer lists my plugin as installed anywhere.
The docs seem pretty good so far, but I don't see anything on how to ensure that Plex is executing the latest version of the code in your .bundle. If I make a small change, how do I force plex to "notice" that change? I've tried restarting PMS and using incognito browsing, but it still shows channel not available (which I know if not true as this is sample code that was working perfectly before I added a Log statement that I have since removed)
Does anyone know info on how to ensure Plex is using the latest code? Do any dev settings in the plist help? Alternately, has anyone had issues with Plex not noticing a *.bundle inside the plugins directory? If I make a few changes and restart the server, Plex no longer lists my plugin as installed anywhere.
If making changes to the __init__.py, while it's running, PMS should detect this shortly.
As such, I always have the following:
def Start():
Log.Info(L('Starting') + ' %s ' %(L('Srt2Utf-8')) + L('with a version of') + ' %s' %(PLUGIN_VERSION))
print L('Starting') + ' %s ' %(L('Srt2Utf-8')) + L('with a version of') + ' %s' %(PLUGIN_VERSION)
And if my PMS is started from a commandline, I'll see a "starting...." printed out to the console
If making changes to other files, then this might not be noticed by PMS, and then you'll have to restart it.
Regarding a plug-in not showing after a code change, it most likely due to a syntax error made by you, and can be tracked by the plug-in log file
As dane22 notes above, if you make a change to a channel's __init__.py, Plex will recognize that change automatically after you have save it, you do not have to reboot, just back up in the channel directories far enough for the changes to be used. The only time you need to reboot Plex is if you make changes to the info.plist.
I am wondering if you are asking about how to get Plex to not overwrite any changes you have made to an existing plugin when it checks for updates. Most here use symlinks to create an alternate folder for the new code for that plugin. Symlinks are the best way if it works for you.
I am not sure if it is the program I am using to create the symlinks, another setting on my system, or just a glitch with Windows 7, but even if I create a symlink, the alternative folder gets removed or updated when Plex updates, so symlinks does not work for me. Instead I usually add this line to my info.plist of the channel plugin, so Plex will not update the code while I am working on it:
PlexPluginDevMode
1
As for not seeing a new bundle you have created, for me that is usually means I have messed up the naming of the bundle or the structure of the folders in some way.
I've noticed some things recently where, depending on how you are accessing your files, PMS doesn't always pick up the changes. In my case I'm accessing the files via SFTP and when I save them it doesn't always pick it up. In some extreme cases I have to restart PMS, but other times a subsequent save does the trick. This is definitely an issue with PMS as it should be picking up the changes. If you're running into something like this and using SFTP or similar to access/edit the files try what I mention above and let us know if it works.
The sym link issue seems to be either localized to windows or localized to your install shopgirl284, I've never had issues with it on OSX.
When doing the type of logging mentioned above you don't have to start PMS from command line to see them, they should also show up in the channel log (or in some cases the system log).
I've noticed some things recently where, depending on how you are accessing your files, PMS doesn't always pick up the changes. In my case I'm accessing the files via SFTP and when I save them it doesn't always pick it up. In some extreme cases I have to restart PMS, but other times a subsequent save does the trick. This is definitely an issue with PMS as it should be picking up the changes. If you're running into something like this and using SFTP or similar to access/edit the files try what I mention above and let us know if it works.
I can confirm this
When doing the type of logging mentioned above you don't have to start PMS from command line to see them, they should also show up in the channel log (or in some cases the system log).
True, but a lot more easy than tailing the log, IMHO