Jump to content
Squid

[Plugin] CA User Scripts

755 posts in this topic Last Reply

Recommended Posts

22 hours ago, hawihoney said:

So I build my own Daily, Weekly, Hourly scripts?

I think it's more that you create and schedule one script, and that script calls all the others one after another.

 

Or you could apply a custom schedule to your scripts and have them run - say - 30 minutes apart.

Share this post


Link to post

I did use User Scripts because I was under a wrong Impression. I thought if there are catagories (Daily, ...) the Plugin would call all Scripts of the same category in order - one after another and not all at once.

 

BTW, why would one call a bunch of Daily Scripts at once?

 

Share this post


Link to post

Probably because I'd then be inundated with requests to specify an execution order

 

 

That, and people are leveraging this plugin to do things I never considered.

 

 

Sent from my NSA monitored device

 

 

 

 

Share this post


Link to post
On 9/20/2019 at 10:51 AM, DZMM said:

Hi can I get some help with what is probably an easy fix please.  

 

I've started using this python utility https://github.com/adamgot/python-plexlibrary where I've saved the files to /mnt/user/appdata/other/python-plexlibrary-master.  When I run the python utility via command line from the folder e.g.

 


python plexlibrary movies_recommended

everything works fine, but when I try to do via script e.g:

 


#!/bin/bash

cd /mnt/user/appdata/other/python-plexlibrary-master 

python plexlibrary movies_recommended

exit

I get this error:

 


Traceback (most recent call last):
File "/usr/lib64/python2.7/runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/lib64/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/mnt/user/appdata/other/python-plexlibrary-master/plexlibrary/__main__.py", line 3, in
main()
File "plexlibrary/plexlibrary.py", line 61, in main
r.run(args.sort_only)
File "plexlibrary/recipe.py", line 696, in run
missing_items, list_count = self._run()
File "plexlibrary/recipe.py", line 172, in _run
matching_total, item['title'], item['year']))
UnicodeEncodeError: 'ascii' codec can't encode character u'\u2013' in position 23: ordinal not in range(128)

I've also tried:

 


#!/usr/bin/env python

cd /mnt/user/appdata/other/python-plexlibrary-master

plexlibrary movies_recommended
plexlibrary movies_imdb_top_250

exit

Help please

Help please

Me again.  Can someone tell me what I'm doing wrong to run a python script please.  When I run the commands:

 

cd /mnt/user/appdata/other/python-plexlibrary-master

python plexlibrary movies_recommended

via putty all is well, but when I try to run a script:

 

#!/bin/bash

cd /mnt/user/appdata/other/python-plexlibrary-master

python plexlibrary movies_recommended

exit

I get errors.

Share this post


Link to post
Posted (edited)

I have no coding exp. But does this work by any chance?

 

python /mnt/user/appdata/other/python-plexlibrary-master/plexlibrary movies_recommended

Edited by nuhll

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.