Git Product home page Git Product logo

Comments (2)

blacktwin avatar blacktwin commented on September 18, 2024

So you have too many arguments being passed. From the looks of it you have {session_key}, {show_name}, {episode_num00}, and {season_num00}. This script is only expecting 3 and in a specific order. When you start adding more custom scripts to PlexPy v1 that require specific arguments it can start to get messy. So because you'll want to keep the {session_key} for another script you should be able to just increase the sys.argv element by 1 for this script.

So change:

show_name = sys.argv[1]
next_ep_num = int(sys.argv[2])
season_num = int(sys.argv[3])

to

show_name = sys.argv[2]
next_ep_num = int(sys.argv[3])
season_num = int(sys.argv[4])

or

session_key= sys.argv[1]
show_name = sys.argv[2]
next_ep_num = int(sys.argv[3])
season_num = int(sys.argv[4])

In PlexPy v2 each notification can receive it's own arguments which eliminates this problem and makes me reluctant to change my scripts. Another way for allowing multiple scripts to pull different arguments is to pull all the args you need for every script you have. So if you need x and y for one script and y, z, and h for another, then you'd want to have x, y, z, and h pulled for every script.

Check out these two scripts. 1 and 2. They both pull the same args but only use the args that they need. Hope that helps.

from jbops.

seanvree avatar seanvree commented on September 18, 2024

@blacktwin this makes sense! So do i need to put all of those arguments in the script filed in PlexPY?

from jbops.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.