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

PTP auth - use user/pass/passkey instead of manually entering cookie #458

Closed
evulhotdog opened this issue Jan 26, 2017 · 11 comments
Closed

Comments

@evulhotdog
Copy link

No description provided.

@amishtechie
Copy link

Please add this feature. It is a more standard way of doing it. Thank you.

@RainDear
Copy link

+1 for this feature.

I've still never managed to get it working with the cookie, and it spams the PTP site resulting in the error "Your popcorn quota has been reached, come back later!". The standard user/pass/passkey would both be more reliable and much more user friendly.

@onedr0p
Copy link
Contributor

onedr0p commented Jan 29, 2017

@RainDear that means your are hitting their API to much with requests.

@RainDear
Copy link

@onedr0p thanks but I'm aware of that yes. This always happens when I paste in my PTP cookie and test the settings.

I've done tests, and this is the way it seems to be:

  1. I'm able to access the PTP site (no popcorn quota error)
  2. I add PTP as an indexer and enter my cookie
  3. I press "Test", which will fail
  4. The logs show I failed because of the popcorn quota error
  5. I'm no longer able to access PTP because of the popcorn quota error

Somehow Radarr must be hitting PTP with too many API requests, because it is definitely causing this error. Not sure what else I can to try and get around this, because I love Radarr but it just won't work with PTP for me.

@onedr0p
Copy link
Contributor

onedr0p commented Jan 29, 2017

Do you have anything else that queries the PTP API like couch potato?? I doubt adding the other fields will help you out, because the code it takes will still pass a cookie thru with username, password and passkey. In other words Radarr will still pass a cookie to PTP when you use username, password and passkey.

Are you able to access the following URL on the machine with radarr?

https://passthepopcorn.me/torrents.php?json=noredirect

@RainDear
Copy link

I've disabled couchpotato in case it was causing it, but it made no difference. I can access that URL yes, but after trying to test the indexer with Radarr I won't be able to. If the user/pass wouldn't make a difference, could you even add a label describing the format the cookie string should be in?

Mine just looks like:
__cfduid=example; session=example; PHPSESSID=example

Is that correct?
I haven't looked at the code, but does Radarr retry lots of times if it fails to log in with the cookie?

@onedr0p
Copy link
Contributor

onedr0p commented Jan 29, 2017

That is the correct syntax for the cookie.

No, radarr will not hammer PTP with requests, it makes one on success or failure when you hit the test button. If there's a success then radarr will send requests determined by your RSS sync interval.

Are you sure nothing else is hitting the PTP API? Like perhaps you gave a friend your log in details? Or ?

Also because you are getting rejected by PTP means you are able to connect/authenticate since they block your account for API requests.

@RainDear
Copy link

I've just got it working - the only difference was that I checked the "Keep me logged in" box when logging in on PTP to get my cookie. Maybe that creates a cookie that's valid for a longer period of time?

But anyway, it's working now and thanks a lot for your help - I really appreciate it.

@onedr0p
Copy link
Contributor

onedr0p commented Jan 29, 2017

Ahhh yes, nice catch. That will do it! I hope to add the other fields in the future, just haven't gotten time to implement it yet.

@evulhotdog
Copy link
Author

@RainDear that's exactly what it does. It changes the expiration of the cookie, and essentially what you were doing was logging in, and then trying to use the same already-expired session.

@RainDear
Copy link

Good to know. Might be worth adding that to the page to let people know - I'm sure I'm not the only one who doesn't usually tick that box!

@onedr0p onedr0p closed this as completed Jan 30, 2017
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants