Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create sickrage.py #2

Closed
wants to merge 1 commit into from
Closed

Create sickrage.py #2

wants to merge 1 commit into from

Conversation

ghost
Copy link

@ghost ghost commented Apr 17, 2018

I use sickrage rather than sonarr and this is what i use.

import configuration

current_time = datetime.now(timezone.utc).astimezone().isoformat()
get_tv_shows = requests.get('{0}/api/{1}/?cmd=future&sort=date&type=missed|today|soon'.format(configuration.sickrage_url, configuration.sickrage_api_key)).json()['data']
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does Sickrage not allow you to call the commands as headers?

In addition, {0}{1} is no different than {}{}. I suggest either removing the numbers completely or creating a variable name for meaning e.g. {url}{apikey} (As you can see in mine i prefer the less verbose option)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry, it probably does, I just don't actually know python and have never touched the API for any of these things before, pardon the sloppiness :( I'll look into it and get it cleaned up! efficiency is important! Sorry for the spam today.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All good! If you look at my account i helped develop sickrage in the past so i knew the answer just wanted it to spark a thought process for ya haha

Copy link
Member

@dirtycajunrice dirtycajunrice left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see inline comment

@dirtycajunrice
Copy link
Member

to further explain. Sickrage uses sickbeard's api. It has the same type of argparse that plexpy/tautulli does. Check the payload to clean up your url :)

@Boerderij Boerderij locked and limited conversation to collaborators Mar 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants