Hi,
Doesn't seem to work on a Synology. I copied L0ck.bundle to /volume1/Plex/Library/Application\ Support/Plex\ Media\ Server/Plug-ins/ and it is recognized by Plex (I get the icon).
At first it seems to have trouble with
BASEPATHL0CK = (Core.storage.join_path(Core.storage.join_path(Core.app_support_path, Core.config.bundles_dir_name), 'L0ck.bundle')+'/Contents/Resources/l0ck_support/l0ck.sh')BASEPATHUNL0CK = (Core.storage.join_path(Core.storage.join_path(Core.app_support_path, Core.config.bundles_dir_name), 'L0ck.bundle')+'/Contents/Resources/l0ck_support/unl0ck.sh') BASEPATHDATABASE = (Core.storage.join_path(Core.storage.join_path(Core.app_support_path, Core.config.plugin_support_dir_name), 'Databases')+'/com.plexapp.plugins.library.db')
so I changed it to harcoded paths:
BASEPATHL0CK = ('/volume1/Plex/Library/Application\ Support/Plex\ Media\ Server/Plug-ins/L0ck.bundle/Contents/Resources/l0ck_support/l0ck.sh')BASEPATHUNL0CK = ('/volume1/Plex/Library/Application\ Support/Plex\ Media\ Server/Plug-ins/L0ck.bundle/Contents/Resources/l0ck_support/unl0ck.sh') BASEPATHDATABASE = ('/volume1/Plex/Library/Application\ Support/Plex\ Media\ Server/Plug-ins\ Support/Databases/com.plexapp.plugins.library.db')
This brings me further whey I manually execute the python script, but still I get failed in Plex.
I still get an error though:
DS1512P> python __init__.py Traceback (most recent call last): File "__init__.py", line 43, in @handler(PREFIX, NAME, ICON, ART) NameError: name 'handler' is not defined
Log file:
2014-12-27 18:46:12,005 (-8dd9940) : INFO (core:347) - Starting framework core - Version: 2.5.0, Build: a51033b (Mon Jul 28 12:19:14 UTC 2014)2014-12-27 18:46:12,006 (-8dd9940) : DEBUG (core:359) - Using the elevated policy 2014-12-27 18:46:12,007 (-8dd9940) : DEBUG (core:448) - Starting runtime component. 2014-12-27 18:46:12,013 (-8dd9940) : DEBUG (core:448) - Starting caching component. 2014-12-27 18:46:12,014 (-8dd9940) : DEBUG (core:448) - Starting data component. 2014-12-27 18:46:12,015 (-8dd9940) : DEBUG (core:448) - Starting networking component. 2014-12-27 18:46:12,017 (-8dd9940) : DEBUG (networking:288) - Loaded HTTP cookies 2014-12-27 18:46:12,033 (-8dd9940) : DEBUG (networking:458) - Setting the default network timeout to 20.0 2014-12-27 18:46:12,036 (-8dd9940) : DEBUG (core:448) - Starting localization component. 2014-12-27 18:46:12,037 (-8dd9940) : INFO (localization:408) - Setting the default locale to en-us 2014-12-27 18:46:12,038 (-8dd9940) : DEBUG (core:448) - Starting messaging component. 2014-12-27 18:46:12,040 (-8dd9940) : DEBUG (core:448) - Starting debugging component. 2014-12-27 18:46:12,041 (-8dd9940) : DEBUG (core:448) - Starting services component. 2014-12-27 18:46:12,042 (-aecf490) : DEBUG (networking:172) - Requesting 'http://127.0.0.1:32400/system/messaging/clear_events/com.plexapp.plugins.l0ckunl0ck' 2014-12-27 18:46:12,043 (-8dd9940) : DEBUG (core:448) - Starting myplex component. 2014-12-27 18:46:12,048 (-8dd9940) : DEBUG (core:448) - Starting notifications component. 2014-12-27 18:46:12,720 (-8dd9940) : DEBUG (accessor:68) - Creating a new model access point for provider com.plexapp.plugins.l0ckunl0ck in namespace 'metadata 2014-12-27 18:46:12,757 (-8dd9940) : DEBUG (networking:172) - Requesting 'http://127.0.0.1:32400/:/plugins/com.plexapp.system/resourceHashes' 2014-12-27 18:46:13,327 (-aecf490) : DEBUG (services:265) - Plug-in is not daemonized - loading services from system 2014-12-27 18:46:13,328 (-8dd9940) : DEBUG (runtime:1111) - Created a thread named 'load_all_services' 2014-12-27 18:46:13,331 (-8dd9940) : DEBUG (runtime:1111) - Created a thread named 'get_server_info' 2014-12-27 18:46:13,332 (-8dd9940) : DEBUG (core:150) - Finished starting framework core 2014-12-27 18:46:13,333 (-8dd9940) : DEBUG (core:558) - Loading plug-in code 2014-12-27 18:46:13,379 (-b4ab490) : DEBUG (networking:172) - Requesting 'http://127.0.0.1:32400' 2014-12-27 18:46:13,403 (-aecf490) : DEBUG (networking:172) - Requesting 'http://127.0.0.1:32400/:/plugins/com.plexapp.system/messaging/function/X0J1bmRsZVNlcn 2014-12-27 18:46:13,758 (-b4ab490) : DEBUG (core:536) - Machine identifier is 09ca3a3705833ce289fb4742ba95ccaae63cbf4c 2014-12-27 18:46:13,794 (-b4ab490) : DEBUG (core:537) - Server version is 0.9.11.7.803-87d0708 2014-12-27 18:46:14,086 (-8dd9940) : DEBUG (core:564) - Finished loading plug-in code 2014-12-27 18:46:14,124 (-8dd9940) : DEBUG (runtime:640) - Adding a prefix handler for 'L0ck' ('/video/l0ck') 2014-12-27 18:46:14,132 (-8dd9940) : DEBUG (networking:172) - Requesting 'http://127.0.0.1:32400' 2014-12-27 18:46:14,245 (-8dd9940) : DEBUG (core:519) - Attribute 'platformVersion' set to '3.2.40 (#5021 SMP Wed Dec 17 18:30:52 CST 2014)' 2014-12-27 18:46:14,246 (-8dd9940) : DEBUG (__init__:316) - ==L0CK==: Platform: Linux Version: 3.2.40 (#5021 SMP Wed Dec 17 18:30:52 CST 2014) 2014-12-27 18:46:14,247 (-8dd9940) : DEBUG (__init__:316) - ==L0CK==: PMS Server: 0.9.11.7.803-87d0708 2014-12-27 18:46:14,248 (-8dd9940) : DEBUG (__init__:316) - ==L0CK==: Plex Media Server at /volume1/Plex/Library/Application Support/Plex Media Server 2014-12-27 18:46:14,249 (-8dd9940) : DEBUG (__init__:316) - ==L0CK==: Plug-in bundles are located in /volume1/Plex/Library/Application Support/Plex Media Serve 2014-12-27 18:46:14,349 (-8dd9940) : DEBUG (__init__:316) - ==L0CK==: Plug-in support files are located in /volume1/Plex/Library/Application Support/Plex Media 2014-12-27 18:46:14,359 (-8dd9940) : DEBUG (__init__:316) - ==L0CK==: L0ck Bundle path is /volume1/Plex/Library/Application Support/Plex Media Server/Plug-ins/ 2014-12-27 18:46:14,388 (-8dd9940) : DEBUG (__init__:316) - ==L0CK==: BASEPATHL0CK: /volume1/Plex/Library/Application\ Support/Plex\ Media\ Server/Plug-ins/L0c 2014-12-27 18:46:14,424 (-8dd9940) : DEBUG (__init__:316) - ==L0CK==: BASEPATHUNL0CK: /volume1/Plex/Library/Application\ Support/Plex\ Media\ Server/Plug-ins/L 2014-12-27 18:46:14,443 (-8dd9940) : DEBUG (__init__:316) - ==L0CK==: BASEPATHDATABASE: /volume1/Plex/Library/Application\ Support/Plex\ Media\ Server/Plug-ins 2014-12-27 18:46:14,476 (-8dd9940) : DEBUG (__init__:316) - ==L0CK==: L0ck plugin generated on: 15th NOV 2014 2014-12-27 18:46:14,565 (-8dd9940) : INFO (core:609) - Started plug-in 2014-12-27 18:46:14,634 (-8dd9940) : DEBUG (socketinterface:160) - Starting socket server 2014-12-27 18:46:14,721 (-aecf490) : DEBUG (services:362) - Loaded services 2014-12-27 18:46:14,742 (-b1bd490) : DEBUG (services:438) - No shared code to load 2014-12-27 18:46:14,744 (-8dd9940) : DEBUG (runtime:1111) - Created a thread named 'start' 2014-12-27 18:46:14,746 (-8dd9940) : INFO (socketinterface:184) - Socket server started on port 53973 2014-12-27 18:46:14,746 (-8dd9940) : INFO (pipeinterface:25) - Entering run loop 2014-12-27 18:46:14,747 (-8dd9940) : DEBUG (runtime:717) - Handling request GET /:/prefixes 2014-12-27 18:46:14,755 (-8dd9940) : DEBUG (runtime:814) - Found route matching /:/prefixes 2014-12-27 18:46:14,759 (-8dd9940) : DEBUG (runtime:918) - Response: [200] MediaContainer, 448 bytes 2014-12-27 18:46:14,811 (-aecf490) : DEBUG (runtime:717) - Handling request GET /video/l0ck 2014-12-27 18:46:14,830 (-aecf490) : DEBUG (runtime:814) - Found route matching /video/l0ck 2014-12-27 18:46:14,832 (-aecf490) : DEBUG (__init__:316) - ==L0CK==: Client Platform: Safari 2014-12-27 18:46:14,833 (-aecf490) : DEBUG (__init__:316) - ==L0CK==: Client Product: Plex Web 2014-12-27 18:46:14,835 (-aecf490) : DEBUG (preferences:256) - Loaded preferences from DefaultPrefs.json 2014-12-27 18:46:14,839 (-aecf490) : DEBUG (preferences:178) - Loaded the user preferences for com.plexapp.plugins.l0ckunl0ck 2014-12-27 18:46:14,842 (-aecf490) : DEBUG (networking:172) - Requesting 'http://127.0.0.1:32400/library/sections' 2014-12-27 18:46:14,859 (-aecf490) : WARNING (runtime:1059) - Generating a callback path for a function with no route: 2014-12-27 18:46:14,865 (-aecf490) : WARNING (runtime:1059) - Generating a callback path for a function with no route: 2014-12-27 18:46:14,867 (-aecf490) : DEBUG (base:125) - Checking if com.plexapp.plugins.l0ckunl0ck is broken 2014-12-27 18:46:14,888 (-aecf490) : DEBUG (networking:172) - Requesting 'http://127.0.0.1:32400/:/plugins/com.plexapp.system/messaging/function/X1N0b3JlU2Vydm 2014-12-27 18:46:14,929 (-aecf490) : DEBUG (runtime:106) - Sending packed state data (111 bytes) 2014-12-27 18:46:14,930 (-aecf490) : DEBUG (runtime:918) - Response: [200] MediaContainer, 1317 bytes 2014-12-27 18:46:16,899 (-aecf490) : DEBUG (runtime:717) - Handling request GET /video/l0ck 2014-12-27 18:46:16,905 (-aecf490) : DEBUG (runtime:814) - Found route matching /video/l0ck 2014-12-27 18:46:16,907 (-aecf490) : DEBUG (__init__:316) - ==L0CK==: Client Platform: Safari 2014-12-27 18:46:14,833 (-aecf490) : DEBUG (__init__:316) - ==L0CK==: Client Product: Plex Web 2014-12-27 18:46:14,835 (-aecf490) : DEBUG (preferences:256) - Loaded preferences from DefaultPrefs.json 2014-12-27 18:46:14,839 (-aecf490) : DEBUG (preferences:178) - Loaded the user preferences for com.plexapp.plugins.l0ckunl0ck 2014-12-27 18:46:14,842 (-aecf490) : DEBUG (networking:172) - Requesting 'http://127.0.0.1:32400/library/sections' 2014-12-27 18:46:14,859 (-aecf490) : WARNING (runtime:1059) - Generating a callback path for a function with no route: 2014-12-27 18:46:14,865 (-aecf490) : WARNING (runtime:1059) - Generating a callback path for a function with no route: 2014-12-27 18:46:14,867 (-aecf490) : DEBUG (base:125) - Checking if com.plexapp.plugins.l0ckunl0ck is broken 2014-12-27 18:46:14,888 (-aecf490) : DEBUG (networking:172) - Requesting 'http://127.0.0.1:32400/:/plugins/com.plexapp.system/messaging/function/X1N0b3JlU2Vydm 2014-12-27 18:46:14,929 (-aecf490) : DEBUG (runtime:106) - Sending packed state data (111 bytes) 2014-12-27 18:46:14,930 (-aecf490) : DEBUG (runtime:918) - Response: [200] MediaContainer, 1317 bytes 2014-12-27 18:46:16,899 (-aecf490) : DEBUG (runtime:717) - Handling request GET /video/l0ck 2014-12-27 18:46:16,905 (-aecf490) : DEBUG (runtime:814) - Found route matching /video/l0ck 2014-12-27 18:46:16,907 (-aecf490) : DEBUG (__init__:316) - ==L0CK==: Client Platform: Safari 2014-12-27 18:46:16,908 (-aecf490) : DEBUG (__init__:316) - ==L0CK==: Client Product: Plex Web 2014-12-27 18:46:16,911 (-aecf490) : DEBUG (networking:172) - Requesting 'http://127.0.0.1:32400/library/sections' 2014-12-27 18:46:16,952 (-aecf490) : WARNING (runtime:1059) - Generating a callback path for a function with no route: 2014-12-27 18:46:16,957 (-aecf490) : WARNING (runtime:1059) - Generating a callback path for a function with no route: 2014-12-27 18:46:16,959 (-aecf490) : DEBUG (base:125) - Checking if com.plexapp.plugins.l0ckunl0ck is broken 2014-12-27 18:46:16,961 (-aecf490) : DEBUG (networking:172) - Requesting 'http://127.0.0.1:32400/:/plugins/com.plexapp.system/messaging/function/X1N0b3JlU2Vydm 2014-12-27 18:46:16,998 (-aecf490) : DEBUG (runtime:106) - Sending packed state data (111 bytes) 2014-12-27 18:46:16,999 (-aecf490) : DEBUG (runtime:918) - Response: [200] MediaContainer, 1317 bytes 2014-12-27 18:46:17,018 (-aecf490) : DEBUG (runtime:717) - Handling request GET /video/l0ck/:/function/L0ck?function_args=Y2VyZWFsMQoxCmRpY3QKMApyMAo_ 2014-12-27 18:46:17,093 (-aecf490) : DEBUG (runtime:814) - Found route matching /video/l0ck/:/function/L0ck 2014-12-27 18:46:17,094 (-aecf490) : DEBUG (runtime:143) - Calling function 'L0ck' 2014-12-27 18:46:17,096 (-aecf490) : DEBUG (__init__:316) - ==L0CK==: About to l0ck 2014-12-27 18:46:17,098 (-aecf490) : DEBUG (__init__:316) - ==L0CK==: Execute: sh '/volume1/Plex/Library/Application\ Support/Plex\ Media\ Server/Plug-ins/L0ck 2014-12-27 18:46:17,114 (-aecf490) : DEBUG (networking:172) - Requesting 'http://127.0.0.1:32400/:/plugins/com.plexapp.plugins.l0ckunl0ck/prefs/set?currentlock 2014-12-27 18:46:17,123 (-b4ab490) : DEBUG (runtime:717) - Handling request GET /:/plugins/com.plexapp.plugins.l0ckunl0ck/prefs/set?currentlock=3 2014-12-27 18:46:17,130 (-b4ab490) : DEBUG (runtime:814) - Found route matching /:/plugins/com.plexapp.plugins.l0ckunl0ck/prefs/set 2014-12-27 18:46:17,132 (-b4ab490) : DEBUG (preferences:198) - Saved the user preferences 2014-12-27 18:46:17,134 (-b4ab490) : CRITICAL (sandbox:298) - Function named 'ValidatePrefs' couldn't be found in the current environment 2014-12-27 18:46:17,137 (-b4ab490) : DEBUG (runtime:106) - Sending packed state data (111 bytes) 2014-12-27 18:46:17,138 (-b4ab490) : DEBUG (runtime:918) - Response: [200] str, 0 bytes 2014-12-27 18:46:17,148 (-aecf490) : DEBUG (__init__:316) - ==L0CK==: SetPrefs (currentlock):3 2014-12-27 18:46:17,149 (-aecf490) : DEBUG (networking:172) - Requesting 'http://127.0.0.1:32400/:/plugins/com.plexapp.plugins.l0ckunl0ck/prefs/set?currentlock 2014-12-27 18:46:17,158 (-b4ab490) : DEBUG (runtime:717) - Handling request GET /:/plugins/com.plexapp.plugins.l0ckunl0ck/prefs/set?currentlock=3 2014-12-27 18:46:17,161 (-b4ab490) : DEBUG (runtime:49) - Received packed state data (80 bytes) 2014-12-27 18:46:17,166 (-b4ab490) : DEBUG (runtime:814) - Found route matching /:/plugins/com.plexapp.plugins.l0ckunl0ck/prefs/set 2014-12-27 18:46:17,168 (-b4ab490) : DEBUG (preferences:198) - Saved the user preferences 2014-12-27 18:46:17,169 (-b4ab490) : CRITICAL (sandbox:298) - Function named 'ValidatePrefs' couldn't be found in the current environment 2014-12-27 18:46:17,173 (-b4ab490) : DEBUG (runtime:106) - Sending packed state data (111 bytes) 2014-12-27 18:46:17,174 (-b4ab490) : DEBUG (runtime:918) - Response: [200] str, 0 bytes 2014-12-27 18:46:17,182 (-aecf490) : DEBUG (__init__:316) - ==L0CK==: L0ck failed to execute 2014-12-27 18:46:17,190 (-aecf490) : DEBUG (runtime:106) - Sending packed state data (699 bytes) 2014-12-27 18:46:17,192 (-aecf490) : DEBUG (runtime:918) - Response: [200] MediaContainer, 641 bytes